Overview
Agents are the decision-makers that interact with environments to produce actions based on observations. By leveraging base agents or customizing them with wrappers, you can extend their functionality, tailor their behavior, and optimize them for specific tasks.
Basic Agents
To use an agent, start by instantiating a base agent. You can then enhance its capabilities by wrapping it with additional functionality. Wrappers provide a modular approach to integrating reasoning, debugging, and other enhancements into the decision-making process.
1# Example usage:2import textarena as ta34# Initialize the agents5agents = {6 0: ta.agents.OpenRouterAgent(model_name="GPT-4o-mini"),7 1: ta.agents.CerebrasAgent(model_name="cerebras-llm-13b"),8}
Agent Wrappers
The TextArena framework also provides wrappers for agents to help you achieve additional enhancements, such as:
- Processing observations by adding reasoning or planning before deciding actions.
- Chaining multiple agents to perform sequential tasks, where each agent builds on the output of the previous one.
- Debugging or visualizing an agent's decision-making process for better insights.
These enhancements make it easier to build sophisticated agents that can tackle complex environments and decision-making workflows seamlessly.