Quick Start
from agentx import AgentX
client = AgentX(api_key="your-key") # or AgentX.from_env()
def my_agent(case):
return f"Answer to: {case.query}"
report = (
client.evaluations
.run(
dataset_id="existing-dataset-id",
subject={"kind": "custom_agent", "displayName": "My Agent", "framework": "raw_python"},
)
.execute(my_agent)
.finalize()
.analyze()
)
print(f"Average rating: {report.average_rating:.2f}")
print(f"Dashboard: {report.dashboard_url}")Environment variables Variable
| Variable | Description |
|---|---|
AGENTX_API_KEY | Required. Your AgentX API key. |
AGENTX_API_BASE_URL | Optional. Override the API base URL (useful for local dev). |
You can also pass base_url directly to the constructor:
# Point at your local dev server
client = AgentX(api_key="your-key", base_url="http://localhost:3000/api/v1/custom-agent-evaluations")Updated about 8 hours ago
