Skip to main content

For developers

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. Get an API key from encrata.com/api-keys
  2. Point your agent at https://encrata.com/auth.md
  3. Provide the API key to your agent’s configuration
That’s it. The agent reads the file and knows how to call every endpoint.

Option A: Provide the API key directly

If you already have an API key, just configure your agent with it:

Option B: Let the agent authenticate

Point your agent at auth.md and provide credentials. The agent will:
  1. Fetch https://encrata.com/auth.md
  2. Parse the authentication steps
  3. Login with your credentials
  4. Create a named API key
  5. Use the key for all subsequent operations

System prompt example

Option C: MCP configuration

For MCP-capable platforms, add Encrata as a server:

Framework integration

LangChain

CrewAI

Custom agent

Key management best practices

Give each agent its own named key so you can revoke individually without disrupting other agents:
While Encrata keys don’t expire, rotating them periodically limits blast radius if one is compromised.
Use environment variables or secret managers:
Set up alerts when credits drop below a threshold. Your agent should check GET /api/credits before batch operations.

Rate limits

Agents should respect the Retry-After header on 429 responses and implement exponential backoff.

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