AI Agent Integration
Discovery documents and guidance for integrating Claret with AI agents.
The Claret API publishes machine-readable discovery documents so AI agents and tools can learn the API surface automatically. All three are served from the Claret application host.
Discovery documents
OpenAPI spec
https://plan.claret.app/api/docs/api.json
Full machine-readable API description (paths, parameters, schemas).
Interactive docs
https://plan.claret.app/api/docs
Human-browsable rendering of the OpenAPI spec.
llms.txt
https://plan.claret.app/api/docs/llms.txt
Compact, plain-text orientation for LLMs.
AI plugin manifest
https://plan.claret.app/.well-known/ai-plugin.json
Plugin descriptor pointing to the OpenAPI spec and auth method.
OpenAPI specification
The spec is generated directly from the application, so it always reflects the deployed endpoints. Point any OpenAPI-aware tool (code generators, agent frameworks, API explorers) at https://plan.claret.app/api/docs/api.json.
llms.txt
A short plain-text summary an agent can read to orient itself quickly — authentication model, base URL, response envelope, and error format. Fetch it from https://plan.claret.app/api/docs/llms.txt.
AI plugin manifest
The .well-known/ai-plugin.json manifest follows the AI plugin convention. It declares Bearer authentication and links to the OpenAPI spec:
{
"schema_version": "v1",
"name_for_model": "claret_api",
"description_for_model": "Claret is a multi-tenant SaaS platform for business planning and operational management. Use this API to query items, sales, inventory, and other business data.",
"auth": { "type": "service_http", "authorization_type": "bearer" },
"api": { "type": "openapi", "url": "https://plan.claret.app/api/docs/api.json" },
"contact_email": "help@claret.app"
}Provisioning a token for an agent
An agent authenticates exactly like any other client: with a Bearer token (see Authentication). Provision it deliberately:
Create a token from API Access → Tokens scoped to only what the agent needs — usually Read (
public_api.read) for a data-querying agent.Set a sensible expiration so an unattended agent's token doesn't live forever.
Supply the token to the agent through a secret, never in a prompt or source file.
Designing agent-friendly calls
Start at
llms.txt, then load the OpenAPI spec for full parameter detail.Read
meta.credits.remainingon responses so an agent can stay within budget. See API Credits & Usage.Respect
Retry-Afteron429responses rather than retrying immediately. See Rate Limiting.Use
dry_runon write and compute calls when an agent is uncertain about a payload; it validates without consuming credits or changing data.
Related documentation
Last updated
Was this helpful?