Skip to main content

Crate tact_subagents

Crate tact_subagents 

Source
Expand description

§tact-subagents

GitHub Actions Workflow Status Crates.io License Crates.io MSRV Crates.io Version

tact-subagents provides structured child-agent orchestration for Nanocodex applications. It owns clean child sessions, a scoped task tree, bounded concurrent turns, directed messages, structured result validation, and lifecycle tools.

The crate exposes three integration boundaries:

  • Subagents owns one in-process runtime. Its weak handle installs Nanocodex tools without creating an ownership cycle.
  • ScopedAgentUpdate is the observation stream for lifecycle, model, and message events.
  • RootAgentAuthority lets an application restrict its own tools to coordinating root sessions.

Create one runtime for each root agent configuration. Drain its update receiver continuously, configure a factory that creates a fresh Nanocodex session for each child, and call Subagents::downgrade before capturing the handle in the root builder’s tool factory. Call WeakSubagents::install_tools there. The same tool factory is inherited by child sessions, which permits nested delegation while the runtime enforces task-tree authority.

The runtime is process-local. It does not persist live child sessions, isolate filesystem access, or provide a distributed job queue. Root and child sessions use the process and tool authority granted by the embedding application.

See the Tact subagent design for the complete lifecycle, messaging, and failure contracts.

Structs§

AgentDescriptor
Describes a child session and its position in the task tree.
AgentId
Identifies a child within one root session’s task tree.
AgentMessage
A bounded directed message between agents in one task tree.
AgentMessageUpdate
A complete thread snapshot emitted when one message changes state.
AgentThread
The retained messages in one two-party conversation.
MessageId
Identifies a directed message within one root session.
RootAgentAuthority
Identifies whether a tool call belongs to a coordinating root agent.
ScopedAgentUpdate
Associates one runtime update with its owning root session.
SubagentRuntimeId
Identifies one in-process runtime instance.
Subagents
Owns the child sessions, shared capacity, and tool state for one agent runtime.
ThreadId
Correlates the messages in one two-party conversation.
WeakSubagents
A non-owning handle used by factories installed into child sessions.

Enums§

AgentStatus
The lifecycle state of a child session.
AgentUpdate
A typed observation emitted by a Subagents runtime.
AuthorityError
Failure to establish root-session authority.
MessageDeliveryState
Tracks admission and terminal delivery separately.
MessageDisposition
Reports how a recipient accepted a message.
MessagePriority
Controls when a directed message interrupts its recipient.
MessagePurpose
Describes the coordination intent of a directed message.
MessageSender
Identifies the origin of a directed message.