Skip to main content
The Docent Python SDK provides a high-level interface for logging, querying, and analyzing AI agent traces.

Installation

pip install docent-python
Requires Python 3.11 or higher.

Quick Example

from docent import Docent

client = Docent(api_key="your-api-key")

# Create a collection
collection_id = client.create_collection(name="My Agent Runs")

# Query with DQL
result = client.execute_dql(collection_id, "SELECT id, name, metadata_json->>'model' AS model FROM agent_runs LIMIT 5")
rows = client.dql_result_to_dicts(result)

What You Can Do

Collections

Create and manage collections of agent runs

Agent Runs

Query, retrieve, and manage agent run data

Rubrics & Evaluation

Define rubrics, create judges, and run evaluations

DQL

Query your data with the Docent Query Language

Feedback & Labels

Annotate runs with labels, tags, and comments

Tracing

Automatically capture LLM interactions

Typical Workflow

  1. Create a collection to organize your agent runs
  2. Ingest agent runs via tracing, the SDK, or file upload
  3. Create rubrics to define evaluation criteria
  4. Run evaluations with LLM judges
  5. Query results with DQL and export to DataFrames

Next Steps