Skip to content
Articles

How Datai turned a fragile multi-agent prototype into a production system

Cosette Cressler

July 21, 20269 min read

How Datai turned a fragile multi-agent prototype into a production system

We spoke with Igor Lessio, Chief Technology Officer at Datai Network, about Crunchie. Datai Network is a decentralized data and analytics platform that builds structured blockchain intelligence across DeFi, NFTs, and real-world assets, and Crunchie is their “AI-powered on-chain companion”: a multi-agent system designed to democratize market intelligence, bringing institutional-level analysis into a format anyone can access and learn from.

The first version of Crunchie worked, but barely. In this post, we’ll start with what went wrong when five agents were wired together by hand, then look at why the team rebuilt on Agno, how the new workflow runs, what they did to keep answers grounded in real data, and the numbers they measured on the other side.

The hidden cost of orchestrating agents by hand

Datai launched the Alpha version of Crunchie in Q2 2025, built on the same enterprise-grade data streams and analytics backbone used by funds, protocols, and analytics firms. It was organized as a team of five specialists:

  • A Yield Analyzer that scanned liquidity pools for sustainable APYs
  • A Market Pulse agent that detected sentiment and buying pressure
  • A News Monitor that tracked DeFi headlines
  • A Risk Analyzer that evaluated liquidity and project credibility
  • A Smart Synthesizer that combined everything into a readable output

The concept was sound. The execution had limits.

Crunchie Alpha was built in Python and Go on a data lake, and the system had no real orchestration layer underneath it. The agents weren’t coordinated so much as wired together manually, with no shared state management and no structured way to handle parallel execution.

That made every change expensive. Add an agent, tweak a step, adjust routing logic, and suddenly half the orchestration layer needed rebuilding from scratch. Response times ran around 2.5 minutes per query, 5–10% of workflows failed outright, and there was no reliable way to trace what had gone wrong when one did.

After some changes in tech leadership, the team assessed the situation quickly. The data foundation was strong. The agent architecture needed to be rebuilt from the ground up.

Why Datai chose Agno

First they tried LangChain, and found it frustrating.

“The libraries were too difficult to navigate. Too many of them belonged to the community. And it was not easy to keep pace with the changelog.”

They also wrote their own pure Python orchestration loop, which worked for simple use cases but didn’t scale. What Crunchie needed was a framework that could handle real multi-agent coordination without becoming its own maintenance burden. Four things pointed them to Agno.

1. Flexibility

Simplicity and real flexibility rarely coexist. Igor’s team found both.

“It's so flexible. Any model, any tool sets, any MCP server, it just works.”

Because Agno is plain Python, they can extend memory systems, add custom output formatting, or swap models without fighting the framework. “We can expand tools in five, six seconds. We can expand the memory system by ourselves.”

2. Reliability and logging

“We can trust it. It has one of the best logging systems we’ve ever seen. If something is wrong, we know immediately.”

They contrast this directly with the alternatives. “With CrewAI the logging system was not good for our use case. NVIDIA did not even provide one.” When an LLM provider hits a rate limit, hallucinates, or overflows its context, Agno surfaces it right away. “In seconds you can find out.”

3. Speed to a working prototype

The field moves too fast for anything else.

“With Agno, you go from zero to an MVP in hours, not days, not weeks. We were not able to do that with the other frameworks we tested.”

4. Team responsiveness

In a field that changes weekly, direct access to the team is a real technical advantage. “The first time we interacted with your CEO, we had a question. We couldn’t fix something, and he literally told us how to do it on Twitter. That’s priceless.”

How the workflow runs behind the scenes

Igor describes the new setup as a professional kitchen, and the contrast with Alpha is the point.

“Before Agno, chefs were working in isolation, passing notes through runners and trying to coordinate timing manually. With Agno, there's a head chef—the workflow—coordinating specialists and making sure the final dish arrives coherent and on time.”

The pipeline runs in four stages.

1. A Prompt Expert cleans up the query

Every query opens here, with ambiguous inputs resolved before they reach any specialist agent. “BNB” becomes “Binance Coin on Binance Smart Chain.” Low-quality requests get filtered out early. This step alone cut API costs by around 30 percent.

2. Three specialists run in parallel

An APY Expert identifies yield opportunities, a Pool Expert analyzes liquidity and pool health, and a News Expert gathers market sentiment and relevant context. They run concurrently rather than in a chain.

3. A Coordinator synthesizes the answer

The Coordinator pulls all three outputs into a single ranked, structured, readable response, complete with direct links to the relevant pools and platforms.

