Skip to main content

Agent Config

Agent configuration controls LLM behavior in agent mode.

Configuration

Set in manifest.json:

{
"agent_config": {
"model": "anthropic/claude-3-5-sonnet-20241022",
"max_tokens": 4096,
"max_iterations": 10,
"system_prompt": "You are a helpful assistant."
}
}

Parameters

ParameterTypeDescription
modelstringLLM model (with provider prefix)
max_tokensintegerMax tokens per LLM call
max_iterationsintegerMax tool-calling iterations
system_promptstringAgent system prompt

Supported Models

Anthropic

  • anthropic/claude-3-5-sonnet-20241022
  • anthropic/claude-3-opus-20240229
  • anthropic/claude-3-sonnet-20240229
  • anthropic/claude-3-haiku-20240307

OpenAI

  • openai/gpt-4-turbo
  • openai/gpt-4
  • openai/gpt-3.5-turbo

System Prompt

The system prompt is auto-generated from your entrypoint's docstring:

@entrypoint
async def customer_support(input: dict, context: AgentContext):
"""
You are a customer support agent for Acme Corp.

Capabilities:
- Answer product questions
- Track orders
- Process refunds

Guidelines:
- Always be polite
- Verify user identity before refunds
- Escalate complex issues
"""
pass

This becomes the system_prompt in manifest.

Max Iterations

Limits the agent loop:

{"max_iterations": 10}

After 10 iterations:

  • Agent returns current state
  • Run marked as complete
  • Prevents infinite loops

Token Budget

{"max_tokens": 4096}

Limits tokens per LLM API call (not total).

Environment Variables

LLM API keys set via environment:

# Control plane .env
ANTHROPIC_API_KEY=sk-ant-...
OPENAI_API_KEY=sk-...

Or per-run:

POST /runs
{
"agent_name": "my-agent",
"llm_api_key_secret": "CUSTOM_API_KEY_SECRET"
}

Next Steps