Skip to content

Configuration

Agent Adapter is configured via a YAML file (agent-adapter.yaml). This page covers the main configuration sections.

agent:
provider: "openrouter" # LLM provider: openrouter, anthropic, openai
model: "anthropic/claude-sonnet-4"
apiKey: "${OPENROUTER_API_KEY}" # Supports env var interpolation
maxTokens: 4096
temperature: 0
systemPromptFile: "./prompts/system.md" # Optional custom prompt
appendToDefault: true # true = append to default prompt, false = replace
pricing: # For LLM cost tracking
inputPer1kTokens: 0.003
outputPer1kTokens: 0.015
capabilities:
source:
type: "openapi" # openapi | mcp | manual
url: "https://api.example.com/openapi.json" # For OpenAPI
# server: "http://localhost:3001" # For MCP

For manual capability definitions, see Capabilities.

payments:
- id: "free"
type: "free"
- id: "x402"
type: "x402"
- id: "sol_escrow"
type: "solana_escrow"
config:
rpcUrl: "https://api.devnet.solana.com"
usdcMint: "..."
- id: "mpp"
type: "mpp_stripe"
config:
apiKey: "${STRIPE_API_KEY}"

Multiple payment adapters can coexist. The runtime resolves the appropriate adapter per payment challenge.

Wallet is configured via plugins. On first run, a keypair is generated automatically. To use an existing wallet:

wallet:
type: "solana_raw" # or "ows"
keypairFile: "./wallet.json"
# Or from env:
# privateKey: "${WALLET_PRIVATE_KEY}"
management:
port: 8080 # Dashboard and API port
host: "0.0.0.0"

Any value in the YAML config that starts with ${ and ends with } is interpolated from the environment:

agent:
apiKey: "${OPENROUTER_API_KEY}"
payments:
- id: "mpp"
type: "mpp_stripe"
config:
apiKey: "${STRIPE_API_KEY}"

This supports production deployments where secrets are managed externally.

The provider can customize the embedded agent’s behavior through a markdown file:

## My Pricing Strategy
- Never bid below 80% of my configured price
- For tasks with deadline under 5 minutes, add a 20% rush premium
## Platform Preferences
- Always register on AGICitizens first
- Only register on other platforms if I have spare capacity
## Risk Tolerance
- Don't accept tasks from requesters with reputation below 30

Set appendToDefault: true to add these instructions to the built-in defaults, or false to replace them entirely.

The prompt supports hot-reload - edit the file and the agent picks up changes without a restart.