Save Agent
save_agentCreate or update a standing agent — a saved {goal + tickers + schedule} that fires either a fixed step recipe (agent_type="workflow", free/deterministic) or an AI-directed team (agent_type="autonomous", charged — settles against the owner's BYO key first, falling back to the managed wallet only if funded). Upsert semantics: omit agent_id to CREATE a new agent; pass an existing agent_id to UPDATE it. There is no separate update_agent — this does both, matching save_watchlist/save_thesis's house style. agent_type is STRUCTURAL and immutable: always required, and on an update it is verified against the existing agent before anything is changed — passing a different agent_type than the agent already has is rejected (delete and recreate to change the type). steps (an array of {kind:"tool"|"sop", name, args, label?}) is required and non-empty when CREATING an agent_type="workflow" agent, and must be omitted for agent_type="autonomous" (use managed_model there instead, itself optional and only valid for agent_type="autonomous"). when picks the trigger: "manual" (fires only via run_agent or the Workspace UI) or "schedule" (requires a schedule object — cadence "weekly" needs day_of_week, "monthly" needs day_of_month). This tool does NOT itself fire a run — use run_agent for that. Tier: sp500+ (sample rejected).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| goal | Yes | What this agent is trying to accomplish — drives an autonomous agent's AI-directed team, and documents intent for a workflow agent's fixed steps. | |
| name | Yes | Human-readable label. | |
| when | Yes | Trigger mode. "manual" fires only via run_agent/the UI; "schedule" requires the `schedule` object. | |
| steps | No | Fixed step recipe for agent_type="workflow". Required + non-empty when CREATING a workflow agent; must be omitted for agent_type="autonomous". | |
| tickers | Yes | US tickers this agent operates over. Normalised to uppercase. | |
| agent_id | No | Omit to create a new agent; pass an existing agent's id (from save_agent/list_agents/get_agent) to update it. | |
| schedule | No | Required when when="schedule"; ignored otherwise. | |
| agent_type | Yes | STRUCTURAL and immutable. "workflow" = fixed step recipe, free/deterministic, requires `steps`. "autonomous" = AI-directed team, charged, may set `managed_model`. | |
| managed_model | No | Managed-lane model override for agent_type="autonomous" only (e.g. when no BYO key is connected). Omit to use the account default. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| _meta | Yes | Provenance envelope — data lineage for every MCP response | |
| agent | Yes | ||
| created | Yes |