---
title: "BeeAI Framework Community Update"
---
## November 18, 2025

---

## 🛠️ Improvements

- agents: add `reason` to a rule when using requirements
- backend: auto fix malformed tool calls (preventing `ChatModelError`)
- backend: handle double-escaped tool calls
- middlewares: propagate updates from `StreamToolCallMiddleware` without streaming enabled
- adapters: add nested trajectory support for AgentStack when using `serve` module
- backend: handle incomplete Unicode chunks while streaming
- middlewares: GlobalTrajectoryMiddleware now emits events

---

## GlobalTrajectoryMiddleware

```python
agent = RequirementAgent(
    llm="ollama:granite4:micro",
    tools=[ThinkTool(), OpenMeteoTool()],
)

tool_call_logger = GlobalTrajectoryMiddleware(included=[Tool], target=False)

@tool_call_logger.emitter.on("start")
async def on_tool_start(data: GlobalTrajectoryMiddlewareStartEvent, _: EventMeta) -> None:
    run_data, run_meta = data.origin
    print("Starting tool", run_meta.creator.instance.name, "with input", run_data.input)

response = await agent.run("What to do in Boston today?").middleware(tool_call_logger)
print(response.last_message.text)
```

---

## Rules with explanations

```python
agent = RequirementAgent(
    llm="ollama:granite4:micro",
    tools=[OpenMeteoTool(), DuckDuckGoSearchTool()],
    instructions="Plan activities for a given destination based on current weather and events.",
    requirements=[
        ConditionalRequirement(
            DuckDuckGoSearchTool,
            only_after=[OpenMeteoTool],
            min_invocations=1,
            max_invocations=2,
            reason="can be used only after retrieving the weather forecast",
        ),
    ],
)

response = await agent.run("What to do in Boston today?")
print(response.last_message.text)

```

---

## 🛠️️ Other improvements:

- middlewares: add custom message formatter to the GlobalTrajectoryMiddleware
- tools: remove next_step from the ThinkTool
- tools: correctly clone the HandoffTool
- tools: improve OpenAPITool (#1284)
- tools: add smart parsing for MCP tool output
- adapters: support exposing PromptTemplate in the MCP server
- adapters: allow filtering agents by state in AgentStack
- adapters: allow passing custom URL for A2A Client
- adapters: prevent importing extra dependencies when using the OpenAI Chat model

---

## 🙏 Thank You

The BeeAI Framework is community-driven—your feedback shapes our roadmap!

Questions? Let’s discuss:  
- **Discord Community**: [discord.gg/NradeA6ZNF](https://discord.gg/NradeA6ZNF)  
- **GitHub Discussions**: Share ideas and ask questions
