You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: examples/README.md
+6Lines changed: 6 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -119,6 +119,12 @@ The zero-code and SDK examples implement the same toy agent (dice rolling + prim
119
119
|---------|-------------|
120
120
|[kubernetes/](./kubernetes/)| Deploy agentevals with kagent on Kubernetes using native OTLP gRPC ingestion (or optionally an OTel Collector). Includes a walkthrough for comparing two kagent agents (different models) and evaluating them with tool trajectory and response match scores. |
121
121
122
+
## Custom result sinks
123
+
124
+
Plugins can deliver run results (partial metrics, final summary, errors) to arbitrary backends alongside the database. Install a package that declares `[project.entry-points."agentevals.sinks"]`, restart agentevals, then reference the plugin’s `kind` in `spec.sinks` on `POST /api/runs`.
125
+
126
+
See [custom_sink/README.md](./custom_sink/README.md) for a minimal setuptools plugin and configuration examples.
This folder is a tiny installable Python package that registers a result **sink** with agentevals via setuptools **entry points**. The worker fans out partial/final/error events to every configured sink in addition to the database.
4
+
5
+
## What gets implemented
6
+
7
+
-**`DemoNdjsonSink`** — subclasses `ResultSink` from `agentevals.run.sinks` and appends one JSON object per line to `path` from the run spec (same pattern as the built-in `file` sink, with a `"demo": true` marker on each line).
8
+
-**`create_demo_sink(spec)`** — factory callable; must accept the full sink dict from the run spec and return a `ResultSink` (see return type in code).
9
+
10
+
The entry point **name** (`demo_ndjson` in `pyproject.toml`) is the **`kind`** string clients put under `spec.sinks`.
11
+
12
+
## Install (local dev)
13
+
14
+
From the agentevals repo root, install the framework first, then this example:
15
+
16
+
```bash
17
+
uv pip install -e .
18
+
uv pip install -e examples/custom_sink
19
+
```
20
+
21
+
Restart the agentevals process so `importlib.metadata` picks up the new distribution.
22
+
23
+
PyPI-style usage is the same: depend on `agentevals-example-custom-sink` next to `agentevals-cli`, install both into the server environment, restart.
24
+
25
+
## Configure runs
26
+
27
+
Async runs are submitted with **`POST /api/runs`**. Put your sink in **`spec.sinks`** (requires Postgres storage — see main docs).
28
+
29
+
Example body (use **absolute**`path` on the host where the agentevals process runs when possible). **`path` must be a file path** (e.g. `/tmp/demo.ndjson`). If `path` is an **existing directory** (including `"."` for the process working directory), output goes to `<path>/agentevals-demo-sink.ndjson`, or `<path>/<filename>` if you add an optional `"filename"` field next to `path` in the sink dict.
30
+
31
+
The `inline` object must contain real trace data (Jaeger JSON or OTLP), not an empty object.
0 commit comments