Build your own agent on Argorant

Custom runtimes: which surface to pick and how to shape the loop.

If you are writing the runtime yourself, you have three ways in. Pick by how your agent executes, not by preference.

  • MCP at https://mcp.argorant.com/mcp: best when your framework already speaks MCP and you want OAuth sign-in instead of key handling.
  • REST at https://argorant.com/api/mcp/... with a bearer key: best for servers, cron jobs and anything headless.
  • CLI (npx argorant): best when the agent can shell out and you want files on disk plus machine-readable exit codes.

A loop that behaves

  1. Call GET /api/mcp/account once at startup to confirm the key, its scopes and the daily quota.
  2. Translate the user's request into filters and call GET /api/mcp/people/count. Free, so iterate here.
  3. Show a redacted preview with GET /api/mcp/people/preview and let the human confirm the shape.
  4. Only then reveal or create an export, with an explicit row limit.
  5. Handle the four failure codes deliberately: 401, 402, 403 and 429 each mean something different.
Terminal output of a custom agent walking count, preview, then export
Terminal output of a custom agent walking count, preview, then export

Use --json on every CLI call inside an agent, or read the JSON bodies straight from REST. Both give stable field names. The AI reference at argorant.com/ai is written to be pasted into an agent's context.

Still stuck? support@argorant.com