Working with AI Agents

Give an AI assistant access to your farm in one step: the Connect AI agent button creates a farm-scoped token and a ready-to-paste prompt, and the API documents itself from there.

An AI assistant can read and, if you allow it, update your farm through the Developer API. Every.Farm is built so the agent needs only two things from you, a token and a base address, and finds everything else by itself.

#Connect an agent in one step

  1. Open your farm and click Connect AI agent in the top-left, next to the farm name. It is also in the Plugins drawer.
  2. Choose Read only (recommended) or Read and write.
  3. Click Create token. The token is restricted to this farm and expires in 90 days unless you choose otherwise. It is shown once.
  4. Click Copy agent prompt and paste it into your assistant. Or click Copy for MCP to get a configuration snippet for Claude Desktop, Claude Code or Cursor.

The prompt contains the token, the API address, your farm id, how many blocks and datasets it has, and where the documentation lives. From there the agent can discover every endpoint on its own.

Owners, Administrators and Editors can connect agents. Revoke a token any time from the same drawer or from API Tokens in your account menu.

#What the agent can do

Access Allowed Never allowed
Read only List and read farms, blocks, datasets and their GeoJSON, collectors and datapoints, satellite analyses, missions, robot events Any change
Read and write Everything above, plus: add datapoints, create and update datasets and folders, create block headers and values, run satellite analyses, create draft missions, acknowledge alerts Publish a mission, command a robot, permanently delete data, reach any other farm

Tokens are tied to your account's role on the farm, so an agent can do at most what you can do, and only on the farm you chose.

#How the agent finds its way

  • GET https://api.every.farm/v1 (no auth) lists every endpoint with a link to its documentation section.
  • GET /v1/docs?endpoint=METHOD /v1/path returns one endpoint's documentation as markdown with request and response examples.
  • /v1/openapi.json describes the whole API in OpenAPI 3.1 for tool loaders.
  • Every error includes a documentation link for the endpoint that failed, so a wrong call corrects itself.
  • The public Crop Picker API needs no token; it is listed in the manifest with its own OpenAPI at /v1/crop-picker/openapi.json.

See the MCP server page for the typed-tools route, which is the better choice when your assistant supports it.

#Good practice

  • Use read-only tokens unless the agent has a job that needs writes.
  • One token per agent, named for it, so you can revoke one without affecting the others.
  • Tokens that never expire are convenient and risky. Prefer 90 days for agents you run yourself and 30 for anything shared.
  • The prompt contains the token. Treat the pasted conversation as you would a password.

Updated

Something missing or out of date? Tell us — the docs are updated with every release.