Protocol Translation
Convert external protocols to internal Envelope format
The Protocol layer (L7) is the outermost layer of the ARAL architecture, responsible for external communication, protocol translation, and interoperability with other systems.
The Protocol layer acts as the agent’s “ambassador” to the outside world, translating between external protocols and the internal Envelope format used throughout ARAL.
Protocol Translation
Convert external protocols to internal Envelope format
Authentication
Verify identity of external callers
Rate Limiting
Protect against abuse and overload
API Documentation
Expose OpenAPI/AsyncAPI specifications
| Protocol | Support | Use Case | Priority |
|---|---|---|---|
| MCP | MUST | Model Context Protocol | High |
| A2A | SHOULD | Agent-to-Agent | High |
| REST | MUST | HTTP APIs | High |
| gRPC | MAY | High-performance | Medium |
| WebSocket | SHOULD | Real-time | Medium |
| GraphQL | MAY | Flexible queries | Low |
| Requirement | Description |
|---|---|
| MCP Compatibility | Must support Model Context Protocol |
| REST APIs | Must expose HTTP/REST endpoints |
| Message Validation | Validate all incoming messages |
| Envelope Transform | Convert to internal Envelope format |
| Requirement | Description |
|---|---|
| Authentication | Verify caller identity (OAuth2/OIDC) |
| Authorization | Check permissions before processing |
| TLS Required | Use TLS 1.3+ for external communication |
| Request Signing | Support cryptographic request signing |
| Requirement | Description |
|---|---|
| Rate Limiting | Prevent abuse and overload |
| Timeout Handling | Enforce request timeouts |
| Error Responses | Return structured, helpful errors |
| Compression | Support gzip/brotli compression |
{ "jsonrpc": "2.0", "id": 1, "method": "tools/call", "params": { "name": "web_search", "arguments": { "query": "ARAL specification" } }}{ "jsonrpc": "2.0", "id": 1, "result": { "content": [ { "type": "text", "text": "Found 10 results for 'ARAL specification'" } ] }}{ "envelope": { "id": "generated-uuid", "trace_id": "generated-trace-uuid", "timestamp": "2026-01-15T12:00:00Z", "version": "1.0", "source": { "layer": "L7", "protocol": "mcp", "caller_id": "external-client" }, "destination": { "layer": "L3", "capability_id": "web_search" }, "payload": { "query": "ARAL specification" }, "metadata": { "mcp_request_id": 1, "mcp_method": "tools/call" } }}GET /api/v1/agents/{agent_id}/statusPOST /api/v1/agents/{agent_id}/invokeGET /api/v1/agents/{agent_id}/capabilitiesPOST /api/v1/agents/{agent_id}/capabilities/{capability_id}GET /api/v1/agents/{agent_id}/memoryPOST /api/v1/agents/{agent_id}/memoryDELETE /api/v1/agents/{agent_id}/memory/{memory_id}POST /api/v1/agents/agent-123/capabilities/web_searchAuthorization: Bearer eyJhbGc...Content-Type: application/jsonX-Trace-Id: trace-uuid
{ "parameters": { "query": "ARAL specification", "max_results": 10 }}HTTP/1.1 200 OKContent-Type: application/jsonX-Trace-Id: trace-uuidX-Request-Id: request-uuid
{ "success": true, "result": { "results": [...] }, "execution_time_ms": 1234}POST /api/v1/agents/agent-123/invokeAuthorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...Content-Type: application/json
{ "capability": "web_search", "parameters": {...}}{ "token_validation": { "algorithm": "RS256", "issuer": "https://auth.example.com", "audience": "aral-agent-api", "claims": { "sub": "user-123", "scope": ["agent:read", "agent:invoke"], "exp": 1737024000 } }}{ "mtls": { "enabled": true, "client_cert_required": true, "trusted_ca": "/path/to/ca.crt", "verify_depth": 2 }}{ "rate_limits": { "global": { "requests_per_second": 100, "burst": 20 }, "per_user": { "requests_per_minute": 60, "requests_per_hour": 1000 }, "per_ip": { "requests_per_second": 10 } }}HTTP/1.1 429 Too Many RequestsX-RateLimit-Limit: 60X-RateLimit-Remaining: 0X-RateLimit-Reset: 1737024000Retry-After: 42
{ "error": "rate_limit_exceeded", "message": "Too many requests. Try again in 42 seconds."}const ws = new WebSocket('wss://agent.example.com/ws');
ws.onopen = () => { ws.send(JSON.stringify({ type: 'subscribe', agent_id: 'agent-123', channels: ['status', 'events'] }));};
ws.onmessage = (event) => { const message = JSON.parse(event.data); console.log('Received:', message);};{ "type": "event", "timestamp": "2026-01-15T12:00:00Z", "agent_id": "agent-123", "event": "decision_made", "data": { "decision_id": "uuid", "action": "web_search", "confidence": 0.95 }}{ "error": { "code": "invalid_request", "message": "Missing required parameter 'query'", "details": { "field": "query", "expected_type": "string" }, "trace_id": "uuid", "timestamp": "2026-01-15T12:00:00Z" }}| Code | HTTP Status | Description |
|---|---|---|
invalid_request | 400 | Malformed or invalid request |
unauthorized | 401 | Missing or invalid authentication |
forbidden | 403 | Insufficient permissions |
not_found | 404 | Resource not found |
rate_limit_exceeded | 429 | Too many requests |
internal_error | 500 | Internal server error |
service_unavailable | 503 | Service temporarily unavailable |
{ "openapi": "3.1.0", "info": { "title": "ARAL Agent API", "version": "1.0.0", "description": "API for interacting with ARAL-compliant agents" }, "servers": [ { "url": "https://agent.example.com/api/v1" } ], "paths": { "/agents/{agent_id}/invoke": { "post": { "summary": "Invoke agent capability", "parameters": [...], "requestBody": {...}, "responses": {...} } } }}POST /api/v1/agents/agent-123/invokeAccept: application/json, application/protobuf;q=0.9Content-Type: application/jsonGET /api/v1/agents/agent-123/statusX-API-Version: 2.0Response:
HTTP/1.1 200 OKX-API-Version: 2.0X-Supported-Versions: 1.0, 2.0MCP
Tool calling, streaming, context management
REST
CRUD operations, pagination, filtering
WebSocket
Real-time events, bidirectional streaming
gRPC
High performance, streaming, type safety
© 2026 IbIFACE — CC BY 4.0