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.0.tar.gz (2.0 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.0-py3-none-any.whl (512.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: enhanced_agent_bus-3.0.0.tar.gz
  • Upload date:
  • Size: 2.0 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.0.tar.gz
Algorithm Hash digest
SHA256 65186a21c5201f0accf41127f174a411143d5ab9ac462014cee8b7ccc2a44db8
MD5 b32042e4cae01a5b4ce52a0fda370b85
BLAKE2b-256 2b34d4110b05d90624c5798a21134a24299f93dde6980ac4309ad9266ffb1986

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for enhanced_agent_bus-3.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 27b269254874f9e07707c3aa3533a0c5cc281a2646fcf6df338d5d95b3541052
MD5 db3fc8700346b247967658240fae4a12
BLAKE2b-256 877d74042503ebdfe2c231070e009e1060d4af1184da37527fb5351b9fe4672a

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