Skip to main content

ACGS-2 Enhanced Agent Bus with Constitutional Compliance

Project description

enhanced-agent-bus

PyPI Python License: AGPL-3.0

High-performance agent communication infrastructure with constitutional governance.

enhanced-agent-bus is the ACGS runtime layer for governed agent-to-agent messaging. It combines message routing, registration, constitutional validation, MACI-aware controls, deliberation hooks, and FastAPI API surfaces in a single package.

Installation

enhanced-agent-bus supports Python 3.11+.

pip install enhanced-agent-bus
pip install enhanced-agent-bus[dev]
pip install enhanced-agent-bus[ml]
pip install enhanced-agent-bus[pqc]
pip install enhanced-agent-bus[postgres]
pip install enhanced-agent-bus[messaging]

Quick Start

from enhanced_agent_bus import AgentMessage, EnhancedAgentBus, MessageType, Priority

bus = EnhancedAgentBus(redis_url="redis://localhost:6379", enable_maci=True)
await bus.start()

await bus.register_agent(
    "planner",
    agent_type="supervisor",
    capabilities=["planning", "reasoning"],
)
await bus.register_agent(
    "executor",
    capabilities=["code", "deploy"],
)

message = AgentMessage(
    from_agent="planner",
    to_agent="executor",
    message_type=MessageType.COMMAND,
    priority=Priority.HIGH,
    content={"action": "deploy", "target": "staging"},
    constitutional_hash=bus.constitutional_hash,
)

result = await bus.send_message(message)
assert result.is_valid

await bus.stop()

API Server

python -m enhanced_agent_bus.api

That starts the package's FastAPI app. The application factory also lives at enhanced_agent_bus.api.app:create_app.

Deliberation and Adapters

  • The deliberation layer is exposed via enhanced_agent_bus.deliberation_layer and is also split into the separate acgs-deliberation compatibility package.
  • LLM adapter primitives live under enhanced_agent_bus.llm_adapters, including LLMAdapterRegistry, FallbackChain, provider configs, and constrained-output helpers.
  • Some optional adapter and ML features require the extras listed above.

Key Features

  • Redis-backed or mixed-mode agent registration and message routing.
  • Constitutional hash validation, tenant isolation, and fail-closed validation paths.
  • MACI enforcement and governance-aware message processing.
  • Deliberation, impact scoring, and approval-routing hooks for higher-risk actions.
  • Observability, rate limiting, retry/idempotency handling, and extensible plugin surfaces.

Testing

python -m pytest packages/enhanced_agent_bus/tests/ -v --import-mode=importlib
python -m pytest packages/enhanced_agent_bus/tests/ -m "not slow" -v --import-mode=importlib

License

AGPL-3.0-or-later. Commercial licensing is available; contact hello@acgs.ai.

Links

Constitutional Hash: 608508a9bd224290

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

enhanced_agent_bus-3.0.2.tar.gz (4.7 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

enhanced_agent_bus-3.0.2-py3-none-any.whl (2.2 MB view details)

Uploaded Python 3

File details

Details for the file enhanced_agent_bus-3.0.2.tar.gz.

File metadata

  • Download URL: enhanced_agent_bus-3.0.2.tar.gz
  • Upload date:
  • Size: 4.7 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for enhanced_agent_bus-3.0.2.tar.gz
Algorithm Hash digest
SHA256 333bda21705e0277696f82c202522139a1a06af7dd3ec3f4663064b2b25511e0
MD5 c5d987134c93c5ddc1e69a6c6bde41e9
BLAKE2b-256 1d6e5064ee82f1e97953870b10deadd8cfde1f831a041767187eed2c5cc18580

See more details on using hashes here.

File details

Details for the file enhanced_agent_bus-3.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for enhanced_agent_bus-3.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 1f8abdc3fc127a88c1b752bf077a75ecd04ecfa0fe4dfe2999e3e826c6f816c7
MD5 b85e5bc3d82fc5e76f0a82b0312555c7
BLAKE2b-256 00436a0452f14c4eeadccfde396c6a12cf39aed199190e8c81176240de499115

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page