**
Self-correction, ToT, Supervisor routing and why approval-gated actions + token budgets matter more than the patterns themselves.
**
When we started building agentic workflows, the problem wasn't adding patterns. Chain-of-Thought, Tree-of-Thought, Reflection — all are 50 lines of code. The problem is what happens after you add them.
v0.7.0 is 9 patterns complete. But this post is not about the patterns. It's about the 4 things that broke while adding them.
1. The Tree-of-Thought empty-reply bug
ToT looks great on paper — branch, evaluate, prune. In practice, LLM returns empty string when token budget is tight and your evaluate node crashes with NoneType.
434 shipped ToT. #435 fixed it. We added token-budget aware pruning and empty-reply guard before scoring. Simple fix, but if you implement ToT without it, prod will fail silently.
**
2. Actionable agents are dangerous by default
**
We added Webhook, Slack, Email senders (#438) and an LLM-driven action planner (#441) that can propose a real action.
The key decision: the model can propose, never execute. Every action is gated through the existing HITL approval flow. No direct execution path.
If you let your agent send Slack messages directly, you will spam a channel at 2 AM. We learned this in staging.
3. Security is not a feature, it's the cleanup
This release fixed:
7 stack-trace-exposure alerts + 4 raw-exception leaks in API (#439, #440) — leaking internals to client is common when you add new patterns quickly.
Runtime-created AI Employee roles are now auto-detected as sensitive if name/tags say so (#453) — closing a guardrail bypass.
Docker Compose ports now bind to localhost by default (#459) — previously 0.0.0.0.
Approval replies (YES/NO) now only count from configured owner; WhatsApp/Telegram webhooks fail-closed without signature (#460) — prevents anyone approving your agent's actions.
Optional RAGLEAP_API_KEY global middleware auth (#485), off by default.
None of these are sexy. All of them are required before you give an agent real tools.
**
4. Cost control > prompt optimization
**
We added usage ledger + token budget caps, global and per-role, including streaming responses (#455, #456).
Without per-role caps, a single Supervisor -> Sub-agent loop (#437) can burn $3 in one query. We now kill the branch when budget hits, not after.
**
What shipped in v0.7.0
**
Patterns: self-correction/reflection (#408), CoT (#433), ToT (#434, #435), supervisor routing (#436), sub-agent spawning (#437) — on top of tool registry, observability, HITL, memory from v0.6.0
477 tests passing
Repo clone-count badge, ∼35 community README translations, improved short-query language detection by @hardik47278 (#452)
Full changelog: https://github.com/antonyrag/ragleap-core/releases/tag/v0.7.0
If you're implementing ToT or Supervisor pattern, don't start with the prompt. Start with: what happens when it returns empty, what happens when it loops, and who can approve its side effects.
That’s the part no one writes about.
Top comments (1)
Some comments may only be visible to logged-in visitors. Sign in to view all comments.