Bindu Protocol
The Language of Agents: A2A and AP2 Protocol Types In the constellation of autonomous agents, communication is everything. Just as humans developed languages to share ideas, agents need a precise vocabulary to understand each other. This is where A2A (Agent-to-Agent) and AP2 (Agent Protocol 2) come alive. Bindu implements these protocols as the Rosetta Stone for agent communication - every message, every task, every handshake between agents is defined here. These aren’t just data structures; they’re the building blocks of trust, the grammar of collaboration, and the syntax of emergent intelligence. Official Specifications:Bindu follows A2A v0.3.0 and AP2 v0.1.0 with additional extensions marked as
<NotPartOfA2A>
for enhanced functionality.Protocol Overview
Bindu’s protocol is built on four foundational pillars:JSON-RPC 2.0
Standard request/response messaging protocol
Task-Based Model
Stateful execution units coordinating client-agent interaction
Context Management
Conversation sessions grouping related tasks
Type Safety
Pydantic-validated TypedDict structures
Core Protocol Entities
Messages
Messages represent all non-result communication in the Bindu protocol. Unlike Artifacts (which contain task outputs), Messages carry operational content like instructions, status updates, context, and metadata.- User Instructions: Task requests with context and files
- Agent Communication: Status updates, thoughts, coordination
- System Messages: Errors, warnings, protocol information
- Context Sharing: Background information, references, metadata
TextPart
TextPart
FilePart
FilePart
DataPart
DataPart
Tasks
Tasks serve as the primary coordination mechanism in the Bindu protocol, managing the complete lifecycle from request to completion.- Message Exchange: Facilitate communication between clients and agents
- State Management: Track task progress and execution status
- Artifact Collection: Gather and organize agent-generated outputs
- History Tracking: Maintain complete conversation and decision trail
State | Description | A2A Standard |
---|---|---|
submitted | Task submitted, awaiting execution | ✓ |
working | Agent actively working on the task | ✓ |
input-required | Task paused, waiting for user input | ✓ |
completed | Task successfully completed | ✓ |
canceled | Task canceled by user | ✓ |
failed | Task failed due to error | ✓ |
rejected | Task rejected by agent | ✓ |
auth-required | Authentication required to proceed | ✓ |
payment-required | Payment required to proceed | Extension |
unknown | Unknown or indeterminate state | Extension |
trust-verification-required | Trust verification required | Extension |
pending | Task pending execution | Extension |
suspended | Task suspended, not running | Extension |
resumed | Task resumed after suspension | Extension |
negotiation-bid-submitted | Bid submitted for negotiation | Extension |
negotiation-bid-lost | Bid lost in negotiation | Extension |
negotiation-bid-won | Bid won in negotiation | Extension |
Artifacts
Artifacts represent the final output generated by an agent after completing a task. They are immutable data structures containing the results of agent execution.- Immutable: Once created, artifacts cannot be modified
- Multi-part: Can contain text, files, and structured data
- Streamable: Parts can be appended during streaming responses
- Traceable: Each artifact has a unique ID for reference
Contexts
Contexts serve as conversation containers, managing the complete interaction lifecycle between clients and agents.- Session Management: Group related tasks under a unified conversation
- History Preservation: Maintain complete message history across tasks
- Context Continuity: Preserve conversation state and references
- Metadata Tracking: Store session-level information and preferences
JSON-RPC 2.0 Protocol
All communication in Bindu uses JSON-RPC 2.0 for request/response messaging.Base Types
Message Operations
message/send
message/send
Send a message and wait for complete response.Request:Response:
message/stream
message/stream
Stream messages with real-time updates via Server-Sent Events (SSE).Request:Response (SSE Stream):
Task Operations
tasks/get
tasks/get
Retrieve task details and history.Request:Response:
tasks/cancel
tasks/cancel
Cancel a running task.Request:
tasks/list
tasks/list
List all tasks (Bindu extension).Request:
tasks/feedback
tasks/feedback
Provide feedback on task execution (Bindu extension).Request:
Context Operations
contexts/list
contexts/list
List all conversation contexts.Request:
contexts/clear
contexts/clear
Clear a context and its tasks.Request:
Error Handling
Bindu implements standard JSON-RPC 2.0 errors plus A2A-specific and custom error codes.Standard JSON-RPC Errors
Code | Error | Description |
---|---|---|
-32700 | Parse Error | Invalid JSON payload |
-32600 | Invalid Request | Request validation failed |
-32601 | Method Not Found | Method not available |
-32602 | Invalid Params | Invalid parameters |
-32603 | Internal Error | Internal server error |
A2A-Specific Errors
Code | Error | Description |
---|---|---|
-32001 | Task Not Found | Task ID not found |
-32002 | Task Not Cancelable | Cannot cancel task in current state |
-32003 | Push Notification Not Supported | Push notifications not supported |
-32004 | Unsupported Operation | Operation not supported |
-32005 | Content Type Not Supported | Content type not supported |
-32006 | Invalid Agent Response | Agent returned invalid response |
-32007 | Authenticated Extended Card Not Configured | Agent card not configured |
Bindu Extensions
Code | Error | Description |
---|---|---|
-32008 | Task Immutable | Task in terminal state, cannot modify |
-32009 | Authentication Required | Authentication required |
-32010 | Invalid Token | Invalid authentication token |
-32011 | Token Expired | Authentication token expired |
-32012 | Invalid Token Signature | Token signature verification failed |
-32013 | Insufficient Permissions | Insufficient permissions |
-32020 | Context Not Found | Context ID not found |
-32021 | Context Not Cancelable | Cannot cancel context |
Agent System
Agent Identity
Agent Trust
Level | Description |
---|---|
viewer | View-only access, minimal permissions |
guest | Limited access, read-only operations |
analyst | Standard operations |
operator | System operations, moderate risk |
editor | Edit operations, moderate risk |
auditor | Sensitive operations |
manager | Management operations, elevated permissions |
admin | Admin operations, minimal risk |
support | Support operations, troubleshooting access |
super_admin | Highest level access, all operations permitted |
Agent Skills
Agent Card
AP2 Protocol - Payment & Commerce
Bindu implements the AP2 protocol for agent-to-agent commerce and payments.Payment Request
Mandates
AP2 defines three types of mandates for secure commerce:Intent Mandate
Intent Mandate
Represents the user’s purchase intent in human-present flows.
Cart Mandate
Cart Mandate
A cart whose contents have been digitally signed by the merchant.
Payment Mandate
Payment Mandate
Contains the user’s instructions and authorization for payment.
Agent Negotiation
Bindu extends A2A with agent-to-agent negotiation capabilities.Security & Authentication
Security Schemes
Bindu supports multiple authentication methods:HTTP Auth
HTTP Auth
API Key
API Key
OAuth2
OAuth2
Mutual TLS
Mutual TLS
Push Notifications
Implementation Notes
All types use Pydantic for validation and serialization with automatic camelCase conversion via
alias_generator=to_camel
.- Type Safety: TypedDict provides static type checking
- Runtime Validation: Pydantic validates at runtime
- Discriminated Unions: Type-safe polymorphism for different message/artifact types
- Generic Types: Flexible request/response patterns
- UUID Types: Unique identification across the system
- Extensibility: Protocol designed for backwards-compatible extensions
Best Practices
Message Design
Message Design
- Keep messages focused on a single task
- Include relevant context in metadata
- Use appropriate content types (text, file, data)
- Provide clear instructions and examples
- Leverage embeddings for semantic search (Bindu extension)
Task Management
Task Management
- Always check task status before operations
- Handle all task states in your client code
- Use
reference_task_ids
to link related tasks - Implement proper error handling for terminal states
- Respect task immutability in terminal states
Context Handling
Context Handling
- Group related tasks under the same context
- Use context metadata for session preferences
- Implement context lifecycle management
- Clean up completed/archived contexts periodically
Error Handling
Error Handling
- Always check response for errors
- Implement retry logic with exponential backoff
- Log errors with full context
- Provide meaningful error messages to users
- Handle both A2A standard and Bindu extension errors
Security
Security
- Validate all incoming requests
- Use minimum required trust levels
- Implement proper authentication
- Never expose private keys or credentials
- Validate JWT signatures
Next Steps
Protocol Types
Complete type definitions and schemas
Quickstart
Build your first Bindu agent
Examples
See protocol implementation examples
GitHub Repository
View the source code
When agents need to work together, they speak Bindu. The protocol provides a robust foundation for building decentralized AI agent systems following A2A and AP2 specifications with thoughtful extensions for real-world agent collaboration.