Skip to content

Commit f6eede2

Browse files
committed
feat(cortex-agents): implement multi-agent collaboration system
Implements AGENT_1 mission from ORCHESTRATE plan: ## Collaboration Module (collab/) - spawn_agent: Create subagents with depth limit enforcement - send_input: Inter-agent communication with interrupt support - wait: Synchronize on multiple agents with configurable timeout - close_agent: Graceful shutdown with RAII guards ## Task DAG Module (task/) - TaskDag: Directed acyclic graph for task dependencies - Topological sort for execution ordering - Status propagation (completion unlocks dependents, failure skips) - Persistence: Save/load DAG state to JSON - Hydration: Create DAGs from task specifications ## Routing Module (routing/) - DispatchMode: Parallel, Sequential, Background, Single - decide_routing: Automatic dispatch mode selection - File conflict detection for safe parallel execution - Priority-based execution ordering ## Security Features - MAX_THREAD_SPAWN_DEPTH = 1 (prevents infinite recursion) - MAX_CONCURRENT_AGENTS = 10 - Timeout clamping (10s min, 5min max) - AgentGuard for automatic cleanup All 92 tests passing.
1 parent e2e48f1 commit f6eede2

14 files changed

Lines changed: 4271 additions & 0 deletions

File tree

Cargo.lock

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cortex-agents/Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,5 @@ tracing = "0.1"
1313
thiserror = "1"
1414
uuid = { version = "1", features = ["v4"] }
1515
regex = "1"
16+
futures = "0.3"
17+
chrono = { version = "0.4", features = ["serde"] }

0 commit comments

Comments
 (0)