Skip to main content
If your agent already sends traces to Langfuse or logs to Braintrust, Agnost AI can read them from there. You connect the source with its API keys, choose how much history to import, and Agnost AI keeps new traces in sync every 5 minutes. You don’t change your code, your SDK, or your exporter, and nothing changes in the source tool: Agnost AI only reads from it. Imported traces become Agnost conversations and events, so Conversations, Patterns, Alerts, Tools and the Architecture page work on them the same way they work on data your SDK sends.

Where to find it

  • Settings > Data sources. The section lists connected sources. With none connected, choose the Langfuse or Braintrust button to open its connect form.
  • Onboarding. A new project’s setup page shows 1 click migration: with the same two buttons. While a source is connected and nothing has arrived yet, Home shows the import’s progress instead of the setup steps, and opens your data as soon as the first traces arrive.
You need to be signed in to connect a source. The demo workspace can’t connect one.

Connect Langfuse

  1. Under Hosting, choose EU cloud (https://cloud.langfuse.com), US cloud (https://us.cloud.langfuse.com), or Self-hosted.
  2. For Self-hosted, enter your Langfuse Host URL, for example https://langfuse.your-company.com.
  3. Enter the Public key (starts with pk-lf-) and Secret key (starts with sk-lf-). They’re in Langfuse > Project settings > API keys. The import reads the Langfuse project these keys belong to.
  4. Choose Past data to import (see Backfill).
  5. Choose Import traces, or Connect Langfuse if you chose None.
Agnost AI checks the keys with Langfuse before saving them. If Langfuse rejects them, the form says so and nothing is saved. The most common cause is a key from the other region: EU and US cloud keys only work on their own host.

Self-hosted Langfuse

A self-hosted Langfuse works if Agnost AI can reach it from the internet. The Host URL must:
  • use https://, on port 443 or 8443;
  • resolve to a public IP address (private, loopback, link-local and cloud metadata addresses are refused);
  • not include a username or password.
Agnost AI reads the same public API your Langfuse Cloud project would serve, so the self-hosted instance needs to be recent enough to serve /api/public/v2/observations.

Connect Braintrust

  1. Under Hosting, choose Braintrust cloud (https://api.braintrust.dev) or Self-hosted. For Self-hosted, enter your Braintrust API URL, for example https://braintrust.your-company.com. The same rules as a self-hosted Langfuse URL apply.
  2. Enter the API key. It’s in Braintrust > Settings > API keys. Use a key from the Braintrust organization your agent logs to.
  3. Choose Find projects. Agnost AI lists the projects the key can see, sorted by name, with a search box when there are many.
  4. Under Projects, pick the projects your agent logs to, 1 to 10 of them.
  5. Choose Past data to import, then Import logs (or Connect Braintrust if you chose None).

Why you pick 1 to 10 Braintrust projects

Agnost AI reads Braintrust logs with BTQL queries. Braintrust allows 20 BTQL queries a minute per organization, and that budget is shared with your own scripts and tools. Every project the import reads costs at least one query on every sync, so the import reads only the projects you pick, and at most 10, to leave room for everything else that queries your Braintrust organization. Connections made before project picking was added have no selection and still read every project the key can see. To limit one, choose Update key on it (or disconnect and connect again) and pick projects.

Backfill

Past data to import sets where the first sync starts: Imported history shows up in Events as it arrives. Seven days is the most you can import.

Sync cadence

The import runs every 5 minutes. Each run:
  • reads from where the last run stopped up to 2 minutes before now, so spans the source is still writing are read on the next run;
  • re-reads the last 10 minutes before that point to catch spans that arrived late, and skips anything it already imported;
  • waits for spans that are still running. A span that hasn’t finished after an hour is skipped as never finished, so it can’t hold the import back.
A new trace usually appears in Agnost AI within a few minutes of being written to the source. During a backfill, each run imports as much as it can and saves its place after every window of time it finishes, so a long backfill continues where it stopped on the next run.

One source per project

A project imports from one source at a time: one Langfuse connection or one Braintrust connection. To switch from Langfuse to Braintrust (or the other way), disconnect the current source first. Connecting the same source again, for example with a new key, replaces the old connection. Agnost AI remembers every record it imported, per project and source, so reconnecting, replacing a key, or overlapping syncs never import the same span twice. To import from several Langfuse or Braintrust projects into separate places, create an Agnost project for each.

What maps to what

Agnost AI groups spans into conversations (sessions) and stores each span as an event, with its parent so the tree is kept.

Langfuse

Agnost AI reads Langfuse observations (GET /api/public/v2/observations) and groups them by trace. Each event also keeps langfuse.observation_id and langfuse.trace_id, and each conversation has source: langfuse. The wrapper span Langfuse adds around OTLP traces is skipped, so its children become the roots.

Braintrust

Agnost AI reads Braintrust project logs (project_logs) for the projects you picked, and groups spans by their root span. Each event also keeps braintrust.span_id, braintrust.root_span_id and braintrust.project_id, and each conversation has source: braintrust.

Cost

The cost on an imported event is the cost the source recorded: Langfuse’s total cost for the observation, or Braintrust’s estimated cost for the span. Agnost AI doesn’t recalculate it from tokens. See cost on spans for how Agnost AI counts cost.

What isn’t imported

  • Langfuse scores, prompts, datasets and dataset runs.
  • Braintrust experiments, datasets and the scores on log rows. Scorer spans inside your logs are imported as evaluator events.
  • Spans that never finished (still running after an hour).

Status and progress

Each connected source shows: Disconnect stops new syncs. Events already imported stay in the project, and you can reconnect any time.

Limits

  • History: up to 7 days.
  • Sources: one connection per project, Langfuse or Braintrust.
  • Braintrust projects: 1 to 10 per connection.
  • Rate limits: the import shares your source’s API limits with everything else that uses them. When Langfuse or Braintrust answers 429 Too Many Requests, the import waits for the time the source asks for (up to 70 seconds), and retries up to 5 times before trying again on the next run.
  • Busy windows: each window of time holds at most 20,000 records. Windows start at 6 hours and halve, down to 5 minutes, while they hold more. If more than 20,000 spans started within a single 5-minute window, the sync stops with a “too many records in one window” error.
  • Records Agnost AI rejects (for example, a malformed record) are skipped and not retried. The rest of the window still imports.
  • Keys are stored encrypted and never shown again after you connect.

Troubleshooting

Sending to Agnost AI directly

Importing is the fastest way to start, and it keeps working while you decide what to do next. If you want Agnost AI to receive spans as they happen, point an OpenTelemetry exporter at Agnost AI next to your current one: see OpenTelemetry. If you do, disconnect the import for that project so the same spans don’t arrive twice.