Import from Langfuse: Pull Traces and Scores into Future AGI

Pull existing Langfuse traces, spans, and scores into Future AGI automatically to continue evaluation and analysis without re-instrumentation.

📝
TL;DR

Import existing traces from a Langfuse project with compatible trace-read APIs, without changing your application code. Check source compatibility and date-selection limits below before connecting.

What this does

If you already have traces in Langfuse, this integration pulls them into Future AGI so you can run evals on them or add them to datasets. No re-instrumentation required. Your Langfuse setup keeps working as-is.

The sync runs on an interval you choose (1 to 30 minutes). Each cycle fetches traces from the connected project and maps them to Future AGI’s data model, including spans, token counts, costs, and evaluation scores.

Before you start

You’ll need:

  • A Langfuse project whose traces are available through the legacy trace-read APIs described below
  • A project-scoped Langfuse Public Key (pk-lf-...) and Secret Key (sk-lf-...) from the source project’s Project Settings > API Keys, with read access to traces, observations, and scores
  • Admin or Owner role in your Future AGI workspace

Use a dedicated key pair for this connection. When creating a key with configurable permissions, choose Viewer for read-only access. Ingestion and Scores ingestion keys cannot read data. See Langfuse’s project API key permissions.

Check source compatibility

This importer requires GET /api/public/traces and GET /api/public/traces/{id}. Before connecting, confirm that these legacy APIs are available and contain the history you want to import:

  • Self-hosted Langfuse: use v3, or v4 still running in legacy or dual migration mode (LANGFUSE_MIGRATION_V4_WRITE_MODE). The default v4 events_only mode is not supported: both trace-read routes return HTTP 404. Follow Langfuse’s v3-to-v4 upgrade guide before changing modes; do not switch an already-migrated deployment back just for this importer.
  • Langfuse Cloud: legacy trace-read API removal is scheduled for November 16, 2026 (2026-11-16). Plan to complete historical imports before that date; do not rely on ongoing sync after the cutoff. See Langfuse’s API migration notice.

If your source no longer exposes these APIs, do not create this connection; contact support for a supported historical migration path. Configuring live OpenTelemetry export does not transfer existing traces.

For self-hosted Langfuse, you’ll also need the host URL and optionally a CA certificate (PEM format) if your instance uses a private certificate authority.


Connect Langfuse

Open Integrations

Go to Settings > Integrations in your Future AGI workspace. You’ll see the Available Platforms grid with all supported integrations.

Click Add Integration or click the Langfuse card directly.

Integrations list page

Enter your API credentials

The wizard opens as a side panel. On the Credentials step, fill in:

FieldDescription
Host URLYour project’s Langfuse host: https://cloud.langfuse.com (EU), https://us.cloud.langfuse.com (US), or a self-hosted URL that meets the source compatibility requirements
Public KeyThe source project’s public key (pk-lf-...)
Secret KeyThe matching project secret key (sk-lf-...)

Use the host for the region where your Langfuse project lives. See Langfuse’s regional base URLs for other regions; enter the host URL without /api/public.

Warning

Do not substitute organization API keys here. Organization keys are for administration, including provisioning project API keys; they are not a replacement for a project’s data-access keys.

Expand Advanced Settings if you need to paste a CA certificate for self-hosted instances.

Langfuse credentials form

Click Validate & Continue to validate the credentials and load the Langfuse project associated with that key pair.

Map projects

Select the Langfuse project associated with your credentials. Then choose an existing Future AGI project to import into, or create a new one.

Project mapping

Tip

To import another Langfuse project, add a separate connection with that project’s own key pair. Each project key is scoped to one source project, so seeing one project in the dropdown is expected.

Configure sync settings

Choose how often to sync and how much historical data to import.

Sync Interval - how frequently Future AGI checks Langfuse for new traces:

IntervalBest for
Every 1-2 minutesHigh-volume production workloads where you need near real-time data
Every 5 minutes (default)Most use cases
Every 15-30 minutesLow-volume or cost-sensitive setups

Historical Data - how far back to import:

