MarketIntell

Agents API

Create and manage autonomous market intelligence agents

Agents API

Create autonomous agents that monitor markets, execute strategies, and maintain persistent memory across interactions.


POST /v1/agents

Create a new agent.

Request Body

FieldTypeRequiredDescription
namestringYesAgent name
goalstringYesAgent's primary objective
instructionsstringYesDetailed instructions for the agent
soulstringNoPersonality and behavioral guidelines
triggersobject[]YesConditions that activate the agent

Request

curl -X POST https://api.marketintell.ai/v1/agents \
  -H "Content-Type: application/json" \
  -H "X-API-Key: YOUR_API_KEY" \
  -d '{
    "name": "BTC Whale Watcher",
    "goal": "Monitor large BTC transactions and alert on significant whale movements",
    "instructions": "Track whale wallets holding >1000 BTC. Alert when cumulative daily movement exceeds 10,000 BTC in either direction. Provide context on historical behavior of flagged wallets.",
    "soul": "Concise and data-driven. Report facts first, opinions second.",
    "triggers": [
      { "type": "schedule", "interval": "1h" },
      { "type": "event", "condition": "btc_whale_transfer > 5000" }
    ]
  }'

Response

{
  "success": true,
  "data": {
    "id": "agent_abc123",
    "name": "BTC Whale Watcher",
    "goal": "Monitor large BTC transactions and alert on significant whale movements",
    "status": "active",
    "created_at": "2025-01-15T10:00:00.000Z"
  }
}

GET /v1/agents

List all agents for the authenticated user.

Request

curl https://api.marketintell.ai/v1/agents \
  -H "X-API-Key: YOUR_API_KEY"

Response

{
  "success": true,
  "data": [
    {
      "id": "agent_abc123",
      "name": "BTC Whale Watcher",
      "goal": "Monitor large BTC transactions...",
      "status": "active",
      "last_run": "2025-01-15T13:00:00.000Z",
      "total_runs": 24,
      "created_at": "2025-01-15T10:00:00.000Z"
    }
  ]
}

GET /v1/agents/:id

Get a specific agent's details.

Path Parameters

ParameterTypeDescription
idstringThe agent ID

Request

curl https://api.marketintell.ai/v1/agents/agent_abc123 \
  -H "X-API-Key: YOUR_API_KEY"

Response

{
  "success": true,
  "data": {
    "id": "agent_abc123",
    "name": "BTC Whale Watcher",
    "goal": "Monitor large BTC transactions and alert on significant whale movements",
    "instructions": "Track whale wallets holding >1000 BTC...",
    "soul": "Concise and data-driven. Report facts first, opinions second.",
    "triggers": [
      { "type": "schedule", "interval": "1h" },
      { "type": "event", "condition": "btc_whale_transfer > 5000" }
    ],
    "status": "active",
    "last_run": "2025-01-15T13:00:00.000Z",
    "total_runs": 24,
    "created_at": "2025-01-15T10:00:00.000Z"
  }
}

DELETE /v1/agents/:id

Delete an agent and all its associated data.

Path Parameters

ParameterTypeDescription
idstringThe agent ID

Request

curl -X DELETE https://api.marketintell.ai/v1/agents/agent_abc123 \
  -H "X-API-Key: YOUR_API_KEY"

Response

{
  "success": true,
  "data": {
    "deleted": true
  }
}

POST /v1/agents/:id/chat

Send a message to an agent. The agent responds using its instructions, memory, and the MarketIntell pipeline.

Path Parameters

ParameterTypeDescription
idstringThe agent ID

Request Body

FieldTypeRequiredDescription
messagestringYesYour message to the agent

Request

curl -X POST https://api.marketintell.ai/v1/agents/agent_abc123/chat \
  -H "Content-Type: application/json" \
  -H "X-API-Key: YOUR_API_KEY" \
  -d '{
    "message": "What whale activity have you seen in the last 6 hours?"
  }'

Response

{
  "success": true,
  "data": {
    "response": "In the last 6 hours, I've tracked 3 significant whale movements:\n\n1. **2,400 BTC** moved from Binance to a known accumulation wallet (12:45 UTC)\n2. **1,800 BTC** deposited to Coinbase from a dormant wallet (last active 8 months ago)\n3. **3,100 BTC** transferred between two cold storage wallets (likely internal rebalancing)\n\nNet flow: **-600 BTC off exchanges** (mildly bullish).",
    "agent_id": "agent_abc123",
    "timestamp": "2025-01-15T14:00:00.000Z"
  }
}

POST /v1/agents/:id/execute

Manually trigger an agent execution outside of its scheduled triggers.

Path Parameters

ParameterTypeDescription
idstringThe agent ID

Request

curl -X POST https://api.marketintell.ai/v1/agents/agent_abc123/execute \
  -H "X-API-Key: YOUR_API_KEY"

Response

{
  "success": true,
  "data": {
    "run_id": "run_xyz789",
    "agent_id": "agent_abc123",
    "status": "completed",
    "output": "Hourly whale scan complete. No significant movements detected in the past hour. Exchange reserves stable at 2.1M BTC.",
    "started_at": "2025-01-15T14:05:00.000Z",
    "completed_at": "2025-01-15T14:05:08.000Z"
  }
}

GET /v1/agents/:id/runs

Get execution history for an agent.

Path Parameters

ParameterTypeDescription
idstringThe agent ID

Query Parameters

ParameterTypeRequiredDescription
limitnumberNoNumber of runs to return (default: 20)

Request

curl "https://api.marketintell.ai/v1/agents/agent_abc123/runs?limit=5" \
  -H "X-API-Key: YOUR_API_KEY"

Response

{
  "success": true,
  "data": [
    {
      "run_id": "run_xyz789",
      "status": "completed",
      "trigger": "manual",
      "output_preview": "Hourly whale scan complete. No significant movements...",
      "started_at": "2025-01-15T14:05:00.000Z",
      "completed_at": "2025-01-15T14:05:08.000Z"
    },
    {
      "run_id": "run_xyz788",
      "status": "completed",
      "trigger": "schedule",
      "output_preview": "ALERT: 5,200 BTC moved off Binance in single transaction...",
      "started_at": "2025-01-15T13:00:00.000Z",
      "completed_at": "2025-01-15T13:00:12.000Z"
    }
  ]
}

GET /v1/agents/:id/memory

Retrieve an agent's persistent memory — the accumulated context from all interactions and executions.

Path Parameters

ParameterTypeDescription
idstringThe agent ID

Request

curl https://api.marketintell.ai/v1/agents/agent_abc123/memory \
  -H "X-API-Key: YOUR_API_KEY"

Response

{
  "success": true,
  "data": {
    "agent_id": "agent_abc123",
    "facts": [
      "BTC exchange reserves have declined 4.2% over the past 7 days",
      "Wallet 0x3f5c... has made 3 large purchases this week (accumulation pattern)",
      "Binance hot wallet balance dropped below 500K BTC threshold on Jan 14"
    ],
    "observations": [
      "Whale accumulation tends to precede 5-10% price moves within 72 hours",
      "Exchange outflow signals have been more reliable than inflow signals this cycle"
    ],
    "updated_at": "2025-01-15T14:05:08.000Z"
  }
}

On this page