Expand description
Unified Agent Thread System
All concurrent agent-managed work is represented as threads:
- Chat threads (user-interactive conversations)
- Sub-agent threads (spawned workers)
- Background threads (long-running monitors)
- Task threads (one-shot work that returns a result)
All threads share:
- Unique ID and label
- Agent-settable description
- Status tracking
- Sidebar visibility
- Event emission on state changes
Re-exports§
pub use subtask::SubtaskHandle;pub use subtask::SubtaskRegistry;pub use subtask::SubtaskResult;pub use subtask::SpawnOptions;pub use subtask::spawn_subagent;pub use subtask::spawn_task;pub use subtask::spawn_background;
Modules§
- subtask
- Subtask abstraction — async spawn/join integrated with ThreadManager.
Structs§
- Agent
Thread - An agent thread — the unified representation of all concurrent work.
- Thread
Id - Unique identifier for a thread.
- Thread
Info - Summary info for sidebar display.
- Thread
Manager - Manages all agent threads with event emission.
- Thread
Manager Config - Configuration for thread management.
- Thread
Message - A message in a thread’s conversation history.
Enums§
- Message
Role - Message role.
- Thread
Event - Events emitted by the ThreadManager.
- Thread
Kind - What kind of thread this is.
- Thread
Status - Thread status.
Type Aliases§
- Shared
Thread Manager - Shared thread manager type.
- TaskId