AGNTCY/SLIM support #13
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
SLIM Protocol Support - Secure Low-latency Interactive Messaging
This PR adds support for the AGNTCY SLIM protocol, enabling agents to communicate via gRPC-based point-to-point messaging with persistent connections. SLIM provides an alternative to HTTP-based A2A communication, offering lower latency and more efficient bi-directional streaming.
🎯 Key Changes
SLIM Protocol Integration
SLIMProtocoladapter(protocols/slim/adapter.py)using official slim-bindings SDKProtocol Router Enhancements
ProtocolRouterto launch protocols concurrentlyConfiguration & Setup
Agent Bridge Updates
Testing Infrastructure
📦 Architecture
Agent Communication Flow:
Agent A (sender)
└─> ProtocolRouter.send_message()
└─> SLIMProtocol.send_message()
├─> slim.set_route(target_name)
├─> slim.create_session(PointToPoint)
├─> session.publish(message)
└─> session.get_message() [reply]
🔧 Configuration Example
Enable SLIM in your agent:
nanda = NANDA(
agent_id="my-agent",
agent_logic=my_logic,
protocols={
"a2a": {"enabled": True},
"slim": {
"enabled": True,
"node_url": "grpc://localhost:50051"
}
}
)
Environment Variables:
SLIM_ENABLED=true
SLIM_NODE_URL=grpc://localhost:50051
Docker Compose:
docker-compose up -d # Starts SLIM control plane + data plane
✅ Benefits
🚀 Protocol Selection Logic
📋 Next Steps