The Runtime Workflow
- Plan Creation: The
Student
proposes a step-by-step plan to accomplish the task (Student.acreate_plan
). - Plan Review: The
Teacher
approves or rewrites the plan before execution begins (Teacher.areview_plan
). - Dependency Graph: The orchestrator sorts the steps to ensure prerequisites run first (
atlas/orchestration/orchestrator.py
). - Step Execution: The
Student
executes each step, streaming tool calls and traces into theExecutionContext
(Student.aexecute_step
). - Validation Loop: The
Teacher
validates the output of each step (avalidate_step
). If validation fails, it can request guidance. - Evaluation: The Reward System scores the full attempt (
atlas/reward/evaluator.py
). A score below the configuredretry_threshold
will trigger a retry. - Final Synthesis: Once all steps are successfully executed and validated, the
Student
combines the results into a final answer (asynthesize_final_answer
).
Retries & Guidance
Retries are surgical. When a judge score falls belowretry_threshold
, the orchestrator:
- Calls
Teacher.agenerate_guidance
for actionable feedback. - Records the guidance in the execution context so it shows up in logs.
- Replays the failing step with the new hints, up to
max_retries
attempts.
max_retries
for high-stakes workflows, or keep it at 1 to fail fast.
Event Stream & Telemetry
Every significant action is published to theExecutionContext
event stream. Subscribe to it to power CLI streams, dashboards, or custom logging.
- Intermediate steps – emitted when plans start/end, steps begin/finish, and tool calls fire.
- Metadata – stores guidance text, judge scores, and session metadata for later persistence.
- Telemetry hooks –
atlas/core.py
allows aTelemetryPublisher
to attach/detach. Dashboard documentation is coming later, so consider this a future-proofing hook.
Anatomy of atlas.run
Open atlas/core.py
to see the high-level flow:
- Load and validate the config (
atlas/config/loader.py
). - Create the agent adapter via
create_from_atlas_config
. - Optionally rewrite prompts, then instantiate Student, Teacher, and Evaluator.
- Spin up the orchestrator and optional Postgres session logging.
- Return an
atlas.types.Result
with the approved plan, per-step results, and final answer.
When to Customize
If you want to… | Tweak |
---|---|
Stream events into your UI | Subscribe to the event stream or write a TelemetryPublisher . |
Tighten quality control | Adjust thresholds in the rim block (e.g., success_threshold ) or add new judges. |
Retry more aggressively | Raise orchestration.max_retries and tune guidance prompts. |
Record every attempt | Enable storage and audit the persisted steps. |
Next Steps
- Configure each YAML block in detail with the
SDK Configuration Reference
. - Bring your own agent with the
Bring Your Own Agent
guide. - See how runtime roles compare to training in
Student & Teacher Roles
.