Send traces
AgentLasso learns what your agent does from its production traces: one record per request your agent handled. Send them as a flat JSON object (no SDK needed) or as standard OpenTelemetry. Both go to the same endpoint and are stored the same way.
No live integration yet? You can import traces from a file instead, once or on a regular schedule: see Imports instead of a live integration.
Your project's API key is in Settings. Authorization: Bearer <key> works too, for OpenTelemetry exporters configured for bearer auth.
Simple JSON
The fastest path, and the right one for most agents that don't already run an OpenTelemetry pipeline:
Send one object per request your agent handled, from wherever it finishes a request. Don't block the user's response on it: fire it and log failures.
Import history
The easiest way is in the app: Production Sync → Import traces. Drop in a JSON Lines, JSON, CSV or OpenTelemetry export, match its columns (user message, reply, tools, time, and optionally an outcome), check the preview and import. A summary shows, before and after the import: how many traces were received, imported, skipped (and why) and rejected; the date range; how many have a reply, tool calls, a time and an outcome; how many had personal data redacted; columns and values that weren't used; and whether it's enough for coverage analysis (a few hundred traces over a week or more, most with tool calls). Up to 5,000 traces per import on the free plan; paid plans import up to their monthly allowance.
Before importing, turn on Settings → Semantic grouping so Discovery groups the imported traffic by what users asked for, not only by the tools called (see Quickstart).
After the import, traces are classified in the background. A large import goes through Anthropic's batch queue, usually done within minutes and at most a few hours. Production Sync, Discovery and the Dashboard show progress ("320 of 1,000 traces classified") and refresh when it's done. Progress moves along while the app is open, with new traffic, or with the optional scheduled job. Discovery stays empty until traces are classified.
To script it instead, send up to 500 traces per request as { "traces": [...] }, each with its timestamp:
Or from Python, with a list of dicts or a file (JSON Lines, a JSON array, or { "traces": [...] }):
- Each trace keeps its date, so the scorecard's 30-day numbers, trends and drift are right from the start. Without
timestamp, a trace counts as today. - Traces older than 90 days are skipped (counted as
skippedTooOldin the response): nothing in AgentLasso looks back further. A timestamp in the future counts as now. - A batch is all or nothing: if any entry has no
user_input, nothing is stored and the error names the entry (traces[12]). - After an import, traces are classified in the background; behavior no capability covers yet shows up in Discovery. A large import uses the cheaper batch path for the AI step.
- Importing the same traces twice stores them twice. Imports don't check for traces already stored, so overlapping files double-count traffic. Export each period once; see below.
Imports instead of a live integration
You don't have to wire AgentLasso into your agent. Importing exports works for trying it on your real history, for a pilot, or as your regular workflow. Everything works on imported traces exactly as on live ones: classification, Discovery, the Semantic Agent Map and scorecards, the Coverage plan, Dataset Studio (Add as test on real requests and failures) and CI runs.
What's different:
- The numbers are a snapshot. The map, scorecards, drift and the Coverage plan reflect your traces up to your last import. Nothing changes between imports, so a regression in production shows up only after the next one.
- Only the last 90 days count. Older traces are skipped on import. Import at least every few weeks, or the 30-day numbers empty out.
- Avoid overlapping files. Imports don't recognize traces already stored, so importing the same requests twice counts them twice (traffic, paths, failures). Export non-overlapping periods, for example last Monday to Sunday, every Monday.
- Each trace needs its time. Map your export's time column (or send
timestamp), so traces land on the days they happened. Without it, a whole import counts as today and skews 30-day numbers and trends.
A weekly routine:
- Export last week's traces (Monday to Sunday) from your logs or observability tool, with the user's message, the agent's reply, the tools it called and the time.
- Production Sync → Import traces, or
agentlasso import last-week.jsonlin a scheduled job. - Check Discovery for new behavior, then the Coverage plan for what to test next.
When you're ready for live numbers, add the POST (or point your OpenTelemetry exporter) at the same endpoint. Stop importing the periods the live feed covers, so nothing is counted twice.
OpenTelemetry
If your agent already emits OpenTelemetry traces, point your exporter at the same endpoint. The payload is detected automatically ({ "resourceSpans": [...] }, OTLP/HTTP JSON):
AgentLasso reads the GenAI semantic conventions:
- one trace per GenAI chat/generation span (
gen_ai.operation.name,gen_ai.request.model/gen_ai.response.model, orgen_ai.prompt/gen_ai.completion); - tool-call spans (
gen_ai.tool.name,gen_ai.tool.call.arguments) become that trace's tool calls; gen_ai.conversation.idorsession.idas the session;gen_ai.usage.*as token counts;- the span's start time as the trace's time, so exported history keeps its dates (the same 90-day limit applies).
A payload with no GenAI spans is accepted with 202 and accepted: 0, plus a note saying what was looked for.
Already sending to LangSmith, Langfuse or Datadog? Keep it, and dual-export: see Send traces you already have.
Response
The body is a superset of OTLP's export response, so strict OpenTelemetry exporters accept it. skippedTooOld appears when traces older than 90 days were skipped. classifiedTraces appears while a new project's first traces are classified as they arrive (see Capabilities and classification).
Personal data is redacted before storage
By default, before anything is stored, AgentLasso replaces personal data in the user input, the agent's reply and tool-call arguments:
- emails →
[REDACTED_EMAIL] - US social security numbers →
[REDACTED_SSN] - phone numbers →
[REDACTED_PHONE] - card numbers (only numbers that pass the Luhn check) →
[REDACTED_CARD]
Turn it off per project in Settings → Data controls only if you need the raw content.
Next
Traces become capabilities, each with a scorecard.