OrchestrationStep
All models for the Orchestrator app.
- class smarter.apps.orchestrator.models.orchestration_step.OrchestrationStep(*args, **kwargs)[source]
Bases:
TimestampedModelA single LLMClient invocation within an OrchestrationRun.
One row per turn/hop in the orchestration loop: which Harness ran, and where in the run’s sequence. Input/output, token counts, and latency live on LLMClient’s own execution-tracking model (execution) — this model just adds the run/sequence/orchestration-status context on top, so that data isn’t duplicated in two places.
- Parameters:
id (Unknown) – Primary key: ID
updated_at (Unknown) – Updated at
sequence (Unknown) – Sequence. Ordinal position of this step within the run.
status (Unknown) – Status
error_message (Unknown) – Error message. Orchestration-level failure reason (e.g. bad handoff), distinct from any error on the execution record itself.
created_at (Unknown) – Created at
Relationship fields:
- Parameters:
run (Unknown) – Run (related name:
steps)harness (Unknown) – Harness. Which Orchestrator/LLMClient membership executed this step. (related name:
steps)prompt (Unknown) – Prompt. The underlying LLMClient execution record (input/output, tokens, latency). OrchestrationStep only adds the run/sequence context on top of it. (related name:
orchestration_steps)
- exception DoesNotExist
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned
Bases:
MultipleObjectsReturned
- exception NotUpdated
Bases:
ObjectNotUpdated,DatabaseError
- class StepStatus(*values)[source]
Bases:
TextChoices- FAILED = 'failed'
- SKIPPED = 'skipped'
- SUCCEEDED = 'succeeded'
- created_at
-
Created at
Timestamp indicating when the model instance was created.
This field is automatically set to the current date and time when the instance is first created. It is indexed in the database for efficient querying.
- Type:
Type
- error_message
-
Error message. Orchestration-level failure reason (e.g. bad handoff), distinct from any error on the execution record itself.
- Type:
Type
- get_next_by_created_at(*, field=<django.db.models.DateTimeField: created_at>, is_next=True, **kwargs)
Finds next instance based on
created_at. Seeget_next_by_FOO()for more information.
- get_previous_by_created_at(*, field=<django.db.models.DateTimeField: created_at>, is_next=False, **kwargs)
Finds previous instance based on
created_at. Seeget_previous_by_FOO()for more information.
- get_status_display(*, field=<django.db.models.CharField: status>)
Shows the label of the
status. Seeget_FOO_display()for more information.
- harness
ForeignKeytoOrchestratorHarnessHarness. Which Orchestrator/LLMClient membership executed this step. (related name:
steps)- Type:
Type
- id
-
Primary key: ID
- Type:
Type
- objects = <django.db.models.Manager object>
- prompt
ForeignKeytoPromptPrompt. The underlying LLMClient execution record (input/output, tokens, latency). OrchestrationStep only adds the run/sequence context on top of it. (related name:
orchestration_steps)- Type:
Type
- run
ForeignKeytoOrchestrationRunRun (related name:
steps)- Type:
Type
- sequence
-
Sequence. Ordinal position of this step within the run.
- Type:
Type
- updated_at
-
Updated at
Timestamp indicating when the model instance was last updated.
This field is automatically updated to the current date and time whenever the instance is saved. It is indexed in the database for efficient querying.
- Type:
Type