Agents

Create an agent

Create an autonomous trading agent. Required: name, goal, instructions (system prompt). Optional: soul (personality preset), trading_enabled (default false — research-only; true allows real trade execution via configured broker), memory_enabled (default true — accumulates long-term notes). Pro tier allows up to 3 active agents per key.

post/v1/agents

Request

  • Base URL: https://api.marketintell.ai
  • URL: https://api.marketintell.ai/v1/agents
  • Auth: one of:
    • HTTP bearer
    • API key in header X-API-Key

Headers

Idempotency-Keystring

Opt-in idempotency token (max 255 chars). The FIRST request carrying a given key is processed normally and its 2xx response is cached for 24h, scoped to (api_key + method + path + request-body hash). A retry with the SAME key and body replays the cached response and adds Idempotency-Replayed: true. Reusing the same key with a DIFFERENT body returns 422 (idempotency_key_reuse). The cache is per-process and in-memory, so on a multi-replica deploy a retry that lands on a different task re-executes — callers must already tolerate at-least-once delivery.

Request body

namestring required
goalstring required
instructionsstring required
soulstring
trading_enabledboolean
memory_enabledboolean

Response

Agent created

idstring required
namestring required
descriptionstring
enabledboolean required
schedulestring

Cron expression governing scheduled execution (omitted = manual-only)

modelstring

LLM model id this agent uses (e.g. 'sonnet-4', 'opus-4')

owner_idstring
created_atstring date-time
updated_atstring date-time
last_run_atstring date-time nullable
toolsstring[]

Mastra tool ids the agent may call

Changes

No recorded changes to this operation across all 1 revision of this API.