Overview
The BeeAI Framework is an open-source framework for building AI agents, developed under the Linux Foundation. BeeAI has built-in support for the A2A protocol throughA2AAgent, allowing your agents to communicate with remote A2A agents like StackOne’s.
Use BeeAI Framework to build agents that:
- Consume StackOne’s A2A agents as remote agents
- Orchestrate multi-agent systems with local and remote agents
- Access StackOne platform actions without managing tool definitions
Python only: BeeAI Framework’s
A2AAgent supports custom authentication headers required for StackOne in Python. For TypeScript, use the A2A JavaScript SDK directly.Installation
Install BeeAI Framework with A2A support:Quick Start
This example creates anA2AAgent that connects to a StackOne A2A agent.
Architecture
BeeAI’sA2AAgent allows your application to communicate with remote A2A agents:
Complete Example with Event Handling
Here’s a complete example that handles events and debug information:Interactive Chat Loop
Create an interactive chat session with the StackOne agent:Multiple StackOne Accounts
Connect to multiple StackOne accounts by creating separateA2AAgent instances:
Memory Management
BeeAI Framework provides memory implementations for conversation history:Best Practices
Use Appropriate Memory
Use Appropriate Memory
Choose the right memory implementation for your use case:Use
UnconstrainedMemory for typical interactions. Memory must be empty when assigned to an agent.Handle Events for Debugging
Handle Events for Debugging
Subscribe to update events for debugging and progress tracking:This is especially useful for understanding agent behavior during development.
Error Handling
Error Handling
Wrap agent calls in try-except blocks to handle errors gracefully:
Context Management
Context Management
Use context IDs and task IDs to manage multi-turn conversations: