Skip to main content

brainos_delegate/
lib.rs

1//! # Agent Delegation
2//!
3//! Brain hands off subtasks to specialist agents — any CLI binary or
4//! HTTP-driven agent — through a single generic trait. The orchestrator
5//! only knows the trait; implementations live here.
6//!
7//! Core types:
8//! - [`AgentDelegate`] — the trait every specialist agent implements
9//! - [`AgentTask`] / [`AgentResult`] — request/response envelope
10//! - [`AgentRegistry`] — looks up delegates by name, with aliasing
11//! - [`SubprocessAgentDelegate`] — generic subprocess-backed adapter
12
13pub mod discovery;
14pub mod escalate;
15pub mod registry;
16pub mod subprocess;
17pub mod traits;
18
19pub use discovery::{
20    default_fingerprints, AgentFingerprint, DelegateDiscovery, DiscoveredBinary, DiscoveryStatus,
21    PathScanner, DEFAULT_PROBE_TIMEOUT,
22};
23pub use escalate::{run_with_escalation, EscalationOutcome, EscalationPolicy};
24pub use registry::{
25    AgentOverride, AgentRegistry, AgentSource, CustomAgentSpec, DelegateOverrides,
26    RegistryAgentStatus,
27};
28pub use subprocess::{SubprocessAgentConfig, SubprocessAgentDelegate};
29pub use traits::{
30    AgentCapabilities, AgentContext, AgentDelegate, AgentError, AgentResult, AgentTask,
31    AgentTaskStatus, Artifact, CredentialRef,
32};