Agent Configuration
Learn how to configure agents in your AxCrew
Agent Configuration Options
Each agent in your crew is defined by a configuration object with various properties that control its behavior. Here's a complete reference of all available configuration options:
Required Fields
| Field | Description |
|---|---|
name | A unique identifier for the agent within the crew. |
description | A clear description of what the agent does. Helps guide the AI model. |
signature | Defines the input and output structure in the format: input:type -> output:type. |
provider | The AI provider to use (e.g., "openai", "anthropic", "google-gemini"). |
providerKeyName | The name of the environment variable containing the API key. |
ai | Configuration settings for the AI model (model name, temperature, etc.). |
AI Configuration
The ai object contains settings specific to the AI model:
Agent Persona (definition/prompt)
You can customize the agent's persona using the definition or prompt field:
- definition: Detailed persona/program description used as the system prompt. Must be at least 100 characters.
- prompt: An alias for
definition. If both are provided, definition takes precedence.
Provider Arguments (providerArgs)
Some providers require extra top-level configuration beyond ai.model. Pass these via providerArgs:
AxCrew forwards providerArgs to Ax unchanged. Refer to Ax provider docs for supported fields.
Agent Dependencies
Use the agents array to specify other agents that this agent depends on:
When agents have dependencies:
- Dependencies must be initialized before the dependent agent
- The AxCrew system will automatically handle initialization order when using
crew.addAllAgents()orcrew.addAgentsToCrew() - Dependent agents have access to the capabilities of their dependencies
Signature Format
The signature defines the input and output structure for your agent. It follows this format:
For example:
This defines:
- An input named
taskof typestring - An output named
planof typestring - Descriptions for both input and output
You can have multiple inputs and outputs:
Supported Providers and Models
AxCrew supports all providers and models supported by AxLLM.
| Provider | Environment Variable | Models |
|---|---|---|
openai | OPENAI_API_KEY | gpt-4, gpt-4-turbo, gpt-3.5-turbo, etc. |
anthropic | ANTHROPIC_API_KEY | claude-3-opus, claude-3-sonnet, claude-3-haiku, etc. |
google-gemini | GEMINI_API_KEY | gemini-1.5-pro, gemini-1.5-flash, etc. |
cohere | COHERE_API_KEY | command, command-r, command-r-plus, etc. |
groq | GROQ_API_KEY | llama-3-8b-8192, llama-3-70b-8192, mixtral-8x7b-32768, etc. |
together | TOGETHER_API_KEY | Various open-source models |
mistral | MISTRAL_API_KEY | mistral-tiny, mistral-small, mistral-medium, etc. |
azure-openai | AZURE_OPENAI_API_KEY | Azure-hosted OpenAI models |
Complete Configuration Example
Here's a complete example of a crew with multiple agents: