Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 19 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,12 @@ Version `0.1.x` contains the converged foundation layer:
stream-repetition detection;
- portable loop observers for budget/context/wall-clock guards, finalization,
repetition detection, SSE events, task boards, and bounded trajectories;
- shared agent-bus stop signals/pools, filesystem skill loaders, session
history, renewable wall-time leases, and language helpers.
- complete agent-bus communication, spawn control, reusable sessions,
result recovery, fan-in policy, shared pools and stop signals;
- portable tools, task/finalization budgets, role-scoped resource management,
and backend-injected DAG scheduling;
- filesystem skill loaders, session history, renewable wall-time leases, and
language helpers.

The initial extraction is based on the already-merged integration branches:

Expand All @@ -68,9 +72,10 @@ Code belongs in AgentCore when it:
- accepts product behavior through typed inputs or explicit hooks;
- has tests that run without either product repository installed.

Provider clients, session affinity, user/session retention policy, checkpoint
association, workflow node implementations, sandbox mounting/authorization,
UI history, and product-specific observers remain in their product.
Provider clients, session affinity, durable process/event-store implementations,
user/session retention policy, checkpoint association, workflow node
implementations, sandbox mounting/authorization, UI history, and
product-specific observers remain in their product.

## Development

Expand Down Expand Up @@ -147,10 +152,15 @@ edit both products' core copies, that is evidence it belongs here.
MiniDAG/graph construction, middleware/observers, agent-bus coordination
primitives (shared pools and stop signals), skills, session history, models,
and scoped registries.
8. **Agent-bus scheduling** (next): extract the shared communication models,
runtime, spawn guard, bus, and fan-in orchestration behind explicit product
hooks. Product tool assembly and workflow-specific policy remain downstream.
9. Remove product compatibility facades after downstream imports have moved to
8. **Agent-bus scheduling** (complete in AgentCore): communication models,
durable result-message recovery, runtime, spawn guard, reusable sessions,
bus/fan-in orchestration, resource management, task budgets, and the
backend-injected DAG scheduler. Product tool assembly, persistence backends,
and workflow policy remain downstream.
9. **Provider substrate** (next): converge the shared provider transports,
fallback engine, prompt cache, usage metering, and non-blocking streaming
behind product configuration and session-affinity adapters.
10. Remove product compatibility facades after downstream imports have moved to
`agent_core`.

Each slice must leave product CI green and must not depend on a floating branch.
104 changes: 103 additions & 1 deletion agent_core/components/agent_bus/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,103 @@
"""Portable agent coordination primitives."""
"""AgentBus — multi-agent dispatch, communication, and spawn control.

Also serves as the back-compat entry point for ``agent_core.components.agent_bus``
(the former flat-file module). Re-exports the public API from submodules.
"""

from agent_core.components.agent_bus.agent_comm import (
AgentComm,
DeliveryMode,
EventStoreContractError,
event_ordinal,
)
from agent_core.components.agent_bus.bus import (
AgentBus,
configure_default_event_sink_resolver,
configure_default_pause_check_factory,
configure_default_session_activity,
)
from agent_core.components.agent_bus.fan_in import (
COMPLETE_STOP_REASONS,
INCOMPLETE_STOP_REASONS,
ORCHESTRATOR_AGENT_NAME,
CompletionInfo,
CompletionPolicy,
FanInBatch,
classify_completion,
format_report_block,
format_status_line,
format_status_report_block,
process_collected,
session_state,
)
from agent_core.components.agent_bus.models import (
CollectResult,
DepthLimitExceeded,
JobEntry,
PendingSessionTask,
SessionWaitOutcome,
SubAgentResult,
SubAgentRuntimeSpec,
SubAgentSession,
SubTask,
)
from agent_core.components.agent_bus.runtime import (
adapt_default_session_result,
adapt_default_subagent_result,
build_default_subagent_loop_config,
build_default_subagent_observers,
build_session_loop_config,
close_session_boundary_aborted,
resolve_session_observers,
)
from agent_core.components.agent_bus.shared_pool import SharedArtifactPool
from agent_core.components.agent_bus.spawn_guard import (
BudgetExhausted,
SpawnDepthExceeded,
SpawnGuard,
SpawnReservation,
)

__all__ = [
"COMPLETE_STOP_REASONS",
"INCOMPLETE_STOP_REASONS",
"ORCHESTRATOR_AGENT_NAME",
"AgentBus",
"AgentComm",
"BudgetExhausted",
"CollectResult",
"CompletionInfo",
"CompletionPolicy",
"DeliveryMode",
"DepthLimitExceeded",
"EventStoreContractError",
"FanInBatch",
"JobEntry",
"PendingSessionTask",
"SessionWaitOutcome",
"SharedArtifactPool",
"SpawnDepthExceeded",
"SpawnGuard",
"SpawnReservation",
"SubAgentResult",
"SubAgentRuntimeSpec",
"SubAgentSession",
"SubTask",
"adapt_default_session_result",
"adapt_default_subagent_result",
"build_default_subagent_loop_config",
"build_default_subagent_observers",
"build_session_loop_config",
"classify_completion",
"close_session_boundary_aborted",
"configure_default_event_sink_resolver",
"configure_default_pause_check_factory",
"configure_default_session_activity",
"event_ordinal",
"format_report_block",
"format_status_line",
"format_status_report_block",
"process_collected",
"resolve_session_observers",
"session_state",
]
Loading