> For the complete documentation index, see [llms.txt](/llms.txt).
> A full single-fetch corpus is available at [llms-full.txt](/llms-full.txt).

# AGNT5 docs

Guides and reference for building agents and workflows on AGNT5, running them in production, and improving them from real runs.

## Set up with your coding agent

Paste this prompt into a new agent thread. It is written for Claude Code.

```text
Help me get set up with AGNT5. Based on my project, do the following:

1. Install the AGNT5 CLI with `curl -LsSf https://agnt5.com/cli.sh | bash`. This shell won't see the new PATH, so call `~/.agnt5/bin/agnt5` by its full path for the rest of this session. Run `agnt5 auth login` and wait for me to finish signing in.

2. Install the AGNT5 skills with `npx skills add https://github.com/agnt5dev/skills`.

3. Connect the AGNT5 MCP server. Run `claude mcp add --transport http agnt5 https://mcp.agnt5.com/mcp`, then tell me to run /mcp, select agnt5, and choose Authenticate.

4. Set up the project. If this folder already has code, run `agnt5 init` to link it. If it's empty, run `agnt5 create --template python/quickstart <name>`, or the TypeScript quickstart if I ask for it. If I have more than one workspace, ask me which one to use. Ask whether I use OpenAI or Anthropic, then put that one key in `.env`. Never commit `.env`.

5. Start `agnt5 dev` in the background and leave it running. Trigger one run with `agnt5 run`, then give me the Studio link to its trace.

6. Deploy with `agnt5 deploy --env preview` and tell me when the workers are ready. Ask me before anything touches production.

7. Suggest next steps for my project, such as human approvals, secrets, online evals, or promoting to production.

Docs index: https://agnt5.com/llms.txt
```

For another agent, replace step 3's instruction with:

- Codex: Run `codex mcp add agnt5 --url https://mcp.agnt5.com/mcp`, then `codex mcp login agnt5` and wait for me to sign in.
- Cursor: Add a server named agnt5 with the URL https://mcp.agnt5.com/mcp to `.cursor/mcp.json`, then tell me to open Cursor Settings > Tools & MCP and select Connect on agnt5.
- Other agents: Add an MCP server named agnt5 with the URL https://mcp.agnt5.com/mcp and tell me how to sign in to it. If you can't use MCP servers, skip this step.

## Set up from the terminal

Install the CLI (or `brew install agnt5dev/agnt5/agnt5`), sign in, and create a project:

```bash
curl -LsSf https://agnt5.com/cli.sh | bash
agnt5 auth login
agnt5 create --template python/quickstart my-agnt5-quickstart
```

