Configuration
Configuration
Section titled “Configuration”Agent Adapter is configured via a YAML file (agent-adapter.yaml). This page covers the main configuration sections.
Agent Configuration
Section titled “Agent Configuration”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.015Capability Sources
Section titled “Capability Sources”capabilities: source: type: "openapi" # openapi | mcp | manual url: "https://api.example.com/openapi.json" # For OpenAPI # server: "http://localhost:3001" # For MCPFor manual capability definitions, see Capabilities.
Payment Rails
Section titled “Payment Rails”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 Configuration
Section titled “Wallet Configuration”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 Server
Section titled “Management Server”management: port: 8080 # Dashboard and API port host: "0.0.0.0"Environment Variables
Section titled “Environment Variables”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.
System Prompt Customization
Section titled “System Prompt Customization”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 30Set 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.