Platform
API & Data Platform
Query Data via SDKs
13 min
you can query data via sdks https //docs abv dev/query data via sdks#kranx and api https //docs abv dev/query data via sdks#v4icf for export functionality, see export data https //docs abv dev/api and data platform overview common use cases train or fine tune https //docs abv dev/export for fine tuning 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 https //docs abv dev/datasets if you are new to abv, we recommend familiarizing yourself with the abv data model https //docs abv dev/observability data model new data is typically available for querying within 15 30 seconds of ingestion, though processing times may vary at times please visit status page https //status abv dev/ if you encounter any issues sdks via the sdks https //docs abv dev/overview of abv sdks for python and js/ts you can easily query the api without having to write the http requests yourself python sdk pip install abvdev from abvdev import get client abv = get client() # uses environment variables to authenticate the api namespace is auto generated from the public api (openapi) method names mirror rest resources and support filters and pagination traces traces = abv api trace list(limit=100, user id="user 123", tags=\["production"]) # pagination via cursor trace = abv api trace get("traceid") observations observations = abv api observations get many(trace id="abcdef1234", type="generation", limit=100) observation = abv api observations get("observationid") sessions sessions = abv api sessions list(limit=50) scores abv api score v 2 get(score ids = "scoreid") prompts please refer to the prompt management documentation https //docs abv dev/get started with prompt management on fetching prompts datasets \# namespaces \# abv api datasets \# abv api dataset items \# abv api dataset run items py metrics query = """ { "view" "traces", "metrics" \[{"measure" "count", "aggregation" "count"}], "dimensions" \[{"field" "name"}], "filters" \[], "fromtimestamp" "2025 05 01t00 00 00z", "totimestamp" "2025 05 13t00 00 00z" } """ abv api metrics metrics(query = query) async equivalents \# all endpoints are also available as async under `async api` trace = await abv async api trace get("traceid") traces = await abv async api trace list(limit=100) 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 npm install @abvdev/client import { abvclient } from "@abvdev/client"; const abv = new abvclient(); // fetch list of traces, supports filters and pagination const traces = await abv api trace list(); // fetch a single trace by id const trace = await abv api trace get("traceid"); // fetch list of observations, supports filters and pagination const observations = await abv api observations getmany(); // fetch a single observation by id const observation = await abv api observations get("observationid"); // fetch list of sessions const sessions = await abv api sessions list(); // fetch a single session by id const session = await abv api sessions get("sessionid"); // fetch list of scores const scores = await abv api scorev2 get(); // fetch a single score by id const score = await abv api scorev2 getbyid("scoreid"); // explore more entities via intellisense js/ts sdk reference including all available filters fetchtraces() fetchtrace() fetchobservations() fetchobservation() fetchsessions()