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
<imgsrc="https://raw.githubusercontent.com/marcusschiesser/agentpond/main/docs/assets/agentpond-logo-gpt-image.png"alt="AgentPond - trace analytics for AI agents"width="720">
2
+
<imgsrc="https://raw.githubusercontent.com/marcusschiesser/agentpond/main/docs/assets/agentpond-logo-gpt-image.png"alt="AgentPond — private trace storage and local analytics for AI agents"width="720">
3
3
</p>
4
4
5
-
AgentPond is a data pond for AI agent traces and human annotations with a agent-native CLI for local analytics. It accepts Langfuse SDK ingestion and its using the same data format, so you can use it as a drop-in replacement.
5
+
<palign="center">
6
+
<strong>Store agent traces remotely. Analyze them locally. Keep control of the data.</strong>
7
+
</p>
8
+
9
+
AgentPond is a lightweight, self-hosted trace backend and CLI for AI agents. It accepts traces from Langfuse SDKs and OTLP, stores raw events in S3-compatible object storage, and syncs them into a local DuckDB cache for fast analysis.
10
+
11
+
It is designed for AI projects that want to:
12
+
13
+
- keep production traces and human annotations in their own infrastructure
14
+
- inspect traces through a CLI or SQL
15
+
- let coding agents analyze failures and propose regression tests
16
+
- avoid operating a full observability platform
17
+
18
+
AgentPond provides Langfuse-compatible ingestion endpoints, so supported Langfuse SDK integrations can send traces to AgentPond by changing their base URL and credentials.
19
+
20
+
> AgentPond is an alternative ingestion backend, not a replacement for the complete Langfuse product. It does not provide Langfuse's web UI, prompt management, datasets, or evaluation workflows.
21
+
22
+
## How it works
23
+
24
+
```mermaid
25
+
flowchart LR
26
+
A[Agent or application] --> B[Langfuse SDK or OTLP]
27
+
B --> C[AgentPond ingestion service]
28
+
C --> D[S3-compatible object storage]
29
+
D -->|agentpond sync| E[Local DuckDB cache]
30
+
E --> F[CLI and SQL]
31
+
F --> G[Developers and coding agents]
32
+
```
33
+
34
+
S3-compatible object storage is the source of truth. The local DuckDB database is a rebuildable cache optimized for fast analytical queries.
35
+
36
+
This gives you durable remote storage without requiring an always-on analytical database. Developers and coding agents can sync the latest production data, query it locally, identify recurring failures, and use those findings to improve the agent.
6
37
7
-
It is for AI projects that want to privately store valuable traces, analyze them automatically with a coding agent, and avoid operating a Kubernetes cluster or sending trace data to a public cloud. You just need a S3-compatible object storage with a serverless ingestion service.
38
+
## Features
8
39
9
-
Events from the object storage are synced into a local DuckDB cache for fast analytical queries of your production agent data. Coding agents use these queries to generate regression tests and improvements of your agents.
40
+
- Langfuse-compatible ingestion endpoints for SDK and OTLP traces
41
+
- S3-compatible raw event storage
42
+
- Manifest-based discovery and incremental synchronization
43
+
- Local DuckDB cache containing:
44
+
-`events_raw`
45
+
-`traces`
46
+
-`observations`
47
+
-`scores`
48
+
-`sessions`
49
+
- CLI commands to create, list, and inspect traces, observations, sessions, and scores
50
+
- Human annotations represented as scores
51
+
- Custom SQL queries against synchronized trace data
10
52
11
-
## Scope
53
+
## Intentional non-goals
12
54
13
-
AgentPond focuses on collecting and analysing agent traces:
55
+
AgentPond deliberately does not include:
14
56
15
-
- Langfuse-compatible ingestion endpoints for SDK traces and OTLP traces
16
-
- S3-compatible raw event storage with manifest-based discovery
17
-
- Local DuckDB cache with `events_raw`, `traces`, `observations`, `scores`, and `sessions`
18
-
- CLI commands to create list/read traces, observations, scores (e.g. annotations), and to run custom SQL
57
+
-**A web UI:** developers and coding agents interact with the CLI and SQL
58
+
-**Always-on databases:** no Postgres, ClickHouse, or Redis
59
+
-**Background processing infrastructure:** no worker queues
60
+
-**Prompt or dataset management:** prompts, test cases, and generated evaluations can remain in your Git repository
61
+
-**Hosted trace storage:** you choose and control the object-storage infrastructure
19
62
20
-
Compared to Langfuse there's no:
21
-
- Web UI: Your coding agent talks directly to the CLI
22
-
- Postgres, ClickHouse, Redis or background queues: Simplified infrastructure by just using S3 with one ingestion service
23
-
- Prompts, datasets, evals: Let your coding agent generate and store them in GitHub
63
+
A full observability platform is a better choice when you need shared dashboards, hosted evaluation workflows, or non-technical team access.
24
64
25
-
## Getting Started
65
+
AgentPond is intended for projects whose main requirement is private, durable trace storage with programmable local analysis.
66
+
67
+
## Quick start
26
68
27
69
### Prerequisites
28
70
29
-
Install the AgentPond CLI from npm:
71
+
You need:
72
+
73
+
- Node.js and npm
74
+
- Docker with Docker Compose
75
+
76
+
Install the AgentPond CLI:
30
77
31
78
```sh
32
79
npm install -g agentpond
33
80
```
34
81
35
-
Start MinIO (S3-compatible storage) and the ingestion service:
82
+
Start the local MinIO object store and AgentPond ingestion service:
36
83
37
84
```sh
38
85
docker compose up --build
39
86
```
40
87
41
-
### Test the CLI
88
+
### Configure the CLI
42
89
43
-
Configure the CLI for the local MinIO endpoint:
90
+
Configure AgentPond to use the local MinIO instance:
> Note: The CLI is directly accessing the remote object storage
99
+
> The CLI accesses S3-compatible object storage directly. The credentials above are for local development only.
100
+
101
+
### Create and query a trace
53
102
54
103
Create a test trace directly through the CLI:
55
104
@@ -63,77 +112,115 @@ agentpond traces create \
63
112
--output '{"answer":"The bank declined the authorization. Please try another card or contact your bank."}'
64
113
```
65
114
66
-
Sync S3 data into DuckDB and query it:
115
+
Synchronize the stored events into the local DuckDB cache:
67
116
68
117
```sh
69
118
agentpond sync
119
+
```
120
+
121
+
Inspect the synchronized data:
122
+
123
+
```sh
70
124
agentpond traces list
71
125
agentpond sql "select id, name, session_id from traces"
72
126
```
73
127
74
-
For the full command reference, see [CLI usage](./docs/cli.md).
128
+
For the complete command reference, see [CLI usage](./docs/cli.md).
75
129
76
-
### Test Ingestion
130
+
##Send traces from a Langfuse SDK
77
131
78
-
AgentPond's ingestion service is using the same API as Langfuse. To point a Langfuse SDK to the AgentPond service started in the prerequisites, set these environment variables:
132
+
AgentPond implements Langfuse-compatible ingestion endpoints. To send traces to the local service, configure your Langfuse SDK with:
79
133
80
134
```sh
81
135
export LANGFUSE_BASE_URL=http://localhost:3030
82
136
export LANGFUSE_PUBLIC_KEY=pk-agentpond
83
137
export LANGFUSE_SECRET_KEY=sk-agentpond
84
138
```
85
139
86
-
Then you can use the normal Langfuse SDK setup for your language and framework.
140
+
You can then use the normal Langfuse SDK integration for your language or framework.
141
+
142
+
See the [Langfuse SDK overview](https://langfuse.com/docs/observability/sdk/overview) for SDK installation and instrumentation instructions.
143
+
144
+
### Example projects
145
+
146
+
The repository contains matching Python and TypeScript examples. Each example emits:
87
147
88
-
We provide matching Python and TypeScript examples using the Langfuse SDK. Both send one realistic trace with generation cost details and one human annotation score. To keep dependencies simple, the examples do not call an LLM; they directly call the Langfuse SDK with fixture inputs, outputs, usage, and cost data. To run the Python example with `uv`:
148
+
- one trace
149
+
- one generation observation with usage and cost data
150
+
- one human annotation score
151
+
152
+
The examples use fixture data and do not call an LLM, so no model-provider API key is required.
153
+
154
+
Run the Python example with `uv`:
89
155
90
156
```sh
91
157
uv run --project examples/python python examples/python/send_traces.py
92
158
```
93
159
94
-
Run the TypeScript SDK example:
160
+
Run the TypeScript example:
95
161
96
162
```sh
97
163
pnpm --dir examples/typescript start
98
164
```
99
165
100
-
Each example prints the trace ID it created and the `agentpond` commands to inspect trace, observations, and human annotation score. Call them to analyze the generated trace.
166
+
Each example prints the generated trace ID and the corresponding `agentpond` commands for inspecting its trace, observations, and annotation score.
101
167
102
-
To add AgentPond to your own project, add the latest Langfuse SDK, the docs are here:
Install the latest Langfuse SDK for your language and configure it to point to your AgentPond deployment:
105
171
106
-
Make sure to set the `LANGFUSE_BASE_URL`, `LANGFUSE_PUBLIC_KEY` and `LANGFUSE_SECRET_KEY` variables in your project to point to a deployment of the [ingestion containers](./docker-compose.yml) in your own infrastructure.
Deploy the [ingestion service](./docker-compose.yml) in your infrastructure and configure it to use your S3-compatible object store.
179
+
180
+
For production deployments, replace all example credentials, use TLS, and give the ingestion service and CLI only the object-storage permissions they require.
107
181
108
182
## Configuration
109
183
110
-
The ingestion service and CLI read environment variables:
184
+
The ingestion service and CLI use the following environment variables:
111
185
112
186
```sh
187
+
# Project
113
188
AGENTPOND_PROJECT_ID=default-project
189
+
190
+
# Ingestion authentication
114
191
LANGFUSE_PUBLIC_KEY=pk-agentpond
115
192
LANGFUSE_SECRET_KEY=sk-agentpond
193
+
194
+
# Object storage
116
195
AGENTPOND_S3_BUCKET=agentpond
117
196
AGENTPOND_S3_PREFIX=
118
197
AGENTPOND_S3_ENDPOINT=http://localhost:9000
119
198
AGENTPOND_S3_FORCE_PATH_STYLE=true
199
+
200
+
# AWS or S3-compatible credentials
120
201
AWS_ACCESS_KEY_ID=minio
121
202
AWS_SECRET_ACCESS_KEY=minio123
122
-
AWS_REGION=us-east-1 # optional, defaults to us-east-1
203
+
AWS_REGION=us-east-1
204
+
205
+
# Local analytical cache
123
206
AGENTPOND_DB=~/.agentpond/cache.duckdb
124
207
```
125
208
126
-
If `--s3-endpoint` and `AGENTPOND_S3_ENDPOINT` are both omitted, AgentPond uses the default AWS S3 endpoint for `AWS_REGION`. For local MinIO, set `AGENTPOND_S3_ENDPOINT` or pass `--s3-endpoint`.
209
+
`AWS_REGION` defaults to `us-east-1`.
210
+
211
+
When `--s3-endpoint` and `AGENTPOND_S3_ENDPOINT` are both omitted, AgentPond uses the standard AWS S3 endpoint for the configured region.
212
+
213
+
For local MinIO or another S3-compatible service, set `AGENTPOND_S3_ENDPOINT` or pass `--s3-endpoint` to the CLI.
127
214
128
215
## Development
129
216
130
-
Install workspace dependencies once before running tests, examples, or local development commands:
217
+
Install the workspace dependencies:
131
218
132
219
```sh
133
-
pnpm i
220
+
pnpm install
134
221
```
135
222
136
-
Instead of `agentpond`, run the CLI from source code:
0 commit comments