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
- Create an API key in the dashboard, or create
another with
POST /api/account/keysusing an existing key - Point your agent at
https://encrata.com/auth.md - Provide the API key to your agent’s configuration, for example as
ENCRATA_API_KEY
GET /api/account/credits call, and follows the docs index to find endpoints.
Provide the API key through the environment
Set the key asENCRATA_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 atauth.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
Create named keys per agent
Create named keys per agent
Give each agent its own named key so you can revoke individually without disrupting other agents:
Rotate keys periodically
Rotate keys periodically
Encrata keys don’t expire. A key works until you disable or revoke it, so rotating periodically limits blast radius if one is compromised.
Set a credit limit per key
Set a credit limit per key
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.Never paste a key into a chat
Never paste a key into a chat
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.Never commit keys to source control
Never commit keys to source control
Use environment variables or secret managers:
Monitor credit usage
Monitor credit usage
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 includesX-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