Releases: i-am-bee/beeai-framework
typescript_v0.1.9
Features
Full Changelog: python_v0.1.8...typescript_v0.1.9
typescript_v0.1.8
python_v0.1.8
Bug Fixes
- adapters: return real usage in ChatModelOutput (#613)
- emitter: propagate errors from user callbacks (#608)
- tools: update events definition to pass Pydantic validation (#606)
Features
- agents: improve ToolCallingAgent (#619)
- backend: simplify chat model configuration (#623)
- tools: improve OpenMeteo input schema (#620)
- errors: improve error handling (#601)
- backend: align backend environment variable usage with typescript (#594)
- cache: init module (#602)
Full Changelog: typescript_v0.1.8...python_v0.1.8
python_v0.1.7
Bug Fixes
- agents: retry if a tool does not exist in ToolCallingAgent (#600)
- backend: do not use OpenAI strict response format for Ollama (#598)
- backend: do not pass empty tool calls to Watsonx (#597)
- internal handle compositional schemas in JSONSchemaModel (#599)
Full Changelog: python_v0.1.6...python_v0.1.7
typescript_v0.1.7
⚠ BREAKING CHANGES
- rename BeeAgent to ReActAgent (#587)
Features
- agents: add ToolCallingAgent (#592) (c3c3980)(#531)
- backend: add abort signal for Watsonx (5e5ea68)
- backend: update parameters for structured generation (1247919)
- agents rename BeeAgent to ReActAgent (#587) (a28c904), closes #437
Bug Fixes
Full Changelog: typescript_v0.1.6...typescript_v0.1.7
python_v0.1.6
Features
- agents: improve ToolCallingAgent performance (#593)
Bug Fixes
- tools: avoid session management in MCPTool (#589)
Full Changelog: python_v0.1.5...python_v0.1.6
python_v0.1.5
Features
- ⭐️ agents Added Tool Calling Agent (#551)
- ⭐️ workflows Rework Agent Workflow (#554)
- agents Added Run.on() for event callbacks (#516)
- adapters Support for Azure OpenAI (#514)
- adapters Support for Anthropic (#522)
- adapters Support additional headers for OpenAI (#533)
Bug Fixes
- emitter
*.*
matcher to correctly match all events and nested events (#515) - tools handle non-existing locations in OpenMeteo tool (#513)
- backend LiteLLM Event Loop Closed Error (#523)
- tools MCP tool error (#570)
Code Quality
- Added types for emitter events (#581)
- Added static type checking with
mypy
(#565) - Improved error messages across the framework (#519)
- Reworked base agent run and run context (#562)
- Cleaned up dependencies (#526)
Documentation
- Added MCP tool tutorial (#555)
- Fixed numerous broken links (#544, #560)
- Added multiple examples (e.g., observability) (#560, #535)
Testing & CI
- Added link checker to verify documentation links (#542, #568)
- Addressed failing end-to-end tests (#508)
Migration Guide
This guide will help you update your codebase to the latest version. It outlines breaking changes and new features which may require updates to your application.
Type Checking
Static type checking with mypy
was added to improve code quality and catch errors earlier. If you plan contributing to the project please be aware of these changes:
- Mypy validation is now part of CI and will check type correctness
- Consider running
poe type-check
locally before submitting PRs
Agent Framework Changes
BaseAgent Generics
The BaseAgent
class now uses generics for improved type safety. If you've created custom agents that extend BaseAgent
, you'll need to update your class definitions to specify the appropriate types:
# Before
class MyCustomAgent(BaseAgent):
...
# After
class MyCustomAgent(BaseAgent[MyCustomAgentRunOutput]):
...
NOTE: See a complete example here: https://github.com/i-am-bee/beeai-framework/blob/main/python/examples/agents/custom_agent.py
Agent Run and RunContext
Agent Run
and RunContext
have been refactored. Take note of the changes and update that may be required:
- Check for changes in the RunContext API if you access it directly
- Review any custom agent implementations that override run-related methods
Tool Calling Agent
A new tool calling agent has been added. If you were calling tools, consider migrating to ToolCallingAgent
which provides:
- Standardized tool calling patterns
- Better integration with the framework
- Improved error handling for tool operations
Run.on Event API
The new Run.on
API provides a simpler way to listen to emitted events:
# Before
def print_events(data, event):
print(data)
def observer(emitter: Emitter):
emitter.on("*", print_events)
agent = ReActAgent(...)
resppnse = agent.run(...).observe(observer)
# After
def print_events(data, event):
print(data)
agent = ReActAgent(...)
resppnse = agent.run(...).on("*", print_events)
This new API supplements the Run.observe
. The Run.observe
continues to be available and can be used, but you may consider migrating any existing event observers to use this more direct approach.
New Adapter Support
Anthropic Support
If you've been waiting for Anthropic model support, you can now use it in the Python framework:
from beeai_framework.adapters.anthropic.backend.chat import AnthropicChatModel
from beeai_framework.backend.message import UserMessage
async def anthropic_from_name() -> None:
llm = AnthropicChatModel("claude-3-haiku-20240307")
user_message = UserMessage("what states are part of New England?")
response = await llm.create(messages=[user_message])
print(response.get_text_content())
Azure OpenAI Support
Similarly, the Python framework now supports Azure OpenAI:
from beeai_framework.adapters.azure_openai.backend.chat import AzureOpenAIChatModel
from beeai_framework.backend.message import UserMessage
async def azure_openai_sync() -> None:
llm = AzureOpenAIChatModel("gpt-4o-mini")
user_message = UserMessage("what is the capital of Massachusetts?")
response = await llm.create(messages=[user_message])
print(response.get_text_content())
Emitter Changes
The "match all nested" matcher (i.e., *.*
) behavior has been fixed. If you were relying on this specific matching patterns, verify that your event handling still works as expected.
OpenMeteo Tool
If you're using the OpenMeteo
tool, it now handles non-existing locations more gracefully. Please revisit any error handling around location lookups in your code.
Workflow Arguments
The workflow add_agent()
method has been improved to accept keyword arguments.. Review any workflow.add_agent(..)
you may be using to take advantage of these improvements:
# Before
workflow.add_agent(agent=AgentFactoryInput(name="Agent name", tools=[], llm=chat_model))
# After
workflow.add_agent(name="Agent name", tools=[], llm=chat_model)
Full Changelog: python_v0.1.4...python_v0.1.5
typescript_v0.1.6
Features
- agents: add remote agent (#524) (cda7c8d), closes i-am-bee/beeai#81
Bug Fixes
Full Changelog: typescript_v0.1.5...typescript_v0.1.6
typescript_v0.1.5
typescript_v0.1.4
Bug Fixes
Full Changelog: python_v0.1.4...typescript_v0.1.4