antikythera.models.blueprints
¤
Classes¤
Blueprint
¤
Blueprint(
id: str,
name: str,
version: str | None = "1.0",
description: str | None = None,
tasks: list[Task] = None,
**kwargs
)
Represents a complete blueprint.
Attributes:
-
id(str) –Unique identifier for the blueprint.
-
name(str) –A human-readable name for the blueprint.
-
version(str) –The version of the blueprint schema.
-
description((str, optional)) –A human-readable description of the blueprint.
-
tasks((list[Task], optional)) –A list of tasks that make up the blueprint.
-
scopes(list[Scope]) –Scope definitions derived from scope_start/scope_end task pairs.
-
API Reference
antikythera
io ClassesBlueprintJsonSerializeV1 Functionsfrom_file
- API Reference antikythera
BlueprintSession
¤
BlueprintSession(
bsid: str,
blueprint: Blueprint,
inner_blueprints: dict[str, Blueprint] = None,
state: BlueprintSessionState = PENDING,
params: dict[str, str] = None,
composite_to_inner_blueprint_map: dict[str, str] = None,
blueprint_contexts: dict[str, Any] = None,
scope_iterations: dict[str, int] = None,
)
Represents a session of the execution of a blueprint.
Attributes:
-
bsid(str) –The ID of the blueprint session.
-
blueprint(Blueprint) –The blueprint.
-
inner_blueprints((dict[str, Blueprint], optional)) –A dictionary of inner blueprints used in this session.
- API Reference antikythera_orchestrator
BlueprintSessionState
¤
Enumeration of possible blueprint session states.
- API Reference antikythera
Dependency
¤
Dependency(id: str, type: DependencyType = FS)
Represents a dependency of a task on another.
Attributes:
-
id(str) –The ID of the task this task depends on.
-
type(DependencyType) –The type of dependency, by default DependencyType.FS (Finish-to-Start).
Scope
¤
Scope(
id: str,
label: str,
task_ids: list[str] = None,
end_task_id: str = "",
policy_type: str = "skip",
policy: dict = None,
)
A scope spanning a contiguous region of a blueprint's task DAG.
A scope is uniquely identified by the task ID of its opening
(scope_start) task. An optional human-readable label can be
provided via scope_start["name"].
Attributes:
-
id(str) –Identifier for this scope — the task ID of the
scope_starttask. -
label(str) –Human-readable label for the scope.
-
task_ids(list[str]) –All task IDs that belong to this scope (including start and end).
-
end_task_id(str) –Task ID of the
scope_endtask that closes this scope. -
policy_type(str) –One of
"skip","retry", or"while". -
policy(dict) –Raw policy dict from
task.scope_start.
Task
¤
Task(
id: str,
type: str,
description: str | None = None,
condition: str | None = None,
inputs: list[TaskInput] = None,
outputs: list[TaskOutput] = None,
params: list[TaskParam] = None,
depends_on: list[Dependency] = None,
state: TaskState = PENDING,
context: dict[str, Any] = None,
scope_start: dict | None = None,
scope_end: str | None = None,
**kwargs
)
Represents a single task in a blueprint.
Attributes:
-
id(str) –Unique identifier for the task.
-
type(str) –The type of the task, which determines the agent that will execute it.
-
description((str, optional)) –A human-readable description of the task.
-
inputs((list[TaskInput], optional)) –A list of inputs for the task.
-
outputs((list[TaskOutput], optional)) –A list of outputs for the task.
-
depends_on((list[Dependency], optional)) –A list of dependencies on other tasks.
-
params((list[TaskParam], optional)) –A list of task-specific parameters.
- API Reference antikythera
-
API Reference
- antikythera_agents
- antikythera
-
antikythera_orchestrator
orchestrator Classes
Functions¤
from_dynamic_task
classmethod
¤
Creates a new dynamically expanded task from a composite task.
Parameters:
-
dynamic_task(Task) –The original composite task to expand.
-
new_task_id(str) –The ID for the new expanded task.
-
element_id(str) –The element ID to associate with the new task.
Returns:
-
Task–The newly created expanded task.
then
¤
Adds a dependency from the given task(s) to this task.
Parameters:
-
task(Task or List[Task]) –The task(s) that will depend on this task.
-
type(DependencyType, default:FS) –The type of dependency, by default DependencyType.FS.
Returns: