Agent architecture and scoping document
A written design covering the state graph, tool inventory, permission model, approval gates, failure modes and projected cost per run. Reviewed with your engineering team before a line of code ships.
AI Engineering
We build AI agents that plan, call tools and complete multi-step work inside your systems — not chat widgets with a better prompt. Built for teams where a wrong action costs money, not just goodwill.
AI agent development is the engineering of software that holds a goal, chooses tools, takes actions in real systems, and reports what it did — without a human driving every step. ZenMagix is an AI agent development company in Mumbai that builds these for businesses where a wrong action has a cost attached. We came to this from blockchain. Years of smart contracts, wallet infrastructure and exchange systems taught us early what most teams are learning now: once software acts on its own, idempotency, replay protection and approval thresholds stop being optional. An agent that submits the same purchase order twice is the same bug class as a transaction broadcast twice. We build agents that do work — reconcile invoices, qualify leads, triage tickets, move records between systems — and we build the controls that make them safe to leave running overnight.
A chatbot returns text. An agent holds a goal, selects tools, writes to your systems, and can therefore be wrong in ways that cost money.
The shift is about write access. A support chatbot that hallucinates gives a bad answer. An agent with an API key issues a refund. That single difference reorders the entire engineering problem: you now need permissions, idempotency keys, rollback paths, spend limits and a log of every decision. Search behaviour reflects the shift — interest in AI agents for business is up sharply year on year while chatbot interest falls — but most vendors have renamed the same retrieval demo.
Ask them what happens when the model calls the same tool forty times in a loop, or when a retrieved document contains instructions the agent obeys. The useful question is not which model you use. It is what the agent is allowed to do, who approves it, and how you find out when it goes wrong at 2am. That is systems work, and it is where most agent projects quietly stall.
Because we spent years building systems where a bug meant lost funds, not a bad sentence. Agent reliability is distributed-systems work, and we did that first.
Wallet infrastructure teaches habits that transfer directly. Nonce management becomes idempotency keys on tool calls. Multisig thresholds become human-in-the-loop approvals above a rupee value you set. Immutable transaction logs become structured traces of every prompt, tool argument and result, retained for audit. Deterministic state machines become explicit agent graphs instead of a model looping until it feels finished. None of this is theoretical for us — exchange systems fail loudly and publicly, and that shaped how we design.
We also know when not to build an agent. If the workflow is deterministic, a queue and a cron job will beat an LLM on cost, latency and reliability every time, and we will tell you that in the first call rather than after the invoice. We work with Indian companies and international clients, in your stack, in your cloud, with your compliance constraints intact.
Most problems need one well-instrumented agent, not a swarm. We use multi-agent architectures only when work genuinely parallelises or when sub-tasks need different tool permissions.
The default is a single agent with a tight tool set and an explicit state graph in LangGraph, checkpointed to Postgres so a crashed run resumes instead of restarting. We reach for multi-agent designs in three cases: parallel fan-out over many documents or records; separation of privilege, where a researcher agent reads but only a narrow executor agent writes; and adversarial review, where a second model checks the first one's output against source data before anything commits.
Handoffs are typed and validated with Pydantic, not free text passed between prompts. Long-running work goes to a durable orchestrator — Temporal or a queue-backed worker — so an agent can wait three days for an approval without holding a process open. Shared memory sits in Postgres with pgvector, scoped per tenant. Agents that need your internal knowledge get retrieval built properly, with citations and evaluation, rather than a vector database bolted on and hoped for.
Agents fail in a handful of repeatable ways: runaway tool loops, hallucinated arguments, context overflow, non-idempotent retries, and prompt injection through retrieved content. Each has a known countermeasure, and we build all of them in.
Runaway loops get hard step budgets and per-run token ceilings that halt and alert rather than burn spend silently. Hallucinated tool arguments get schema validation before execution, so a malformed invoice ID is rejected at the boundary instead of writing garbage to your ERP. Context overflow gets summarisation checkpoints and retrieval scoped to the current sub-task, not the whole history. Non-idempotent retries get idempotency keys, so a timeout followed by a retry never creates a duplicate order — the exact discipline that keeps a double-broadcast transaction from double-spending.
Prompt injection gets treated as untrusted input: retrieved documents and user content never carry tool-calling authority, and privileged actions require a separate confirmed path. On top of that sits observability — OpenTelemetry traces, Langfuse for run-level inspection, and an eval suite that runs against a golden dataset on every prompt or model change, so upgrades are measured rather than guessed.
What you get
A written design covering the state graph, tool inventory, permission model, approval gates, failure modes and projected cost per run. Reviewed with your engineering team before a line of code ships.
The working agent, wired into your CRM, ERP, ticketing, database or internal APIs, with least-privilege credentials, retry logic and idempotent writes on every action that changes state.
Step budgets, token and cost ceilings, schema validation on tool calls, injection defences, and human-in-the-loop approvals for actions above thresholds you define in rupees or record volume.
A regression suite built from your real cases, scoring task completion, tool-call accuracy and cost. Runs in CI so a model or prompt change is measured rather than assumed safe.
OpenTelemetry tracing, run dashboards, alerting on loops and spend, plus documentation and working sessions so your team can extend the agent without calling us for every change.
How we work
Two weeks mapping the actual process, systems and exception paths. We identify what an agent should own, what stays deterministic automation, and what should not be automated at all.
One real task, end to end, against real systems in a sandbox. Narrow scope, full instrumentation. This is where cost per run and failure rate stop being estimates.
Build the guardrails, idempotency and approval gates. Assemble the golden dataset, set pass thresholds, and run the agent shadow-mode against live traffic without write access.
Production rollout with capped autonomy, then expand scope as evals hold. Weekly review of completions, escalations and spend until the numbers are boring and predictable.
Every phase ends at a decision point you can stop at — see how that works across fixed-scope projects, embedded pods and retainers.
Stack
Questions
Your chatbot answers questions. An agent takes actions — it queries your database, updates a CRM record, issues a refund, opens a ticket. That write access is the whole difference. It makes agents far more valuable and means they need permissions, approval gates, idempotent writes and audit logs that a chatbot never required.
A single well-scoped workflow typically reaches production in six to ten weeks: two for workflow teardown and design, three to five building the agent and guardrails, then shadow-mode running against live traffic before write access is enabled. Multi-agent platforms with several integrations run longer, usually three to five months.
Scope drives price, not seats. A production pilot covering one workflow with real integrations, evals and monitoring is generally a lakhs-scale engagement for Indian clients; larger multi-agent builds scale from there. Model and infrastructure spend is separate, and we report it as cost per run in rupees so unit economics are visible before you scale.
Yes. We deploy open-weight models such as Llama and Qwen on vLLM inside your VPC or on-prem hardware, with no data leaving your boundary. Quality is lower than frontier models on complex reasoning, so we usually run a hybrid: sensitive steps local, non-sensitive steps on a hosted API with data-processing terms in place.
Layered limits. Least-privilege credentials mean the agent can only touch what its task requires. Every write is idempotent and schema-validated. Actions above a threshold you set require human approval. Step budgets and cost ceilings halt runaway loops. And every run is traced, so a bad action is reversible and explainable, not a mystery.
With an eval suite built from your real cases, not vendor benchmarks. We score task completion rate, tool-call accuracy, escalation rate and cost per run against a golden dataset, and it runs in CI on every prompt or model change. You see the numbers weekly, alongside what the workflow cost before the agent existed.
Questions about cost, timelines, IP ownership and data residency are answered on the general FAQ, and how this practice came out of blockchain infrastructure explains why we build the way we do.
Related
A paid diagnostic that tells you what is worth building and what is not.
The pipelines and quality layer every AI project stalls on.
A working AI product in weeks, scoped to prove one thing to investors or users.
See also: give your agents grounded access to internal knowledge with RAG and LLM integration · automate the deterministic parts of the process with AI workflow automation · put the same agent behind a phone line with AI voice agent development
Tell us what you are trying to build. We will tell you honestly whether we are the right team for it, and what it would realistically take.