Skip to main content

What it is

The agentsfleet API lets your software create, inspect, and control fleets. Send requests to https://api.agentsfleet.net. The linked OpenAPI file describes every path, request body, response, and status code.

Why it exists

Use the API when a script or service needs direct access. Use the command-line client for interactive terminal work.

How it behaves

Most paths accept a bearer token in the Authorization header. Tenant API keys start with agt_t and are shown once when created. Interactive users sign in with agentsfleet login. Login saves a durable command-line credential that starts with afc_. The credential resolves to the person who signed in. GET /v1/users/me returns your identity, tenant, credential type, and scopes. It requires authentication but no particular scope. Use it to check whether a credential still works. The credential stays valid until a logout, a newer login from the same computer, or a dashboard revoke ends it. Browser session tokens use the identity provider’s published signing keys. Keys refresh after six hours. If the provider is unavailable, previously confirmed keys remain usable for at most fifteen more minutes. After that ceiling, session verification returns HTTP 503 with UZ-AUTH-004 until a refresh succeeds. Token expiry still applies throughout. Webhook and connector paths use provider signatures instead of bearer tokens. The OpenAPI security section on each operation states the required method. To list fleets, copy <WORKSPACE_ID> from agentsfleet workspace list. Replace <API_KEY> with a key that has fleet:read access to that workspace. Create keys under Settings → API keys in the dashboard.
A successful response contains items, total, and next_cursor. These values depend on your workspace. A fake or expired key returns an authentication error. Errors use the HTTP problem details format. Each product error includes an error_code, a request_id, and a documentation URL. Identifiers use version 7 Universally Unique Identifiers (UUIDs). Timestamps are Request for Comments (RFC) 3339 strings in Coordinated Universal Time (UTC), such as 2026-10-17T18:06:49.123Z. A whole second has no fraction, as in 2026-10-17T18:06:49Z. Compare timestamps after parsing them, because text order is not time order. A timestamp you send may use any RFC 3339 offset. It may carry at most millisecond precision; a finer value is refused. Money amounts are whole nanodollars, written as decimal strings. One United States (US) dollar is "1000000000". Every field whose name contains _nanos uses this form, including balances, charges, event costs, and model rates. Except for the balance below, a nanodollar string holds digits only, with no sign, no leading zero, and no decimal point. It matches ^(0|[1-9][0-9]*)$ and never exceeds "9223372036854775807". Add amounts with integer arithmetic, such as JavaScript BigInt. Floating-point numbers lose precision past 2^53. balance_nanos from GET /v1/tenants/me/billing can be negative when settled usage exceeds your credit. It matches ^(0|-?[1-9][0-9]*)$, from "-9223372036854775808" through "9223372036854775807". Zero is always "0", never "-0".

Limits

The request line and headers can use up to 16 KiB. The server refuses larger header blocks before API routing. Clients may receive HTTP 431 or a closed connection. Reduce credentials, cookies, or forwarding headers before retrying. Rate limits apply per workspace. A limited request includes Retry-After; wait for that delay before retrying. Streaming activity uses Server-Sent Events (SSE). A stream can return UZ-API-002 when the service cannot accept another subscriber.