OptionWhat it does
Import all tracesImports available history from January 1, 2020 onward. Shows estimated trace count.
Import from a specific dateUses your chosen start date for the initial import and fetches through the current sync time. The end date is not enforced.
Only import new traces going forwardCan import traces from before the connection was created. Do not use this option to exclude history.

Warning

To limit older data, choose Import from a specific date and set a suitable start date. If you require a strict connection-time cutoff or an upper-bound cutoff, do not connect this importer until support confirms a version that enforces those limits. The new-only option and end-date field do not currently enforce them.

Sync settings

Click Connect Integration.

Done

You’ll see a confirmation screen. Traces will start syncing within the interval you selected.

Integration connected

Click View Integration to see sync status and history, or Go to Project to start working with your imported traces.


What gets imported

Here’s what gets synced from Langfuse into Future AGI on each cycle:

LangfuseFuture AGINotes
TraceTraceName, metadata, tags, user ID, session ID
Observation (span/generation)SpanInput, output, model, latency, status
Token countsSpan attributesPrompt tokens, completion tokens, total tokens
CostSpan attributesPer-span cost from Langfuse
Model nameSpan attributesAuto-detects the provider (OpenAI, Anthropic, etc.)
ScoresEvaluation logsScore name, value, and comment. Both trace-level and span-level scores are imported. Numeric and categorical scores are both supported.

Sync status

After connecting, you can monitor your integration from the detail page (Settings > Integrations > click your connection).

StatusMeaningAction
ActiveSyncing on schedule, everything healthyNone needed
SyncingA sync cycle is currently runningWait for it to finish
BackfillingImporting historical dataProgress percentage shown
PausedYou paused the sync manuallyClick Resume when ready
ErrorCredentials revoked or Langfuse project deletedUpdate credentials or check Langfuse

The detail page also shows:

  • Total traces, spans, and scores imported so far
  • Last synced timestamp
  • Sync history table with per-cycle breakdown (traces fetched, spans synced, scores synced, status)

You can trigger an immediate sync with the Sync Now button (60-second cooldown between manual syncs).


Edit or disconnect

From the integration detail page, click the menu icon to:

  • Edit - update your display name, API keys, host URL, or sync interval. Changing API keys triggers re-validation.
  • Delete - removes the connection and stops syncing. Previously imported traces are kept.

Warning

Deleting a connection requires typing “DELETE” to confirm. This stops all future syncing but does not delete any traces already imported into Future AGI.


Troubleshooting

Connection shows Error status

Check that the host URL matches your project’s region, that both keys belong to the source project, and that the key has read access. Ingestion-only keys cannot read traces. If the keys were revoked or expired, create a new read-capable key pair in the source project’s Project Settings > API Keys, then edit the integration in Future AGI to update it.

Credentials validate, but imports fail with HTTP 404

Credential validation checks the project API, which can succeed even when the legacy trace-read APIs are unavailable. Check your source’s API compatibility, especially v4 events_only mode or the scheduled Cloud cutoff. A zero trace estimate does not prove the project is empty. Rotating valid project keys will not restore a removed API; contact support before continuing.

Traces are missing after backfill

Confirm that the missing traces belong to the connected Langfuse project and are on or after your selected start date. The end-date field does not limit the import. Check Sync history for errors and whether the backfill is still running. If it has finished but traces are missing, contact support with the affected trace IDs and sync error; do not share API keys.

Sync paused automatically

Future AGI pauses syncing when it encounters repeated authentication failures (HTTP 401). This prevents hammering Langfuse with invalid credentials. Update your keys to resume.

Only one project shows in the dropdown

This is expected: project API keys can access only their own project. To import a different project, add a separate connection using that project’s own key pair. Do not switch to an organization key to expand data access.

Backfill is running slowly or pausing mid-way

Check Sync history for HTTP 429 responses and review your Langfuse API limits. If rate limiting persists, increase the sync interval and check whether other clients share the same limits. Contact support if the backfill does not make progress.


What’s next

Was this page helpful?

Questions & Discussion