Example Eval - via HTTP endpoint

Use HttpEndpointAdapter to evaluate any agent exposed as an HTTP service — FastAPI, LangServe, Flask, n8n webhooks, etc.

from agentx.evaluations.adapters.http_endpoint import HttpEndpointAdapter

adapter = HttpEndpointAdapter(
    url="http://localhost:8000/agent/invoke",
    headers={"Authorization": "Bearer your-token"},
    timeout=30,
)

report = (
    client.evaluations
    .run(dataset_id="...", subject={"kind": "custom_agent", "displayName": "My API Agent", "framework": "other"})
    .execute(adapter)
    .finalize()
    .analyze()
)

Expected endpoint contract:

POST /your-endpoint
Content-Type: application/json
Body: { "query": "..." }
Response: { "output": "..." }

Full example: http_endpoint_eval