Skip to main content
Glama

Create a runnable agent repo from a checked template

onchain_agent_create_agent
Read-onlyIdempotent

USE WHEN someone wants the code for an onchain agent, not advice: describe the goal and get a runnable TypeScript repo generated from a template that is re-checked every night. Same handler as POST /api/create and the create-sato-agent CLI.

The goal picks the template; it never changes a template code file. A goal no template answers returns no_template with the nearest templates instead of improvised code — each with its id, framework, intents, chains and mismatched (what differs from the request), so the next call can name one.

TEMPLATES, as template (intents: frameworks): base-guarded-trader (trading, swap: agentkit, ai-sdk, claude-agent-sdk, openai-agents, plain-ts); persona-agent (general, payments: claude-agent-sdk); research-report (data, research: plain-ts); solana-guarded-swapper (trading, swap: plain-ts); token-launch-prep (launch: plain-ts); treasury-monitor (data, treasury: plain-ts); x402-seller (payments: plain-ts). Any other intent × framework pair answers no_template.

The repo carries policy.json (spending caps, allowed chains and tokens), sato.lock.json (dependency custody readings) and sato.create.json (the manifest, signed when a key is configured). It generates for a local fork by default and testnet on request; mainnet is refused unless network is "mainnet" and mainnet_risk_accepted is true, and a template that does not run on the network says so.

RULE ENFORCED: the goal is not stored or logged. A refusal names its error code and, where one applies, the rule. last_green is the day the template last passed its nightly checks, or null — never invented. Nothing is audited, and nothing here signs, holds keys or moves funds.

Returns (json): { schema: "sato.create.response/v1", ok: true, template: { id, version, digest, framework }, files: [{ path, encoding, content }], zip_base64?, env_names, next_commands, manifest, last_green, status_url, cli } or { ok: false, error, message, rule?, nearest?, blocked? }. Writes nothing.

Example: { goal: "swap USDC to ETH on Base with a per-trade cap", framework: "plain-ts" }

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
goalYesWhat the agent should do, in plain words, e.g. 'swap USDC to ETH on Base with a per-trade cap'. Not stored.
chainNoChain the agent runs on.
formatNofiles (default) or zip (adds zip_base64).
networkNoWhere it may sign. Default fork. mainnet needs mainnet_risk_accepted: true.
templateNoPin a template id.
frameworkNoAgent framework. Templates exist for agentkit, ai-sdk, claude-agent-sdk, openai-agents, plain-ts; any other answers no_template with the nearest.
mainnet_risk_acceptedNoExplicit acceptance of mainnet risk. Only read when network is mainnet.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / chain / enum
      Previous value: -[
      -  "base",
      -  "base-sepolia"
      -]New value: +[
      +  "base",
      +  "base-sepolia",
      +  "solana"
      +]
  2. Changed1 schema field changed
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
  3. Changed1 schema field changed
    • changedInput schema / properties / framework / description
      Previous value: -"Agent framework. Templates exist for agentkit, claude-agent-sdk, openai-agents, plain-ts; any other answers no_template with the nearest."New value: +"Agent framework. Templates exist for agentkit, ai-sdk, claude-agent-sdk, openai-agents, plain-ts; any other answers no_template with the nearest."
  4. Changed1 schema field changed
    • changedInput schema / properties / framework / description
      Previous value: -"Agent framework. Templates exist for plain-ts; any other answers no_template with the nearest."New value: +"Agent framework. Templates exist for agentkit, claude-agent-sdk, openai-agents, plain-ts; any other answers no_template with the nearest."
  5. Added

TDQS

Score is being calculated.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.