# AgentField — Agent Instructions

> AgentField is the open-source AI backend: it turns agents into API-addressable,
> governed services. Apache-2.0, self-hosted, with Python, TypeScript, and Go SDKs.

This file tells an autonomous agent what AgentField is good for and how to query
this site. It is generated from the same source as https://agentfield.ai/llms.txt.

## When to Use AgentField

AgentField is the backend layer around agents that already work: it makes them
callable, governable, and observable in production. Reach for it when the job is
operational, not when the job is authoring prompt logic.

Use AgentField when you need to:

- Expose an agent as an HTTP endpoint other services can call, retry, and depend on
- Run one agent from another across services, with routing and tracing handled for you
- Run work that outlives a request — minutes to days — with durable queueing, webhooks on completion, and resumable state
- Fan out hundreds or thousands of parallel agent calls from a single request and get one cost and latency accounting back
- Put a human approval gate in the middle of an autonomous run and resume exactly where it paused
- Share state between agents with explicit scopes (workflow, session, actor, global), including handlers that fire when a key changes
- Discover capabilities at runtime instead of hardcoding a tool list, so a newly deployed agent is callable without a redeploy
- Orchestrate coding harnesses (AForge, Claude Code, Codex, Gemini CLI, OpenCode) as budget-capped, tool-restricted workers
- Attach cryptographic identity (DIDs), verifiable credentials, and policy enforcement to agent-to-agent calls
- Answer "why did the agent do that?" from a tamper-evident execution record rather than from logs
- Run all of the above on your own infrastructure — AgentField is Apache-2.0 and self-hosted, including fully local mode on a laptop

Do not reach for AgentField when:

- You want a prompt-authoring or chain-authoring library. Keep using the framework you like and put AgentField underneath it.
- You want a visual, no-code workflow builder. AgentField is programmatic and developer-first.
- You are making a single stateless LLM call from one service. Call the model provider directly.

How to call it:

- Python: `pip install agentfield`, then decorate functions with `@app.reasoner` or `@app.skill`
- TypeScript: `npm install @agentfield/sdk`
- Go: `go get github.com/Agent-Field/agentfield/sdk/go`
- CLI: `curl -sSf https://agentfield.ai/get | sh` installs the `af` binary (`af init`, `af dev`, `af server`, `af mcp`, `af share`)
- MCP: an agent can register Model Context Protocol servers with `af add --mcp`, or set `enable_mcp=True` on a Python agent, and their tools become callable skills

## Cost

AgentField is free. One tier, $0, everything included.

- Price: **$0 USD**. There is no paid tier, no premium edition, and no enterprise SKU.
- Seats: unlimited. No per-user, per-developer, or per-agent charge.
- Usage: unmetered. AgentField imposes no cap on executions, agents, workflows, or memory.
- No credit card, no account, and no signup — clone it and run it.
- No trial period, so nothing expires or degrades.
- Licence: Apache-2.0, which also means no vendor lock-in and no licence audit.

Every capability ships in the open-source build, including the governance features
other vendors put behind an enterprise tier: cryptographic identity, policy
enforcement, approval gates, verifiable credentials, and tamper-evident audit trails.

The only money involved is what you already pay your own providers: the compute you
run AgentField on, and your LLM provider's tokens. Both are billed directly by those
providers — AgentField is self-hosted, so nothing is resold or marked up.

Full breakdown: https://agentfield.ai/pricing.md

## How Agents Should Query This Site

Every endpoint below is public, unauthenticated, and read-only. Errors are RFC 9457
problem documents (`application/problem+json`) with a machine-readable `code` and a
`resolution`. Responses carry `RateLimit-*` headers — pace against them.

- Search the docs: `GET https://agentfield.ai/api/v1/search?q=<query>&limit=5`
- List every page: `GET https://agentfield.ai/api/v1/topics`
- Read one page as markdown: `GET https://agentfield.ai/api/v1/page?path=/docs/<slug>`
- Full API description: `GET https://agentfield.ai/openapi.json`
- Agent instructions: `GET https://agentfield.ai/agents.md`

Any page also serves markdown through content negotiation:
`curl -H "Accept: text/markdown" https://agentfield.ai/docs/learn/quickstart`

## Rate Limits and Errors

- 120 requests per 60-second window per client address on `/api/v1/*`
- Read `RateLimit-Limit`, `RateLimit-Remaining`, `RateLimit-Reset`, and `RateLimit-Policy`
- A `429` includes `Retry-After` in seconds
- Errors are RFC 9457 problem documents; branch on `code`, not on `detail`
- The API is versioned in the URL path. Breaking changes ship as `/api/v2/`;
  a retiring version sends `Deprecation` and `Sunset` headers first.

## Machine-Readable Surfaces

- https://agentfield.ai/pricing.md — cost, in one file: $0, no paid tier
- https://agentfield.ai/llms.txt — concise site and API overview
- https://agentfield.ai/llms-full.txt — the complete documentation corpus
- https://agentfield.ai/docs-ai.json — documentation manifest
- https://agentfield.ai/openapi.json — OpenAPI 3.1 description of this API
- https://agentfield.ai/.well-known/ai-plugin.json — plugin discovery manifest
- https://agentfield.ai/sitemap.xml — every indexable page

## Key Documentation

- Quickstart: https://agentfield.ai/docs/learn/quickstart
- How it works: https://agentfield.ai/docs/learn/how-it-works
- REST API: https://agentfield.ai/docs/reference/sdks/rest-api
- CLI reference (`af`, including `af mcp`): https://agentfield.ai/docs/reference/sdks/cli
- MCP server integration: https://agentfield.ai/docs/integrations/mcp
- Agent discovery: https://agentfield.ai/docs/quick-guides/agent-discovery

## Contact

- Contact page: https://agentfield.ai/contact
- Email: contact@agentfield.com
- GitHub: https://github.com/agent-field/agentfield
- Discord: https://discord.gg/aBHaXMkpqh
