The Foundation of Our Agentic App Architecture
Published on Sep 07, 2025 by Compute Labs

Compute Labs is proud to introduce the first building block of our Agentic App architecture — a system that doesn't just respond to queries, but intelligently routes them, reasons over structured knowledge, and adapts when uncertain.
In this post, we showcase a real, working example of an agentic system built to help farmers (or gardeners) decide what vegetables to sow or harvest, and when — using a mix of symbolic tools, database graphs, and LLM reasoning.
What is an Agentic App?
An Agentic App isn’t just a chatbot. It can:
Perceive user intent from natural language.
Plan how to answer using multiple tools.
Choose the right tool — algorithm, database, or language model.
Reflect and recover if its first method fails.
Act by delivering a meaningful, accurate, and contextual answer.
Our goal is to build systems that behave like intelligent assistants — not just search engines.
Imagine someone asks:
“What can I harvest in January?”
This seems simple, but answering it correctly could require:
Looking up month-vegetable mapping.
Understanding crop types (e.g. Rabi, Kharif).
Handling exceptions or missing data.
Offering fallback if nothing is found.
This is where agentic design shines.
Our Agentic Foundation: Hybrid Query Router
At the core of our system is a hybrid query router that acts as the brain of the agent
It performs 3 intelligent actions:
🔍 Intent Detection
The router first checks what kind of query was asked:
“Which month has the largest variety to sow?” → send to NetworkX tool
“What can I harvest in January?” → send to ArangoDB
“What’s the best time to sow carrots?” → send to LLM fallback🛠️ Smart Tool Routing
Depending on detected intent:
Graph Tool (NetworkX): Uses an internal Python graph of months and vegetables.
AQL Tool (ArangoDB): Queries structured relationships from a vegetable knowledge graph.
LLM Fallback (GPT-4): If no tool fits, it queries a language model with extra context fetched from the graph.🧩 Reflection and Recovery
If a query fails (e.g. "When to sow carrots?"), the router:
Fetches all available months/vegetables via AQL.
Sends this as context to GPT-4.
Returns a thoughtful, fallback answer
🌾 Example Queries Handled by Our Agent
✅ “What vegetables can I harvest in January?”
→ Potato (Rabi), Spinach (Rabi), Fenugreek (Methi), Onion (Rabi), Cabbage
✅ “Which month has the largest variety to sow?”
→ October
✅ “When can I sow Potato?”
→ September
✅ “What is the best time to sow Carrots?”
→ 🤖 Fallback triggered → GPT-4: "No specific info found in the graph, but here’s general advice..."