Skip to main content
You can query data via: SDKs and API. For export functionality, see Export Data. Common use cases:
  • Train or fine-tune models on the production traces in ABV. E.g. to create a small model after having used a large model in production for a specific use case.
  • Collect few-shot examples to improve quality of output.
  • Programmatically create datasets.
New data is typically available for querying within 15-30 seconds of ingestion, though processing times may vary at times. Please visit status page if you encounter any issues.

SDKs

Via the SDKs for Python and JS/TS you can easily query the API without having to write the HTTP requests yourself.

Python SDK

The api namespace is auto-generated from the Public API (OpenAPI). Method names mirror REST resources and support filters and pagination.

Traces

Observations

Sessions

Scores

Prompts

Please refer to the prompt management documentation on fetching prompts.

Datasets

Metrics

Async equivalents

Common filtering & pagination

  • limit, cursor (pagination)
  • time range filters (e.g., start_time, end_time)
  • entity filters: user_id, session_id, trace_id, type, name, tags, level, etc.
See the Public API for the exact parameters per resource.

JS/TS SDK

The dedicated fetch* methods for core entities are covered by tests and semantic versioning. The methods on the abv.api are auto-generated from the API reference and cover all entities.
Environment variables Add your ABV credentials as environment variables, e.g. use .env file and dotenv package to load variable values.
.env
alternatively use Constructor parameters
Use api
JS/TS SDK reference including all available filters:
  • fetchTraces()
  • fetchTrace()
  • fetchObservations()
  • fetchObservation()
  • fetchSessions()