Overview
Bindu follows two main protocols:- A2A (Agent-to-Agent) Protocol v0.3.0 - The standard for agent communication
- AP2 (Agent Protocol 2) v0.1.0 - Extensions for advanced features
Some types are marked as
<NotPartOfA2A> - these are Bindu-specific extensions that go beyond the standard A2A protocol.Type Aliases & Enums
Protocol types use TypeAlias definitions for enums to ensure type safety and clear state management.TaskState
Defines all possible states a task can be in during its lifecycle: Standard A2A States:submitted- Task has been submitted and is awaiting executionworking- Agent is actively working on the taskinput-required- Task is paused, waiting for user inputcompleted- Task has been successfully completedcanceled- Task has been canceled by the userfailed- Task failed due to an error during executionrejected- Task was rejected by the agent and was not startedauth-required- Task requires authentication to proceed
<NotPartOfA2A>:
payment-required- Task requires payment to proceedunknown- Task is in an unknown or indeterminate statetrust-verification-required- Task requires trust verification to proceedpending- Task is pending executionsuspended- Task is suspended and not currently runningresumed- Task is resumed and currently runningnegotiation-bid-submitted- Task is submitted for negotiationnegotiation-bid-lost- Task bid was lost in negotiationnegotiation-bid-won- Task bid was won in negotiation
NegotiationStatus <NotPartOfA2A>
Defines the status of individual negotiation proposals:
proposed- Negotiation is proposedaccepted- Negotiation is acceptedrejected- Negotiation is rejectedcountered- Counter-offer made
NegotiationSessionStatus <NotPartOfA2A>
Defines the overall status of a negotiation session:
initiated- Negotiation session is initiatedongoing- Negotiation session is ongoingcompleted- Negotiation session is completedrejected- Negotiation session is rejected
TrustLevel <NotPartOfA2A>
Defines role-based trust levels for agent authorization (ordered by permission level):
super_admin- Highest level access, all operations permittedadmin- Admin operations, minimal riskmanager- Management operations, elevated permissionsoperator- System operations, moderate riskeditor- Edit operations, moderate riskanalyst- Standard operationsauditor- Sensitive operations (read-only)support- Support operations, troubleshooting accessviewer- View-only access, minimal permissionsguest- Limited access, read-only operations
IdentityProvider <NotPartOfA2A>
Supported authentication identity providers:
keycloak- Keycloak identity providerazure_ad- Azure AD identity providerokta- Okta identity providerauth0- Auth0 identity providercustom- Custom identity provider
Data Key Constants <NotPartOfA2A>
Standard keys for structured data in DataPart objects:
CONTACT_ADDRESS_DATA_KEY="contact_picker.ContactAddress"PAYMENT_METHOD_DATA_DATA_KEY="payment_request.PaymentMethodData"CART_MANDATE_DATA_KEY="ap2.mandates.CartMandate"INTENT_MANDATE_DATA_KEY="ap2.mandates.IntentMandate"PAYMENT_MANDATE_DATA_KEY="ap2.mandates.PaymentMandate"
Parts: The Content Pieces
Parts are the fundamental building blocks for agent communication in A2A. Hereโs how they work in practice:TextPart: Simple Text Communication
Schema:FilePart: Binary Content Exchange
Schema:bytes for small files (< 1MB), uri for large files to avoid payload bloat.
DataPart: Structured Information Exchange
Schema:Key Takeaways: A2A Part Usage
Part Types (A2A Standard):- TextPart (
kind: "text"): For conveying plain textual content- Use for: Instructions, descriptions, status updates, conversational text
- FilePart (
kind: "file"): For conveying file-based content- FileWithBytes: Small files provided as base64-encoded bytes
- FileWithUri: Large files referenced by URI
- Optional:
nameandmimeTypefields
- DataPart (
kind: "data"): For conveying structured JSON data- Use for: Forms, parameters, machine-readable information
- Data is a JSON object (
dict[str, Any])
- All parts support optional
metadatafield for additional context - Parts can be used in both Messages and Artifacts
- Multiple parts can be combined in a single message
<NotPartOfA2A>:
embeddings: list[float]- Vector embeddings for semantic search and similarity
- Use
bytesfor small files,urifor large files to avoid payload bloat - Always specify
mimeTypefor files to help agents process content correctly - Use
metadatafor additional context (timestamps, confidence scores, error codes) - Structure DataPart content with clear, consistent schemas
Communication Types
Message: Operational Communication
Messages are the primary way agents, users, and systems communicate during task execution. Unlike artifacts (which contain final results), messages carry operational content like instructions, status updates, and coordination. Schema:- user: Messages from humans or client applications
- Task instructions and requests
- Follow-up questions
- Input responses
- agent: Messages from AI agents
- Status updates (โProcessing your requestโฆโ)
- Thought processes and reasoning
- Coordination between agents
- Progress notifications
- system: Protocol-level messages
<NotPartOfA2A>- Error notifications
- Authentication warnings
- Protocol-level events
Artifact: Task Results
Artifacts are the final, immutable outputs produced by agents after completing work. Once created, they cannot be modified. Ensuring a permanent, trustworthy record of agent execution. They represent tangible deliverables like reports, generated code, processed files, or analysis results. Unlike messages (which are ephemeral communication), artifacts are the persistent, unchangeable products of agent work that can be reliably referenced, shared, and audited. Schema:- Messages = Operational communication during work (ephemeral)
- Artifacts = Final deliverable results after work (persistent)
Communication Flow Pattern
Understanding the relationship between Messages, Tasks, and Artifacts: Basic Task Execution Flow: Streaming Task Execution Flow: Multi-Turn Interaction Flow: Key Concepts: Messages:- Carry instructions, context, and communication
- User messages initiate or continue tasks
- Agent messages provide status or request input
- Messages are part of the taskโs
historyarray
- Central coordination unit tracking work lifecycle
- Created by server in response to user messages
- Contain status, history, and artifacts
- State transitions:
submittedโworkingโcompleted
- Final, immutable outputs attached to completed tasks
- Delivered as part of the task result
- Can be streamed in chunks for large outputs
- Multiple artifacts possible per task
Task Management
Tasks are the fundamental coordination mechanism in the A2A protocol. They represent stateful execution units that manage the complete lifecycle of work from client request to agent completion. Every interaction between a client and an agent is organized around tasks.Task Object
A Task is the central coordination unit that tracks work execution. It encapsulates the entire interaction related to a specific goal or request, maintaining conversation history, execution state, and generated artifacts. Schema:- Task Identity: Unique
idandcontextIdfor tracking - Status Tracking: Current state (
completed) with timestamp and agent message - Artifact Delivery: Complete analysis report with both text and structured data
- History Preservation: Full conversation trail from initial request to completion
- Metadata Context: Additional information about priority, duration, and categorization
TaskStatus Object
Represents the current state and context of a task at a specific point in time. Schema:TaskState Enum
Defines all possible lifecycle states a task can be in during execution. Standard A2A States:submitted- Task has been submitted and is awaiting execution- Initial state when task is created
- Agent has acknowledged receipt but hasnโt started processing
working- Agent is actively working on the task- Task is being processed
- May transition to
input-required,completed, orfailed
input-required- Task is paused, waiting for user input- Agent needs clarification or additional information
- Task will resume once user provides required input
- This is an interrupted state, not terminal
completed- Task has been successfully completed- Final deliverables are available in
artifacts - This is a terminal state - task cannot be modified
- Final deliverables are available in
canceled- Task has been canceled by the user- User explicitly stopped the task before completion
- This is a terminal state
failed- Task failed due to an error during execution- Agent encountered an unrecoverable error
- Error details typically included in status message
- This is a terminal state
rejected- Task was rejected by the agent and was not started- Agent determined it cannot or will not perform the task
- May occur during initial creation or after assessment
- This is a terminal state
auth-required- Task requires authentication to proceed- Additional authentication needed from the client
- Authentication expected to come out-of-band
- Not a terminal state - task can resume after auth
<NotPartOfA2A>:
payment-required- Task requires payment to proceedunknown- Task is in an unknown or indeterminate statetrust-verification-required- Task requires trust verificationpending- Task is pending execution (queued)suspended- Task is suspended and not currently runningresumed- Task has been resumed after suspensionnegotiation-bid-submitted- Task bid submitted for negotiationnegotiation-bid-lost- Task bid was lost in negotiationnegotiation-bid-won- Task bid was won in negotiation
- Terminal States:
completed,failed,rejected,canceled- Cannot transition further - Interrupted States:
input-required,auth-required- Can resume toworking - Active States:
submitted,working- Task is being processed
Task Events
Events notify clients of task state changes and artifact updates, typically used in streaming (SSE) or push notification scenarios to keep clients informed without polling.TaskStatusUpdateEvent
Sent by the agent when a taskโs status changes, enabling real-time progress tracking. Schema:- Real-time progress tracking for long-running tasks
- Notifying clients when tasks require input or authentication
- Alerting on task completion or failure
- Streaming task execution updates via Server-Sent Events (SSE)
TaskArtifactUpdateEvent
Sent by the agent when an artifact is generated or updated, enabling incremental delivery of large outputs. Schema:- Streaming large reports or documents in chunks
- Progressive rendering of generated content
- Real-time display of agent-generated outputs
- Reducing memory overhead for large artifacts
append: false- Start new artifact or replace existingappend: true- Add content to existing artifactlastChunk: true- Signal completion of artifact delivery
Task Operations & Parameters
Parameters used for various task operations including execution, querying, and management.TaskSendParams <NotPartOfA2A>
Internal parameters for task execution within the Bindu framework.
Schema:
TaskIdParams
Simple parameters containing a task ID, used for basic task operations. Schema:TaskQueryParams
Parameters for querying task details with optional history limiting. Schema:- Retrieving task status without full history
- Reducing payload size for list operations
- Efficient polling for task updates
- Getting recent conversation context only
ListTasksParams <NotPartOfA2A>
Parameters for listing multiple tasks with optional history limiting.
Schema:
- Dashboard views showing multiple tasks
- Task management interfaces
- Batch status checking
- Filtering tasks by status or context
- Pagination with history control
TaskFeedbackParams <NotPartOfA2A>
Parameters for providing feedback on completed tasks.
Schema:
- 5 - Excellent: Exceeded expectations
- 4 - Good: Met expectations well
- 3 - Satisfactory: Met basic expectations
- 2 - Poor: Below expectations
- 1 - Very Poor: Did not meet expectations
- Quality assurance and agent improvement
- User satisfaction tracking
- Identifying areas for enhancement
- Training data for agent optimization
- Performance metrics and analytics
- Provide specific, actionable feedback
- Use ratings consistently across tasks
- Include context in metadata
- Submit feedback promptly after task completion
- Be constructive in criticism
Message Sending Parameters
Parameters for sending messages to agents to initiate or continue task interactions.MessageSendConfiguration
Configuration options for message sending behavior. Schema:MessageSendParams
Parameters for sending a message to an agent. Schema:- Cannot restart tasks in terminal states (
completed,canceled,rejected,failed) - Use
blocking: truefor quick operations,falsefor long-running tasks acceptedOutputModeshelps agent format response appropriately- Include
taskIdin message to continue existing task
Push Notification Parameters
Parameters for managing push notification configurations associated with tasks.ListTaskPushNotificationConfigParams
Parameters for retrieving all push notification configurations for a task. Schema:DeleteTaskPushNotificationConfigParams
Parameters for removing a push notification configuration from a task. Schema:- Clean up obsolete webhook endpoints
- Remove notification configs after task completion
- Update notification routing by removing old configs
- Manage webhook lifecycle
tasks/pushNotificationConfig/set- Add or update notification configtasks/pushNotificationConfig/get- Retrieve specific configtasks/pushNotificationConfig/list- List all configs for a task
Context Management
Contexts serve as conversation containers in the Bindu protocol, managing the complete interaction lifecycle between clients and agents. They maintain conversation continuity, preserve context across multiple tasks, and provide session-level organization.Context is a Bindu-specific extension
<NotPartOfA2A> that goes beyond the standard A2A protocol to enable sophisticated conversation management and session tracking.Context Object
A Context is a conversation session that groups related tasks and maintains interaction history. It provides the organizational structure for multi-turn conversations and enables agents to maintain state across multiple task executions. Schema:- Context Identity: Unique
contextIdfor tracking the conversation - Session Organization: Groups 3 related tasks under one conversation
- Temporal Tracking: Creation and update timestamps
- Status Management: Active status indicates ongoing work
- Metadata Context: Business context like department, priority, and stakeholders
- Categorization: Tags for filtering and organization
- Context = The conversation session (container)
- Task = Individual work units within the conversation
- One context can contain many tasks
- Tasks inherit context from their parent context
Context Status States
Contexts can be in one of four states: Active States:active- Context is currently in use- New tasks can be added
- Conversation is ongoing
- Default state for new contexts
paused- Context is temporarily suspended- No new tasks should be created
- Existing tasks may continue
- Can be resumed to
activestate
completed- Context has finished its purpose- All tasks are completed
- No new tasks should be added
- Context is considered closed
archived- Context is stored for historical reference- Preserved for audit or review
- Read-only access
- Cannot be modified or resumed
Context Operations & Parameters
Parameters used for various context operations including creation, querying, and management.ContextIdParams
Simple parameters containing a context ID, used for basic context operations. Schema:ContextQueryParams
Parameters for querying context details with optional history limiting. Schema:- Retrieving context status without full task history
- Reducing payload size for context queries
- Getting recent conversation context only
- Efficient context monitoring
ListContextsParams
Parameters for listing multiple contexts with optional history limiting. Schema:- Dashboard views showing active conversations
- Context management interfaces
- Session monitoring and analytics
- Filtering contexts by status, role, or tags
- Pagination with history control
- Finding contexts by criteria
Context Best Practices
Context Decision Flow: Lifecycle States: Quick Tips:- Naming: Use format
"Project - Purpose"(e.g., โQ4 Sales - Analysisโ, โSupport - Ticket #1234โ) - Metadata: Store business context, ownership, timestamps for filtering and tracking
- Performance: Use
historyLengthparameter to limit payload size when fetching contexts - Cleanup: Regularly archive completed contexts to maintain system performance
Agent-to-Agent Negotiation <NotPartOfA2A>
Agent-to-agent negotiation enables autonomous agents to coordinate, negotiate terms, and reach agreements for collaborative task execution. This protocol extension allows agents to propose, counter-propose, accept, or reject collaboration terms in a structured manner.
NegotiationProposal
A structured negotiation proposal exchanged between agents during the negotiation process. Schema:NegotiationContext
Context details for managing the complete lifecycle of agent-to-agent negotiations, including all participants and proposals. Schema:Negotiation Flow Pattern
Understanding how agents negotiate and reach agreements: Basic Negotiation Flow: Multi-Agent Negotiation Flow: Negotiation Statuses (Individual Proposals):proposed- Initial offer made, awaiting responseaccepted- Offer accepted, ready to proceedrejected- Offer declined, negotiation path closedcountered- Counter-offer made, negotiation continues
initiated- Negotiation session startedongoing- Active negotiation in progresscompleted- Agreement reached, all parties alignedrejected- Negotiation failed, no agreement possible
Security & Authentication
Security schemes define how agents authenticate requests and establish trust. Bindu supports multiple authentication methods following the A2A Protocol specification.HTTPAuthSecurityScheme
Schema:APIKeySecurityScheme
Schema:OAuth2SecurityScheme
Schema:OpenIdConnectSecurityScheme
Schema:MutualTLSSecurityScheme
Schema:SecurityScheme: Union Type
TheSecurityScheme type is a discriminated union of all security scheme types:
type field acts as a discriminator to determine which security scheme is being used. All security schemes use camelCase for field names (e.g., bearerFormat, openIdConnectUrl) following the A2A Protocol specification.
Choosing the Right Security Scheme
Quick Reference:| Scheme | Best For | Complexity | Security Level |
|---|---|---|---|
| HTTP Auth (Bearer) | API tokens, JWTs | Low | Medium-High |
| HTTP Auth (Basic) | Simple username/password | Very Low | Low-Medium |
| API Key | Service-to-service, webhooks | Very Low | Low-Medium |
| OAuth2 | User authorization, delegated access | High | High |
| OpenID Connect | Enterprise SSO, identity verification | Medium | High |
| Mutual TLS | Zero-trust, high-security services | High | Very High |
- Need simple token authentication? โ Use HTTP Auth with Bearer tokens (JWT)
- Building a public API? โ Use API Key for rate limiting and access control
- Users need to authorize agents? โ Use OAuth2 Authorization Code flow
- Service-to-service without users? โ Use OAuth2 Client Credentials or API Key
- Enterprise SSO integration? โ Use OpenID Connect
- Maximum security required? โ Use Mutual TLS with client certificates
- Legacy system with Basic auth? โ Use HTTP Auth with Basic scheme
- Always use HTTPS/TLS for all authentication schemes except Mutual TLS (which provides its own transport security)
- Rotate API keys regularly and never commit them to version control
- Use short-lived tokens (15-60 minutes) with refresh token rotation for OAuth2
- Implement rate limiting regardless of authentication method
- Log authentication attempts and monitor for suspicious patterns
- Use the principle of least privilege - grant only necessary scopes/permissions
Notifications
Push notification configurations define how servers send real-time updates to clients outside of active sessions. Bindu supports multiple notification patterns following the A2A Protocol specification.PushNotificationConfig
Schema:PushNotificationAuthenticationInfo
Schema:TaskPushNotificationConfig
Schema:How Push Notifications Work
Workflow:- Client configures push notifications when sending a message via
message/send - Server acknowledges the task and begins processing
- Server completes the task and POSTs notification to the clientโs webhook URL
- Client validates the notification using the token and authentication
- Client processes the task update (e.g., updates UI, notifies user)
Summary
Push notifications solve a simple problem: instead of constantly asking โIs it done yet?โ, the agent calls you when itโs finished. You configure a PushNotificationConfig with your webhook URL and tokenโlike giving the agent your callback number. Add PushNotificationAuthenticationInfo to specify how the agent should authenticate when calling your webhook. Use TaskPushNotificationConfig to route different tasks to different endpoints with their own security requirements. This eliminates polling overhead and enables real-time updates for long-running operationsโreport generation, batch processing, or workflows needing human confirmation.Payment Models (AP2 Protocol)
Payment models enable agents to handle commerce transactions, from simple purchases to complex multi-party negotiations. These types support the Agent Payments Protocol (AP2) for autonomous commerce.Overview
The AP2 protocol defines two categories of types: Basic Payment Types - Building blocks for transactions:- ContactAddress - Physical addresses for shipping/billing
- PaymentCurrencyAmount - Monetary values with currency codes
- PaymentItem - Line items with pricing and refund policies
- PaymentShippingOption - Delivery method choices
- PaymentOptions - Checkout configuration (what to collect)
- PaymentMethodData - Supported payment methods
- PaymentDetailsModifier - Method-specific price adjustments
- PaymentDetailsInit - Complete order breakdown
- PaymentRequest - Full payment request from merchant
- PaymentResponse - Userโs payment authorization
- IntentMandate - Userโs purchase intent with constraints
- CartContents - Shopping cart structure
- CartMandate - Merchantโs signed price guarantee
- PaymentMandateContents - Payment authorization details
- PaymentMandate - Userโs cryptographic signature
ContactAddress
Schema:PaymentCurrencyAmount
Schema:PaymentItem
Schema:pending flag indicates if the price might change (e.g., shipping costs pending address confirmation).
PaymentShippingOption
Schema:selected flag indicates the default or currently chosen option.
PaymentOptions
Schema:shipping_type clarifies the fulfillment method.
PaymentMethodData
Schema:PaymentDetailsModifier
Schema:PaymentDetailsInit
Schema:PaymentRequest
Schema:PaymentResponse
Schema:Payment Flow Overview
The payment types work together to create a complete checkout experience: Payment Request Flow: Key Relationships:- PaymentRequest combines method options, order details, and checkout configuration
- PaymentDetailsInit breaks down the total into line items with PaymentItem and PaymentCurrencyAmount
- PaymentOptions determines what information to collect (name, email, shipping)
- PaymentResponse returns the userโs selections and payment credentials
- PaymentDetailsModifier adjusts pricing based on the chosen payment method
Payment Mandates (Trust Framework)
Mandates are cryptographically signed documents that establish trust and accountability in agent-driven commerce. They create an immutable audit trail for dispute resolution.IntentMandate
Schema:CartContents
Schema:CartMandate
Schema:PaymentMandateContents
Schema:PaymentMandate
Schema:Summary
The mandate framework creates a trust chain for autonomous commerce: The Three Mandates:- IntentMandate - User says โHereโs what I want to buy and my constraintsโ
- CartMandate - Merchant says โHereโs what Iโm offering at this priceโ
- PaymentMandate - User says โI authorize this specific paymentโ
Credit System <NotPartOfA2A>
The credit system enables centralized management of agent execution costs and resource allocation. This is a Bindu-specific extension for managing agent marketplace economics.
AgentExecutionCost
Schema:ExecutionRequest
Schema:ExecutionResponse
Schema:Credit System Flow
Key Features:- Pay-per-use model - Users pay credits only for agent executions
- Creator monetization - Agent creators earn credits when their agents are used
- Trust-based access - Minimum trust levels prevent unauthorized or malicious usage
- Transparent pricing - Credit costs are known upfront via
AgentExecutionCost - Transaction tracking - Every execution generates a transaction record for auditing
- Premium AI agents with specialized capabilities
- Resource-intensive data processing agents
- Enterprise agents requiring elevated permissions
- Marketplace for third-party agent services
- Usage-based billing for agent platforms
Trust & Identity
Trust and identity management ensures secure agent operations through role-based access control and identity verification. Integrates with enterprise identity providers for centralized authentication.KeycloakRole
Schema:AgentTrust
Schema:Trust Architecture
Trust Verification Flow: Summary: Trust and identity management combines role-based access control with enterprise identity providers. KeycloakRole defines permissions and trust levels with SSO mappings. AgentTrust configures agent identity verification using certificates and inherited roles. Each operation requires minimum trust levels, enabling fine-grained security for enterprise deployments, multi-tenant platforms, and high-security operations.Agent Discovery & Configuration
Agent discovery enables clients to find and understand agent capabilities through standardized metadata. The AgentCard serves as the agentโs โbusiness cardโ containing identity, skills, and operational requirements.AgentIdentity
Schema:AgentInterface
Schema:AgentExtension
Schema:required flag indicates if clients must support the extension.
Skill
Schema:AgentCapabilities
Schema:AgentCard
Schema:Agent Discovery Flow
Summary: Agent discovery uses AgentCard as the central metadata structure containing identity (AgentIdentity), capabilities (AgentCapabilities), skills (Skill), and operational requirements. Agents declare support for extensions (AgentExtension) and multiple transports (AgentInterface). Clients discover agents through registries, evaluate their capabilities and costs, then establish secure connections using the declared security schemes and trust configurations.Getting Started
Create and deploy your first agent with Bindu:- Decentralized Identity (DID) - Verifiable agent identity
- A2A Protocol Endpoints - Standard agent-to-agent communication
- DID Resolution - Discover and verify agent identities
- Agent Info - Query agent capabilities and metadata
http://localhost:3773/agent/info to see your agentโs complete AgentCard.