Creating an Agent
The simplest agent just needs a name:Configuration Options
Agents accept many configuration options:Running an Agent
Use theprocess method to run an agent:
Model Selection
Specify which LLM the agent uses:gcp/gemini-flash-latest.
Instructions vs Description
description: Short summary for external use (shown when agent is used as a tool)instructions: Full system prompt for the agent’s behavior
Iteration Limits
Themax_iterations parameter prevents infinite loops:
Verbose Mode
Enable verbose mode to see what the agent is doing:- When the agent starts thinking
- Which tools it calls and with what arguments
- Tool results
- When it completes
Agent Context
During execution, the agent maintains context that tracks:- Session ID: Unique identifier for this execution
- Iteration: Current loop iteration
- Execution history: All think/act cycles
- Usage: Token counts and costs
- Tool calls: Record of all tool invocations
Next Steps
Tools
Add capabilities to your agent
Schemas
Type-safe inputs and outputs