Skip to main content
The Atlas SDK persists every orchestration session, including per-step rewards, guidance history, and tool usage. You can access this data through:
  1. Direct Database Access (Recommended) - Query PostgreSQL directly with the atlas.training_data module for filtered, high-performance access
  2. JSONL Export (Alternative Method) - Use the arc-atlas CLI to export sessions to JSONL files
For training pipelines: Direct database access is recommended (SDK v0.1.13+). It eliminates schema drift, provides 10-100x faster queries with database indexes, and supports reward-based filtering at the database level.

1. Enable Postgres Persistence

Add a storage block to your SDK config:
Run your tasks with atlas.core.run(..., stream_progress=True) as usual. Each session, step result, and intermediate event is written to Postgres. Query training sessions directly from PostgreSQL with reward-based filtering and selective data loading:

Key Features

  • No intermediate files: Query directly from PostgreSQL
  • Database-level filtering: Reward, status, date range, and learning key filters
  • Selective loading: Control which fields are loaded (include_trajectory_events, include_learning_data)
  • Pagination support: Process large datasets in batches with async iterators
  • 10-100x faster: Database indexes optimize reward and date range queries

Example: Pagination for Large Datasets

See the Training Data Pipeline Guide for complete API reference and advanced usage.

3. JSONL Export (Alternative Method)

Start Postgres before exporting (e.g., docker compose up -d postgres or brew services start postgresql) so the CLI can connect successfully.
If another tool owns the atlas command on your system, run the exporter with python -m atlas.cli.export ... or adjust PATH so arc-atlas resolves first.

Optional filters

  • --session-id 42 (repeatable) exports specific sessions.
  • --limit 25 / --offset 25 page through recent sessions.
  • --status succeeded --status failed filters on runtime completion state.
  • --include-status approved (repeatable) restricts review statuses; omit to inherit runtime_safety.review.default_export_statuses. Use --include-all-statuses for exploratory exports.
  • --trajectory-event-limit 200 caps the number of intermediate telemetry events embedded per session.
The exporter writes one JSON object per line. Each record aligns with AtlasSessionTrace:
Tip: Compress large exports with xz or gzip—the loader streams line-by-line, so you can decompress on the fly if desired.
Use adaptive_summary to audit routing choices, probe evidence, and certification status; triage_dossier captures the structured context that informed the decision (see triage dossier); personas_used and persona_updates highlight which personas were active and how memory evolved during the run. Each step also carries structured artifacts captured during execution and a deliverable payload that mirrors what the Student hands back to downstream systems.
Review gating defaults to approved sessions. Set ATLAS_REVIEW_REQUIRE_APPROVAL=0 only for local experiments and always note which review statuses were exported alongside your artifacts.

4. Feed the Training Stack

Using JSONL Export (Alternative Method)

Or use the Hydra shortcut (src/atlas_core/configs/data/runtime_traces.yaml) described in the top-level quickstart. The schema matches the training adapters, so no custom glue code is required.

Troubleshooting

With the exporter in place you can schedule nightly runs, collect batches of traces, and continuously fine-tune the teacher without manual wrangling.