# Architecture
AgentBridge is five crates and one binary. They stack from transport up to the
CLI, and the identity and secret crates they sit on are
[polis](https://github.com/agntcy/polis)'s.
```mermaid
graph BT
slim["agntcy-agentbridge-transport-slim
SLIM sessions, stdio bridge"]
a2a["agntcy-agentbridge-a2a
A2A channels"]
mas["agntcy-agentbridge-mas
coordination runtime"]
lib["agntcy-agentbridge
adapters, registry, context"]
cli["agentbridge
the CLI"]
mas --> slim
mas --> a2a
lib --> mas
lib --> a2a
cli --> lib
cli --> mas
cli --> slim
```
## The crates
### `agntcy-agentbridge-transport-slim`
SLIM transport integration and the stdio bridge. Provides `NativeSlimSession`
for point-to-point and group messaging, and `LiveSlimMessagingAdapter` /
`LiveSlimGroupSender` for broadcast with receipt acknowledgements.
### `agntcy-agentbridge-a2a`
A2A channel support across SLIMRPC, gRPC, JSON-RPC and HTTP+JSON.
`A2AChannel` and `A2AChannelBuilder` give identity-verified A2A over whichever
transport is configured — the transport is a choice, not a fixed dependency.
### `agntcy-agentbridge-mas`
The coordination runtime: epochs, engines, and the ASSEMBLY / CONVERGE
patterns that drive multi-round collaboration. `LiveA2ATaskAdapter` dispatches
tasks over A2A. See [MAS Runtime](mas.md).
### `agntcy-agentbridge`
The library: the `CliAdapter` trait and its adapters, `ContextPacket` and the
context types that move between agents, the DIR and on-host registries, and
`MemberSource` for discovering who belongs in a group.
### `agentbridge` (`agntcy-agentbridge-cli`)
The binary over all of the above. See the [CLI Reference](cli.md).
## What it sits on
Identity, secrets and credentials come from polis. They are still vendored
here as `shadi_identity`, `agent_secrets`, `shadi_credential` and
`shadi_telemetry` until polis publishes its renamed crates — tracked in
[agntcy/shadi#647](https://github.com/agntcy/shadi/issues/647).
Confinement is deliberately *not* a dependency. `register` requires that the
process is already confined, and checks that with a small kernel probe held in
this repository, so Docker, systemd, gVisor, Firejail or
[shadi](https://github.com/agntcy/shadi) all satisfy it and none of them is
linked in.
## Next steps
- [AgentBridge in depth](agentbridge.md) — the mechanism in full.
- [SLIM and A2A](slim_a2a.md) — the transport layer.
- [Security Notes](security.md) — the admission model.