Index
ipw.agents
¶
Agent harnesses for benchmarking LLM-powered agents.
Provides BaseAgent ABC and agent implementations (ReAct, OpenHands, Terminus) with integrated MCP tool support and energy telemetry.
BaseAgent
¶
Base class for all agents with optional MCP tool and telemetry support.
Source code in intelligence-per-watt/src/ipw/agents/base.py
__init__(mcp_tools=None, event_recorder=None)
¶
Initialize the agent.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
mcp_tools
|
Optional[dict[str, 'BaseMCPServer']]
|
Optional dictionary of MCP server instances for tool access. |
None
|
event_recorder
|
Optional['EventRecorder']
|
Optional EventRecorder for per-action energy telemetry. |
None
|
Source code in intelligence-per-watt/src/ipw/agents/base.py
run(input, **kwargs)
¶
Run the agent.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
input
|
str
|
The input message or prompt for the agent. |
required |
**kwargs
|
Any
|
Additional keyword arguments. |
{}
|
Returns:
| Type | Description |
|---|---|
Any
|
The output from the agent. |
Raises:
| Type | Description |
|---|---|
NotImplementedError
|
Subclasses must implement this method. |
Source code in intelligence-per-watt/src/ipw/agents/base.py
AgentRegistry
¶
Bases: RegistryBase[Type['BaseAgent']]
Registry for agent harnesses.