4. Agno handles everything in between

Timing, coordination, state persistence, and streaming responses as they generate. Response time dropped from 2.5 minutes to around 25 seconds.

What changed under the hood

Four categories of work disappeared in the rebuild — none of which differentiated the product, all of which determined whether it survived in production.

  • Session state. Previously tracked by hand with Redis key management and session timeouts. With Agno, PostgreSQL-backed workflow storage persists state automatically: Datai passes a session_id, and the workflow stays consistent across runs.
  • Streaming. Once weeks of custom SSE work, now a single switch: stream=True.
  • Parallel execution. Custom async coordination logic, replaced by clean Step objects and Parallel blocks.
  • Error handling and retries. A tangle of try/catch logic, now handled gracefully by default.

“We stopped writing plumbing code and started writing business logic. That's the real win.”

Keeping responses grounded

Crunchie needed to stay anchored in real data, especially for APYs, pool risk, and market context. Datai layered four safeguards so the agents never invent numbers:

  • A vector knowledge base on LanceDB is queried first, embedding DeFi protocols, token data, and documentation as a reference library the agent consults before answering
  • Tool-based live retrieval through Datai’s APIs, so current figures get fetched rather than generated
  • Prompt constraints requiring the Coordinator to synthesize only from verified agent outputs
  • A Redis conversation cache that preserves consistency across turns

“He cannot lie to me because he has to present numbers that come from our database,” Igor says. “So there’s no lie there.”

The parallel design also solves a subtler problem: context poisoning. Rather than letting a long sequential chain accumulate tokens, each agent formats and cleans its own output before passing it forward.

“We control the output. We format it, we clean it. Then we pass it to the last agent. They read everything in a context that is clean first and that never goes over a certain number of tokens.”

Igor had seen what happens when context becomes overloaded — in one case, data ingested in Mandarin caused the agent to fail entirely. The architecture is built to prevent that.

Fixing the session state ghost

The worst production failure Datai hit was Crunchie forgetting context mid-conversation. A thread would be flowing, and then the agent behaved like it had amnesia.

The cause was subtle. Datai was still managing session state manually in Redis while Agno’s PostgreSQL-backed workflow storage maintained its own session layer. The two were never synchronized, so state drifted over time.

The fix was to stop fighting the framework and let Agno own workflow state entirely. PostgreSQL-backed storage became the single source of truth, and Redis was scoped down to conversation history caching. Session state issues dropped to near zero — from a weekly debugging event to something the team barely thinks about.

What the numbers look like

Datai measured clear wins across speed, reliability, and cost.

MetricBefore AgnoWith AgnoImprovement
Development time per feature~3 weeks2–3 days~75–80% faster
API cost per complex query$0.15–$0.25$0.08–$0.12~40–50% lower
Response latency2.5 minutes25 seconds~80% faster
Workflow failure rate5–10%<1%~90% reduction
Orchestration code~2,000 lines~500 lines~75% less

Metrics are based on Datai’s internal production measurements and vary by chain, query complexity, market conditions, and workload.

These numbers don’t just look good on a dashboard — they change what’s possible. When you can iterate in days, ship safer workflows, and respond in around 20 seconds, you can experiment and improve without constantly paying an infrastructure tax.

The clearest example: a user asked, “Find me high-yield opportunities for BNB on BSC right now, including risks and recent news.” Around 20 seconds later they had ranked opportunities by risk-adjusted yield, current pool numbers, risk context, and relevant news, with direct links to act on it. Their reaction: “How did you get all this data so fast? This would've taken me hours.”

What surprised Datai in production

A few wins the team didn’t plan for:

  • Streaming worked out of the box, with output arriving progressively and no custom SSE headaches
  • Session management became almost invisible, with migrations, persistence, and recovery handled automatically
  • Prompt filtering drove more savings than expected — catching and discarding malformed queries early cut API costs by around 30 percent
  • Step-level tracing transformed debugging. Instead of reconstructing failures from scattered logs, the team could pinpoint the exact step that misfired

Crunchie was first made available to the public through a Datai marketing campaign, letting users try the first version free and help improve it. Free access has now ended, and Crunchie may relaunch as a full on-chain companion.

How to build a similar system using Agno

If you’re starting from a prototype held together by glue code, Igor’s experience points at one lesson: let the framework own orchestration and state before you build anything on top of it. The failure that cost Datai the most came from doing both jobs at once.

To start building, work through the quick start guide, then browse the workflow examples in the Agno repo to see how Step and Parallel fit together.

Others also liked...