Then continue in the [Quickstart](https://agnt5.com/docs/quickstart.md). [Install the CLI](https://agnt5.com/docs/cli/install.md) covers CI, troubleshooting, and uninstalling.

## Introduction

- [How AGNT5 works](https://agnt5.com/docs/how-agnt5-works.md): What AGNT5 does with your code: durable runs made of checkpointed steps, pauses that wait for people, and a recorded trace for every run.
- [Quickstart](https://agnt5.com/docs/quickstart.md): Build a workflow that summarizes the top Hacker News stories, run it with agnt5 dev, open its trace, and deploy it to preview.
- [Learning path](https://agnt5.com/docs/learning-path.md): A suggested order through the AGNT5 docs, from how it works and your first run to building, shipping, operating, and improving your own project.
- [Build with AI](https://agnt5.com/docs/build-with-ai.md): Give your coding agent the AGNT5 skill and MCP server, add project rules, and use copyable prompts to build, debug, and evaluate AGNT5 projects.

## Build

- [Build with AGNT5](https://agnt5.com/docs/build/overview.md): Define workflows, functions, agents, prompts, webhooks, and approval steps before you deploy.
- [Local development](https://agnt5.com/docs/build/local-development.md): Run your worker locally with agnt5 dev, reload it as you edit, and trigger it from Studio, the CLI, or the API.
- [Functions](https://agnt5.com/docs/build/functions.md): Define stateless units of work that AGNT5 can register, retry, and checkpoint inside workflows.
- [Workflows](https://agnt5.com/docs/build/workflows.md): Define durable orchestrators that sequence functions, agents, and human approvals into reliable pipelines.
- [Agents](https://agnt5.com/docs/build/agents.md): Configure LLM agents with instructions, models, tools, handoffs, and loop limits.
- [Tools](https://agnt5.com/docs/build/tools.md): Give agents typed callable actions for APIs, code execution, search, and provider-hosted capabilities.
- [Use sandboxes with agents](https://agnt5.com/docs/build/sandboxes.md): Give an agent an isolated workspace where it can write files, read files, list files, and execute code.
- [Give agents skills and project guidance](https://agnt5.com/docs/build/skills.md): Load capabilities on demand with SKILL.md folders, and apply always-on project guidance with AGENTS.md, instead of stuffing everything into one large prompt.
- [Model Context Protocol](https://agnt5.com/docs/build/mcp.md): Connect external MCP servers to AGNT5 agents, or publish your AGNT5 functions, workflows, and agents as an MCP server.
- [Prompts](https://agnt5.com/docs/build/prompts.md): Manage prompt text as a first-class artifact, run it from Python or TypeScript, and keep production prompt versions tied to code.
- [Prompt caching](https://agnt5.com/docs/build/prompt-caching.md): Enable provider-native prompt caching from one SDK surface across Anthropic, OpenAI, and Gemini.
- [Human-in-the-loop](https://agnt5.com/docs/build/human-in-the-loop.md): Pause workflows for durable human input, approvals, selections, and follow-up decisions.
- [Webhooks](https://agnt5.com/docs/build/webhooks.md): Trigger workflows from external events sent by Standard Webhooks, Sentry, Stripe, GitHub, or Slack, with signature verification and idempotent delivery.
- [Scheduling](https://agnt5.com/docs/build/scheduling.md): Run workflows on a cron schedule, declared in code or created in Studio, and see how AGNT5 fires, deduplicates, and stops scheduled runs.

## Run

- [Run with AGNT5](https://agnt5.com/docs/run/overview.md): Deploy workers, trigger production runs, inspect traces, stream logs, and watch runtime metrics.
- [Deploying](https://agnt5.com/docs/run/deploying.md): Deploy your worker to a managed AGNT5 environment, then verify it and observe runs, traces, logs, and metrics from the CLI, API, and Studio.
- [Environments](https://agnt5.com/docs/run/environments.md): Separate preview, staging, and production traffic, promote a verified deployment forward, roll back fast, and scope secrets per environment.
- [Worker sizes](https://agnt5.com/docs/run/worker-sizes.md): Choose how much CPU and memory your managed workers get, set it on a project or an environment, and fix workers that run out of memory.
- [Streaming output and durability](https://agnt5.com/docs/run/streaming-output.md): Understand which streaming events AGNT5 persists, what reconnect can replay, and how to design consumers for transient LLM output.
- [Serve your project over MCP](https://agnt5.com/docs/run/mcp-servers.md): Publish your AGNT5 functions, workflows, and agents as an MCP server, connect it to Claude, and see each tool call in Studio as a durable run.
- [Serverless endpoints](https://agnt5.com/docs/run/serverless-endpoints.md): Build, deploy, connect, and operate AGNT5 workflows on provider-managed HTTP runtimes without a persistent worker process.
- [Operate serverless endpoints](https://agnt5.com/docs/run/operate-serverless-endpoints.md): Validate, promote, inspect, disable, recover, rotate, and roll back immutable serverless deployments.
- [Serverless support matrix](https://agnt5.com/docs/run/serverless-support-matrix.md): Compare AGNT5 serverless runtimes, hosting targets, framework adapters, test evidence, and remaining gaps.
- [Serverless protocol reference](https://agnt5.com/docs/run/serverless-protocol.md): Implement and verify the workerless.v1 manifest, signed invoke request, checkpoint, and result schemas.
- [Serverless SDK reference](https://agnt5.com/docs/run/serverless-sdk-reference.md): Define serverless components, durable steps, suspension, and events with the Python, TypeScript, and Go SDKs.

## Improve

- [Improve with AGNT5](https://agnt5.com/docs/improve/overview.md): Use production run data to create datasets, score outputs, compare candidates, and gate changes.
- [Datasets](https://agnt5.com/docs/improve/datasets.md): Curate eval datasets from production runs, manual examples, or file uploads, then publish immutable versions for experiments.
- [Scorers](https://agnt5.com/docs/improve/scorers.md): Score component outputs with built-in deterministic checks, trace assertions, LLM-as-judge presets, or your own custom scorer code.
- [Experiments](https://agnt5.com/docs/improve/experiments.md): Run a deployed component against a dataset version, score every item, compare runs, and gate CI on the results.
- [Enable online evals](https://agnt5.com/docs/improve/online-evals.md): Sample production runs, score them asynchronously, and alert when pass rate drops below a threshold.
- [Command Center](https://agnt5.com/docs/improve/command-center.md): Turn failed deployments, runs, and online evals into issues, each with an evidence-based report, the likely cause, and a fix prompt for your coding agent.
- [Batch eval](https://agnt5.com/docs/improve/batch-eval.md): Run a component against multiple inputs in parallel, score every output, and inspect aggregate results using the Python, TypeScript, or Go SDK.
- [Quality cases](https://agnt5.com/docs/improve/quality-cases.md): Track production failures, eval regressions, and behavior issues through a structured lifecycle from discovery to verified fix.

## Integrations

- [Integrations](https://agnt5.com/docs/integrations/overview.md): Connect AGNT5 to external services - model providers, event sources, and more - with credentials stored once and scoped to a workspace, project, or environment.
- [AI providers](https://agnt5.com/docs/integrations/ai-providers.md): Connect model API keys in Studio, then call provider-prefixed models from agents, prompts, and low-level generation code.
- [Sandbox providers](https://agnt5.com/docs/integrations/sandbox-providers.md): Configure sandbox provider credentials for isolated agent code execution.

## Serverless

- [Deploy a serverless endpoint to Cloudflare Workers](https://agnt5.com/docs/integrations/cloudflare-workers.md): Create a new Cloudflare Worker, connect it to AGNT5, and run a signed workflow through the deployed endpoint.
- [Deploy a serverless endpoint to Vercel](https://agnt5.com/docs/integrations/vercel-serverless.md): Deploy an AGNT5 endpoint with Next.js route handlers or the Vercel Python runtime, then activate an immutable release.
- [Deploy a serverless endpoint to Cloud Run](https://agnt5.com/docs/integrations/cloud-run-serverless.md): Generate, deploy, validate, and sync an AGNT5 serverless service on Cloud Run with Python or Go.
- [Deploy a serverless endpoint to AWS Lambda](https://agnt5.com/docs/integrations/aws-lambda-serverless.md): Package a Python AGNT5 endpoint with Lambda Web Adapter, publish an immutable version, and sync its Function URL.
- [Add AGNT5 to a Node.js server](https://agnt5.com/docs/integrations/node-serverless.md): Mount signed AGNT5 serverless routes in Node.js, Express, Fastify, or Koa and sync the deployed service.
- [Add AGNT5 to FastAPI](https://agnt5.com/docs/integrations/fastapi-serverless.md): Mount AGNT5 serverless workflows in an existing FastAPI application and sync its deployed release.
- [Integrate Python web frameworks](https://agnt5.com/docs/integrations/python-web-frameworks.md): Add AGNT5 serverless routes to FastAPI, Starlette, Flask, Django, raw ASGI, or raw WSGI applications.
- [Build a serverless endpoint in Go](https://agnt5.com/docs/integrations/go-serverless.md): Expose a typed Go workflow through AGNT5 signed HTTP dispatch without a persistent worker process.

## Event sources

- [Event sources](https://agnt5.com/docs/integrations/event-sources/overview.md): Connect Sentry, Stripe, GitHub, Slack, or any Standard Webhooks publisher so their events trigger your AGNT5 workflows.
- [Sentry](https://agnt5.com/docs/integrations/event-sources/sentry.md): Start AGNT5 workflows automatically from Sentry issues, errors, and comments.
- [Slack](https://agnt5.com/docs/integrations/event-sources/slack.md): Start AGNT5 workflows automatically from Slack messages, mentions, and reactions using the Slack Events API.

## Agent frameworks

- [OpenAI SDK](https://agnt5.com/docs/integrations/third-party/openai-sdk.md): Run agents built with the raw OpenAI SDK or the OpenAI Agents SDK inside an AGNT5 worker, with traces captured automatically.
- [Google ADK](https://agnt5.com/docs/integrations/third-party/google-adk.md): Run agents built with Google's Agent Development Kit inside an AGNT5 worker, with traces captured automatically.

## Developer tools

- [AGNT5 MCP](https://agnt5.com/docs/integrations/tools/mcp.md): Connect Claude Code, Codex, Cursor, VS Code, and other MCP clients to AGNT5 to debug runs, check deployments, and read eval and prompt results.
- [Use AGNT5 in Claude](https://agnt5.com/docs/integrations/claude-connector.md): Connect Claude to the hosted AGNT5 MCP server to inspect runs, check deployments, and work with evaluations.

## REST API

Every endpoint, with its method and path: [API reference](https://agnt5.com/docs/api-reference.md).

- [Authentication](https://agnt5.com/docs/api-reference/authentication.md): Authenticate requests to the AGNT5 API with a personal API key or a bearer token, and understand the error envelope and rate limits every endpoint shares.
- [Projects](https://agnt5.com/docs/api-reference/projects.md): List the projects your credential can access and fetch a single project's metadata, workflow count, and production deployment.
- [Environments](https://agnt5.com/docs/api-reference/environments.md): List, fetch, and create the environments a project deploys into: local, preview, staging, and production.
- [Secrets](https://agnt5.com/docs/api-reference/secrets.md): Store, list, and rotate the credentials your deployed workflows read at runtime, scoped to a project and environment.
- [Deployments](https://agnt5.com/docs/api-reference/deployments.md): List and inspect deployments, and read their logs, workers, components, and runs.
- [Workers](https://agnt5.com/docs/api-reference/workers.md): List and inspect the worker processes that execute your deployed workflows, agents, and functions.
- [Runs & Traces](https://agnt5.com/docs/api-reference/runs-and-traces.md): List workflow runs, read a run's logs, and fetch the distributed trace recorded for each run.
- [Datasets](https://agnt5.com/docs/api-reference/datasets.md): Create eval datasets, publish immutable versions, import examples from runs or CSV, and deduplicate items.
- [Experiments](https://agnt5.com/docs/api-reference/experiments.md): Create experiments, trigger runs against a dataset, and read run results, failures, and scores.
- [Scorers](https://agnt5.com/docs/api-reference/scorers.md): List and fetch the scorers a project uses to grade experiment results.
- [Quality Cases](https://agnt5.com/docs/api-reference/quality-cases.md): List, fetch, and open quality cases: tracked behavior regressions linked back to the runs, scores, and datasets that surfaced them.

## SDKs

- [SDK Overview](https://agnt5.com/sdk): Client SDKs for integrating AGNT5 into your applications
- [AGNT5 Python SDK](https://agnt5.com/sdk/python): Build durable functions, workflows, and AI agents in Python with the agnt5 package
- [Getting started](https://agnt5.com/sdk/python/getting-started.md): Create a Python AGNT5 project, run it locally with agnt5 dev, and deploy it
- [Functions](https://agnt5.com/sdk/python/functions.md): Define functions with @function, configure retries, and call them from workflows
- [Workflows](https://agnt5.com/sdk/python/workflows.md): Define workflows with @workflow, checkpoint steps, run work concurrently, keep state, and schedule runs
- [Context API](https://agnt5.com/sdk/python/context.md): The FunctionContext and WorkflowContext objects Python handlers receive — run details, steps, state, waits, logging, and progress
- [Agents](https://agnt5.com/sdk/python/agents.md): Create agents with Agent, run or stream them, hand off between agents, and use agents as tools
- [Tools](https://agnt5.com/sdk/python/tools.md): Define tools with @tool, give agents a schema from type hints, and run tools on their own
- [LM](https://agnt5.com/sdk/python/lm.md): Call language models directly with agnt5.lm — generate, stream, structured output, reasoning effort, and prompts
- [Worker](https://agnt5.com/sdk/python/worker.md): Start a Python worker, register components and agents, and connect them to AGNT5
- [Client](https://agnt5.com/sdk/python/client.md): Run components, follow runs, run batches, and evaluate components from your own Python code
- [AGNT5 TypeScript SDK](https://agnt5.com/sdk/typescript): Build durable functions, workflows, and AI agents in TypeScript with the @agnt5/sdk package
- [Getting started](https://agnt5.com/sdk/typescript/getting-started.md): Create a TypeScript AGNT5 project, run it locally with agnt5 dev, and deploy it
- [Functions](https://agnt5.com/sdk/typescript/functions.md): Define functions with fn(), configure retries and schemas, and call them from workflows
- [Workflows](https://agnt5.com/sdk/typescript/workflows.md): Define workflows with workflow(), checkpoint steps, keep state, and run child workflows
- [Context API](https://agnt5.com/sdk/typescript/context.md): The Context object every TypeScript handler receives — run details, steps, state, waits, signals, logging, and progress
- [Agents](https://agnt5.com/sdk/typescript/agents.md): Create agents with new Agent(), run or stream them, hand off between agents, and hook into the loop with callbacks
- [Tools](https://agnt5.com/sdk/typescript/tools.md): Define tools with tool() or the Tool class, give them a schema, and let agents call them
- [LM](https://agnt5.com/sdk/typescript/lm.md): Call language models directly with LM — providers, generate, stream, structured output, and prompts
- [Worker](https://agnt5.com/sdk/typescript/worker.md): Start a TypeScript worker, register components and agents, and connect them to AGNT5
- [Client](https://agnt5.com/sdk/typescript/client.md): Run components, follow runs, run batches, and evaluate components from your own TypeScript code
- [AGNT5 Go SDK](https://agnt5.com/sdk/go): Build durable functions, workflows, and AI agents in Go with the agnt5 package
- [Getting started](https://agnt5.com/sdk/go/getting-started.md): Create a Go AGNT5 project, run it locally with agnt5 dev, and deploy it
- [Functions](https://agnt5.com/sdk/go/functions.md): Register typed Go functions with RegisterFunction, configure retries and schemas, and call them from workflows
- [Workflows](https://agnt5.com/sdk/go/workflows.md): Register Go workflows, checkpoint work with Step and Task, keep state, sleep durably, and attach triggers
- [Context API](https://agnt5.com/sdk/go/context.md): The *agnt5.Context every Go handler receives — run details, state, sleep, asking people, logging, events, and model calls
- [Agents](https://agnt5.com/sdk/go/agents.md): Create Go agents with NewAgent, run them, register them, and hand off between agents
- [Tools](https://agnt5.com/sdk/go/tools.md): Define Go tools with NewTool, give them a schema, register them, and let agents call them
- [LM](https://agnt5.com/sdk/go/lm.md): Create Go model clients for OpenAI, Anthropic, Gemini, and other providers, and make a single traced language model call with ctx.Generate.
- [Worker](https://agnt5.com/sdk/go/worker.md): Create a Go worker, register every component explicitly, and connect it to AGNT5
- [Client](https://agnt5.com/sdk/go/client.md): Run components, follow runs, run batches, and evaluate components from your own Go code

## CLI

- [CLI overview](https://agnt5.com/docs/cli/overview.md): Command-line interface for developing, testing, and deploying AI workflows locally and in production
- [Install the CLI](https://agnt5.com/docs/cli/install.md): Install the AGNT5 CLI on macOS, Linux, or WSL2 with curl or Homebrew, verify the install, and sign in to your account with agnt5 auth login.
- [Project & workspace commands](https://agnt5.com/docs/cli/project.md): Reference for scaffolding, linking, listing, and inspecting AGNT5 projects, and for switching the active workspace.
- [Auth commands](https://agnt5.com/docs/cli/auth.md): Reference for logging in, logging out, and checking authentication status from the CLI.
- [Configuration](https://agnt5.com/docs/cli/configuration.md): Where the AGNT5 CLI stores credentials and settings, and how to override them with flags and environment variables
- [Context commands (advanced)](https://agnt5.com/docs/cli/context.md): Reference for switching the CLI between AGNT5 Cloud and a self-hosted (BYOC) cluster.
- [Local development commands](https://agnt5.com/docs/cli/dev.md): Reference for running an AGNT5 worker locally with hot-reload, and for the container-based development environment.
- [Run commands](https://agnt5.com/docs/cli/run.md): Reference for executing functions, workflows, tools, and agents from the CLI, and for listing registered components.
- [Inspect & logs](https://agnt5.com/docs/cli/inspect.md): Reference for inspecting execution runs, distributed traces, and logs from the CLI.
- [Deploy commands](https://agnt5.com/docs/cli/deploy.md): Reference for building, pushing, and deploying AGNT5 projects, and for monitoring the resulting deployments.
- [Secrets commands](https://agnt5.com/docs/cli/secrets.md): Reference for creating, listing, and deleting project secrets from the CLI.
- [Service key commands](https://agnt5.com/docs/cli/service-keys.md): Reference for creating, rotating, and revoking service keys used for programmatic API authentication.
- [Serverless commands](https://agnt5.com/docs/cli/serverless.md): Reference for scaffolding, validating, syncing, inspecting, and controlling AGNT5 serverless endpoints.
- [Command Center commands](https://agnt5.com/docs/cli/command-center.md): Enable, disable, and check Command Center capture for a project from the terminal or CI.
- [Eval commands](https://agnt5.com/docs/cli/evals.md): Reference for managing eval datasets, experiments, reports, and scores from the CLI.
- [All commands](https://agnt5.com/docs/cli/commands.md): Alphabetical index of every top-level agnt5 command, with a one-line summary and a link to its full reference
- [Automation & agent commands](https://agnt5.com/docs/cli/automation.md): Reference for driving the CLI from another program - MCP stdio transport, CLI schema introspection, and embedded agent guidance.
- [Troubleshooting](https://agnt5.com/docs/cli/troubleshooting.md): Diagnose installation, authentication, and deployment problems with the AGNT5 CLI

## Cookbooks

- [Build a Slack deep research bot](https://agnt5.com/cookbooks/slack-deep-research-agent.md): Mention a Slack bot, approve its research plan, and get a sourced report in the thread. AGNT5 answers Slack at once and pauses until you approve.
- [Build a standup digest for Claude/Codex](https://agnt5.com/cookbooks/standup-digest-mcp.md): Read Linear, GitHub, Slack and Google Meet notes, count in code, and let a model write only the judgment. Ask for the digest in Claude or Codex over MCP.
