OrchestrationRun

All models for the Orchestrator app.

class smarter.apps.orchestrator.models.orchestration_run.OrchestrationRun(*args, **kwargs)[source]

Bases: TimestampedModel

A single execution of an Orchestrator against a concrete objective.

The audit/trace root: one row per attempt to achieve an objective, independent of how many LLMClient invocations (OrchestrationSteps) it took to get there.

Parameters:
  • id (Unknown) – Primary key: ID

  • objective (Unknown) – Objective. Natural-language statement of the agentic objective for this run.

  • status (Unknown) – Status

  • result (Unknown) – Result. Final output/artifact produced by the run, if any.

  • error_message (Unknown) – Error message

  • iteration_count (Unknown) – Iteration count

  • started_at (Unknown) – Started at

  • completed_at (Unknown) – Completed at

  • created_at (Unknown) – Created at

  • updated_at (Unknown) – Updated at

Relationship fields:

Parameters:
  • orchestrator (Unknown) – Orchestrator (related name: runs)

  • started_by (Unknown) – Started by. The user profile that started the run, who may use every harness LLMClient, and is each step’s acting user (ADR-037). Each step runs as its LLMClient’s owner. Null after that profile is deleted. (related name: orchestration_runs)

Reverse relationships:

Parameters:

steps (Unknown) – All steps of this Orchestration Run (related name of run)

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

exception NotUpdated

Bases: ObjectNotUpdated, DatabaseError

completed_at

DateTimeField

Completed at

Type:

Type

created_at

DateTimeField

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

TextField

Error message

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. See get_next_by_FOO() for more information.

get_next_by_updated_at(*, field=<django.db.models.DateTimeField: updated_at>, is_next=True, **kwargs)

Finds next instance based on updated_at. See get_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. See get_previous_by_FOO() for more information.

get_previous_by_updated_at(*, field=<django.db.models.DateTimeField: updated_at>, is_next=False, **kwargs)

Finds previous instance based on updated_at. See get_previous_by_FOO() for more information.

get_status_display(*, field=<django.db.models.CharField: status>)

Shows the label of the status. See get_FOO_display() for more information.

id: int

BigAutoField

Primary key: ID

The row’s primary key, which Django adds to every concrete model. Declared, without a value, only so that type checkers know it: Django ignores a bare annotation.

Type:

Type

iteration_count

PositiveIntegerField

Iteration count

Type:

Type

objective

TextField

Objective. Natural-language statement of the agentic objective for this run.

Type:

Type

objects = <django.db.models.Manager object>
orchestrator

ForeignKey to Orchestrator

Orchestrator (related name: runs)

Type:

Type

orchestrator_id

Internal field, use orchestrator instead.

result

JSONField

Result. Final output/artifact produced by the run, if any.

Type:

Type

started_at

DateTimeField

Started at

Type:

Type

started_by

ForeignKey to UserProfile

Started by. The user profile that started the run, who may use every harness LLMClient, and is each step’s acting user (ADR-037). Each step runs as its LLMClient’s owner. Null after that profile is deleted. (related name: orchestration_runs)

Type:

Type

started_by_id

Internal field, use started_by instead.

status

CharField

Status

Choices:

  • pending

  • running

  • succeeded

  • failed

  • cancelled

  • max_iterations_exceeded

Type:

Type

steps

Reverse ForeignKey from OrchestrationStep

All steps of this Orchestration Run (related name of run)

Type:

Type

updated_at

DateTimeField

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