antikythera_orchestrator.orchestrator
¤
Classes¤
Orchestrator
¤
Orchestrator(session: BlueprintSession, broker_host='127.0.0.1', broker_port=1883)
Coordinates the execution of a blueprint.
The orchestrator is responsible for managing the state of a blueprint session, and coordinating the execution of tasks by agents.
Attributes:
-
session(BlueprintSession) –The blueprint session to execute.
- API Reference antikythera_orchestrator
Functions¤
await_completion
¤
on_task_claim
¤
on_task_claim(message: TaskClaimRequest) -> None
Handles incoming task claim requests.
on_task_completed
¤
on_task_completed(message: TaskCompletionMessage) -> None
Handles incoming task completion messages.
register_instance
classmethod
¤
register_instance(instance: Orchestrator) -> None
Registers an orchestrator instance and tracks active instances.
reset_scope
¤
Reset all tasks in a scope and clear its iteration counter.
This is the user-initiated reset path (as opposed to the internal
loop-policy reset done by _handle_scope_completion). It restores
the full retry/iteration budget so the scope behaves as if it has
never run.
Parameters:
-
scope_name(str) –The scope name (i.e. the task ID of the
scope_starttask).
Returns:
Raises:
-
KeyError–If no scope with the given name exists in the registry.
reset_task_state
¤
reset_task_state(
blueprint_id: str,
task_id: str,
include_downstream: bool = True,
clear_outputs: bool = True,
) -> list[str]
Reset a task (and optionally its downstream dependents) to PENDING.
Parameters:
-
blueprint_id(str) –Blueprint ID of the task to reset.
-
task_id(str) –Task ID to reset (within the blueprint).
-
include_downstream(bool, default:True) –If True, also reset tasks that depend on this task.
-
clear_outputs(bool, default:True) –If True, clear task outputs in session storage.
Returns:
skip_task_state
¤
Skip a task and its inner blueprint tasks (if composite).
For composite tasks, all tasks in the inner blueprint are also recursively skipped. Downstream dependent tasks are NOT skipped.
Parameters:
-
blueprint_id(str) –Blueprint ID of the task to skip.
-
task_id(str) –Task ID to skip (within the blueprint).
Returns:
PendingTask
dataclass
¤
Represents a task that is pending execution.
Attributes:
-
blueprint_id(str) –The ID of the blueprint to which the task belongs.
-
task(Task) –The task that is pending execution.
-
API Reference
antikythera_orchestrator
orchestrator ClassesTaskScheduler Functionsget_pending_tasks
ProcessedTask
dataclass
¤
TaskScheduler
¤
TaskScheduler(session: BlueprintSession, graph: Graph)
Task scheduler with support for FS and SS task dependencies.
Functions¤
get_pending_tasks
¤
get_pending_tasks() -> list[PendingTask]
Returns a list of tasks that are pending execution whose dependencies are satisfied.