DRPC Module
The@credo-ts/drpc package provides Distributed Remote Procedure Call (DRPC) functionality for secure agent-to-agent communication.
Installation
Registration
What It Provides
The DRPC module enables:- Remote procedure calls between connected agents
- Request-response patterns over DIDComm
- Type-safe RPC definitions
- Async/await style communication
Usage
Defining RPC Methods
Calling Remote Methods
Handling RPC Requests
Use Cases
- Service Integration - Connect microservices via DIDComm
- Agent Orchestration - Coordinate multiple agents
- Data Synchronization - Sync data between agents
- Distributed Workflows - Implement multi-agent workflows
Error Handling
Security Considerations
- All RPC calls are authenticated via DIDComm
- Requests are encrypted end-to-end
- Validate input parameters on the server side
- Implement rate limiting for public endpoints
- Use timeouts to prevent hanging requests
See Also
- DIDComm Module - DIDComm protocol support
- Connections - Connection management