Skip to main content
This guide shows you how to point your AI agent at Encrata’s auth.md and configure it for autonomous operation. Whether you’re building a custom agent, using an orchestration framework, or configuring an AI coding tool, the setup is the same.

Quick start

  1. Create an API key in the dashboard, or create another with POST /api/account/keys using an existing key
  2. Point your agent at https://encrata.com/auth.md
  3. Provide the API key to your agent’s configuration, for example as ENCRATA_API_KEY
The agent reads the file, verifies the key with the free GET /api/account/credits call, and follows the docs index to find endpoints.

Provide the API key through the environment

Set the key as ENCRATA_API_KEY where your agent runs, and have your code read it from there. Never hard-code the key, and never paste it into a chat with the agent.

Give the agent the API contract

Point your agent at auth.md and provide the API key through its secret or environment configuration. Never give the agent your Encrata password.

System prompt example

Framework integration

Encrata works in any agent framework, such as LangChain, LlamaIndex, CrewAI, or Haystack, through the REST API. See AI onboarding for a tool you can register with any of them.

Custom agent

Key management best practices

Give each agent its own named key so you can revoke individually without disrupting other agents:
Encrata keys don’t expire. A key works until you disable or revoke it, so rotating periodically limits blast radius if one is compromised.
Keys have no permission scopes, and all keys share the account’s credits. Set a credit limit on each key so one agent can’t drain the balance. Once a key reaches its limit, its requests return 402.
Give the agent the key through ENCRATA_API_KEY, not through the chat. A pasted key ends up in the transcript, in shared logs, and with the model provider. If one is pasted by mistake, revoke it under API Keys and set a new one as ENCRATA_API_KEY.
Use environment variables or secret managers:
Set up alerts when credits drop below a threshold. Your agent should check GET /api/account/credits before batch operations.

Rate limits

Requests are limited to 200 per minute per account, shared by every key. Every response includes X-Ratelimit-Limit, X-Ratelimit-Remaining, and X-Ratelimit-Reset. On a 429, wait X-Ratelimit-Reset seconds, then retry, up to 3 attempts. 429 responses don’t include a Retry-After header. See Rate limits for the current limit, headers, and retry guidance.

Monitoring agent activity

All API calls made with your key are logged in your dashboard. You can:
  • See which endpoints your agent called
  • Track credit consumption over time
  • Identify unusual patterns
  • Revoke a key instantly if needed