The graph’s vocabulary¶
octomate.schemas.awakes ¶
AwakeSignal ¶
AwakeSignal = (
UserMessageSignal
| DeferredActionBatchResponse
| CommandSignal
| NativeGatewaySignal
| DrivenGatewaySignal
)
UserMessageSignal
dataclass
¶
Source code in octomate/schemas/awakes.py
DeferredActionBatchResponse
pydantic-model
¶
Bases: BaseModel
Fields:
-
batch_id(UUID7) -
responder_id(str) -
answers(dict[UUID7, QuestionAnswer]) -
approvals(dict[UUID7, bool]) -
allow_session(bool)
Source code in octomate/schemas/awakes.py
NativeGatewaySignal
dataclass
¶
A native session's own spell, kicked as its own turn.
A driven turn's decision is read off its Octomate session when the run ends; a native session has no run in the graph, so the served spell hands its validated decision straight to the graph instead.
Source code in octomate/schemas/awakes.py
CommandSignal
dataclass
¶
Explicit command intent on an authenticated, resolved conversation surface.
Source code in octomate/schemas/awakes.py
DrivenGatewaySignal
dataclass
¶
An authenticated, validated operation on an existing thread.
Source code in octomate/schemas/awakes.py
StillAwake ¶
Bases: RuntimeError
A kick refused because a reflex is still awake on the thread it was asked on: a thread holds one at a time.
Source code in octomate/schemas/awakes.py
octomate.schemas.triage ¶
Gateway decisions a run leaves.
GatewayDecision ¶
GatewayDecision = Annotated[
SummonDecision | SchemeDecision | TeleportDecision,
Field(discriminator="action"),
]
AgentRouteKey ¶
Bases: NamedTuple
An agent and a model, or None for the agent's native default.
Source code in octomate/schemas/triage.py
SpellTarget
pydantic-model
¶
Bases: BaseModel
Base of the places a spell's destination argument can name.
A variant per place rather than one free string, so a tool definition says what it accepts instead of documenting it in prose. Channel IDs are runtime values: the schema stays stable while the tool validates reachability and access.
Config:
frozen:True
Source code in octomate/schemas/triage.py
HereTarget
pydantic-model
¶
DirectTarget
pydantic-model
¶
Bases: SpellTarget
The asking user's direct messages on a connected channel.
Fields:
Source code in octomate/schemas/triage.py
SummonDecision
pydantic-model
¶
Bases: BaseModel
A handoff decision: continue this turn with another agent, from a brief, in the conversation where it already is.
Fields:
-
action(Literal['summon']) -
reason(str) -
agent_id(str) -
model(AgentRouteModelName | None) -
effort(str | None) -
hint(str) -
brief(str)
Source code in octomate/schemas/triage.py
model
pydantic-field
¶
Selected model, or null to use the harness's native default.
brief
pydantic-field
¶
The receiver's whole opening prompt, refused over the cap rather than trimmed: what it leaves out, the receiver reads back through the handoff. Eight thousand characters is roughly two thousand tokens — the size a distilled handoff runs to, and well short of a pasted transcript.
SchemeDecision
pydantic-model
¶
Bases: BaseModel
Take this turn to the asking user's DM, from a brief.
No agent is named: whoever already handles that user's DM picks the work up, so a group can never point someone's private assistant at an agent it chose. The receiver is resolved against the DM's own thread, which is why this carries a brief rather than a route.
Fields:
-
action(Literal['scheme']) -
hint(str) -
brief(str) -
destination(ChannelAddress)
Source code in octomate/schemas/triage.py
hint
pydantic-field
¶
The line that opens the conversation over there. Nothing is posted where the request came from — the run's own reply closes that out.
destination
pydantic-field
¶
Which direct messages, resolved by the gateway using the requesting user's linked identity, never a model-supplied user ID.
TeleportDecision
pydantic-model
¶
Bases: BaseModel
The same agent continues somewhere else, its history with it; Reflex performs the move. A run ends on it — Inkling by deferring the call, a runtime a tool result cannot suspend by being interrupted on the recorded decision and ending its turn as the same deferral — and the graph resumes the agent in the new place: a sub-thread, a crossing, or this very thread when the move is only into a project's workspace.
Fields:
-
action(Literal['teleport']) -
agent_id(str) -
hint(str) -
destination(ChannelAddress) -
new_thread(bool) -
project(str | None) -
ref(str | None) -
resume(bool) -
prompt(str | None)
Source code in octomate/schemas/triage.py
125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 | |
agent_id
pydantic-field
¶
The driven agent selected to resume the history at the destination.
destination
pydantic-field
¶
Where the move goes: the chat a new thread opens in, or this conversation when the move only binds it to a project. A spell that names none means the current conversation, resolved before the decision exists.
new_thread
pydantic-field
¶
Create a thread at the address; false only binds the current thread to a project.
project
pydantic-field
¶
The project the thread landed in is bound to, and whose workspace the agent resumes in; None carries the conversation only.
ref
pydantic-field
¶
The branch, tag or commit that workspace starts from; None for the project's default branch.
resume
pydantic-field
¶
Whether the agent carries on at once where it lands; false leaves the conversation there for the next message.
prompt
pydantic-field
¶
The user's next message, sent where the move lands; only the console's own Teleport has one.
metadata ¶
What the deferral carries, as plain values: enough for the graph to rebuild this decision at its boundary.
Source code in octomate/schemas/triage.py
deferral ¶
This move as the deferral the graph performs — what an interrupted
runtime's turn ends with, shaped as Inkling's own CallDeferred is.
Source code in octomate/schemas/triage.py
AgentRoute
dataclass
¶
A summonable (agent, model) pair and the claim it advertises. Agents advertise; the caller requests — the claim publishes the space this route supports, and a caller picks a point in it.
Source code in octomate/schemas/triage.py
ProjectSummary
dataclass
¶
One registered project, as a model choosing between them needs it.
Source code in octomate/schemas/triage.py
octomate.schemas.deferred ¶
Deferred actions: the questions and approvals a run parks for a human, and the batch they are presented and resolved as.
DeferredActionVariantAdapter
module-attribute
¶
DeferredActionCollection
module-attribute
¶
DeferredActionCollection = TypeAdapter(
Annotated[
list[DeferredActionVariant],
BeforeValidator(from_deferred_requests),
]
)
DeferredActionPayload ¶
DeferredActionCollectionInput ¶
DeferredActionVariant ¶
DeferredActionVariant = Annotated[
DeferredQuestion | DeferredApproval,
Field(discriminator="kind"),
]
QuestionRequest ¶
Bases: TypedDict
One question's arguments: the text, optional choices, and a hint.
Source code in octomate/schemas/deferred.py
choices
instance-attribute
¶
choices: NotRequired[
Annotated[
list[str] | None,
Field(
max_length=MAX_QUESTION_CHOICES,
description=f"Up to {MAX_QUESTION_CHOICES} suggested choices. The user can still answer with text.",
),
]
]
multi_select
instance-attribute
¶
multi_select: NotRequired[
Annotated[
bool,
Field(
description="Whether several choices may be picked together, in which case the answer lists the picks."
),
]
]
ApprovalRequest
pydantic-model
¶
Bases: BaseModel
What an approval card shows: the tool, its arguments, a title and a description.
Fields:
-
tool_name(str) -
args(JsonObject) -
title(str) -
description(str)
Source code in octomate/schemas/deferred.py
ApprovalRequestPayload ¶
Bases: TypedDict
Source code in octomate/schemas/deferred.py
DeferredQuestionPayload ¶
Bases: TypedDict
Source code in octomate/schemas/deferred.py
DeferredApprovalPayload ¶
Bases: TypedDict
Source code in octomate/schemas/deferred.py
DeferredAction ¶
Bases: BaseTransmuter
One pending action in a batch — a question or an approval — and how it resolved.
Source code in octomate/schemas/deferred.py
model_config
class-attribute
instance-attribute
¶
id
class-attribute
instance-attribute
¶
metadata
class-attribute
instance-attribute
¶
metadata: JsonObject = Field(
default_factory=dict,
validation_alias=AliasChoices("meta", "metadata"),
)
result
class-attribute
instance-attribute
¶
created_at
class-attribute
instance-attribute
¶
updated_at
class-attribute
instance-attribute
¶
DeferredQuestion ¶
Bases: DeferredAction
A question the run asked, answered with text.
Source code in octomate/schemas/deferred.py
DeferredApproval ¶
Bases: DeferredAction
A tool call awaiting approval, resolved to allow or deny.
Source code in octomate/schemas/deferred.py
DeferredActionBatch ¶
Bases: BaseTransmuter
A run's deferred requests as one unit: persisted, presented, and rebuilt into results once every action is resolved.
Source code in octomate/schemas/deferred.py
id
class-attribute
instance-attribute
¶
response_mode
class-attribute
instance-attribute
¶
response_mode: DeferredResponseMode = Field(
description="Whether a reply answers a live request or resumes a suspended run."
)
created_at
class-attribute
instance-attribute
¶
updated_at
class-attribute
instance-attribute
¶
questions
class-attribute
instance-attribute
¶
approvals
class-attribute
instance-attribute
¶
build_results ¶
Source code in octomate/schemas/deferred.py
from_deferred_requests ¶
Source code in octomate/schemas/deferred.py
octomate.schemas.agent ¶
What the host reports about a registered agent.
AgentInfo
pydantic-model
¶
Bases: BaseModel
A registered agent as the host reports it: its routes, permission modes and live sessions.
Fields:
-
id(str) -
description(str) -
gateway(bool) -
default_model(AgentRouteModelName | None) -
permission_modes(tuple[PermissionMode, ...]) -
default_permission_mode(str | None) -
routes(list[AgentRoute]) -
driven_sessions(int) -
native_sessions(int)
Source code in octomate/schemas/agent.py
gateway
pydantic-field
¶
Whether this agent's driven turns offer the routing and project spells; the agent's own flag is the only switch.
default_model
pydantic-field
¶
The catalog model used to inspect a new conversation's default capabilities; null when the harness has not reported its default. Omitting a model at execution still leaves the harness's selection intact.
permission_modes
pydantic-field
¶
Selectable permission modes in the agent's own vocabulary.
default_permission_mode
pydantic-field
¶
The configured permission mode used when a conversation declares none.
driven_sessions
pydantic-field
¶
Live runs this instance is driving on the agent's runtime.
native_sessions
pydantic-field
¶
Native transcript streams currently attached to this agent — sessions someone else started that this instance is reading, not driving.