---
title: "Create an agent"
method: POST
path: "/v1/agents"
tags: ["Agents"]
---

# Create an agent

`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`

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.

## Headers

- `Idempotency-Key` string

## Request body

- object
  - `name` string, required
  - `goal` string, required
  - `instructions` string, required
  - `soul` string
  - `trading_enabled` boolean
  - `memory_enabled` boolean

## Response `201`

Agent created

- Agent
  - `id` string, required
  - `name` string, required
  - `description` string
  - `enabled` boolean, required
  - `schedule` string: Cron expression governing scheduled execution (omitted = manual-only)
  - `model` string: LLM model id this agent uses (e.g. 'sonnet-4', 'opus-4')
  - `owner_id` string
  - `created_at` string, date-time
  - `updated_at` string, date-time
  - `last_run_at` string, date-time, nullable
  - `tools` string[]: Mastra tool ids the agent may call

## Other responses

- `400`: Invalid request

---

[API](https://skmtc.dev/marketintell/apis/marketintell-api.md) · [All operations](https://skmtc.dev/marketintell/apis/marketintell-api/llms.txt) · [OpenAPI document](https://skmtc.dev/marketintell/apis/marketintell-api/revisions/f3ef87afc41f?raw)
