Duck
Tutorials5 min read

AI Agent Orchestration Platform: Build Your Own Operator Stack

Samet Turan— Editor··5 min read

Learn to build a reliable AI agent orchestrator with real prompts, tool choices, and debugging tips—then get a ready-made blueprint to skip the setup.

AI Agent Orchestration Platform: Build Your Own Operator Stack

You keep copying prompts between chat windows, hoping the AI remembers what you said three steps ago. It forgets, repeats itself, or wanders off‑topic, and you waste time re‑explaining context. After reading this, you’ll be able to wire a simple orchestrator that passes state between agents, logs each step, and restarts on failure without manual copy‑pasting.

Why does context collapse after the third agent call?

Most people treat each LLM call as an isolated question. They send a prompt, get an answer, then start fresh with the next prompt. The model has no memory of the earlier output unless you explicitly feed it back. When you chain three or more agents, the missing context shows up as contradictory instructions or duplicated work.

I ran into this while trying to auto‑qualify inbound leads. The first agent extracted the company name, the second pulled the tech stack, and the third tried to score fit. Without passing the extracted name forward, the second agent hallucinated a company, and the third gave a random score. The fix was simple: treat the orchestrator as a state bucket that accumulates each agent’s output and injects the bucket into the next prompt.

You don’t need a fancy framework for this. A small JSON object stored in a step‑by‑step workflow tool works just as well as a custom server.

What most guides get wrong about prompt chaining

Many tutorials show you how to concatenate prompts into one giant string and call the model once. That approach works for two steps but blows up when you need branching logic or error handling. They also ignore the cost of re‑sending the entire history each time, which burns tokens and slows responses.

What they miss is that the orchestrator should be responsible for three things: (1) storing intermediate results, (2) deciding which agent to call next based on those results, and (3) handling retries when an agent returns an error or empty output. Without those three pieces, you end up with a brittle chain that breaks the moment the input varies slightly.

I’ve seen guides suggest using LangChain’s LLMChain for every step, then complaining about latency. The real issue isn’t the library—it’s the assumption that each step can be a black box that magically knows the prior output.

Concrete example: lead‑qualification flow with Claude and the Make platform

Let’s walk through a real build I use for a freelance agency. The goal: take a new form submission, enrich it with public data, and decide whether to schedule a sales call.

First, I trigger a webhook from Make.com when a Typeform entry arrives. The webhook passes the raw JSON to a HTTP module that calls Claude via Anthropic’s API with this prompt:

Extract the company name and website from the following form data. Return JSON with keys "company" and "website".

Form data: {{form_json}}

Claude returns {“company”:”Acme Corp”,”website”:”https://acme.com”}. I store that output in a Make.com variable called step1.

Next, I call a second HTTP module to Claude with a new prompt that uses the variable:

Given the company {{step1.company}} and website {{step1.website}}, list the main technologies they use (e.g., CMS, CRM, marketing stack). Return a JSON array called "tech".

The result goes into step2. Finally, a third Claude call scores the lead:

Based on the tech stack {{step2.tech}}, assign a score from 0 to 100 where higher means a better fit for our service. Return {"score": number}.

The score lands in step3. A simple router in Make.com checks if score > 70; if yes, it creates a Calendar event, otherwise it logs the lead to Airtable for nurturing.

This flow runs in under six seconds per lead and costs roughly $0.004 in Claude tokens per run. The Make.com plan I use is the $19/mo Basic tier, which gives me enough operations for a solo operator. I think $19/mo is fair for the automation you get—especially when you compare it to hiring a VA for the same task.

— and good luck finding docs for this — the Anthropic API reference is solid, but Make.com’s error logs are cryptic when a module returns a non‑200 status.

How to debug when the orchestrator drops context

When the chain suddenly forgets a variable, the first place to look is the data mapping between modules. In Make.com, each module has an “Input” tab that shows exactly what it received. If the field you expect is missing, the previous module either didn’t output it or used a different name.

I once spent an hour chasing a missing "website" field only to discover that the first Claude call had returned "Website" with a capital W because I’d forgotten to enforce lowercase in the prompt. The fix was to add a explicit instruction: "Return all keys in lowercase."

Another common failure mode is silent timeout. If an agent takes longer than the webhook’s response window, Make.com marks the step as errored and discards the output. The workaround is to increase the timeout setting in the HTTP module or to move the heavy lifting to a background job that calls a webhook when finished.

One‑sentence paragraph: Keep a simple logger module that dumps the full JSON state to a text file after each step; it saves you hours of guesswork.

When you see a mismatch, compare the logger output with the prompt you sent. Often the issue is a stray space or a line break that changes how the model parses the request.

Price check: what you actually pay for each piece

Here’s a quick rundown of the costs I see month‑to‑month for a solo operator running ~500 leads:

  • Claude API: $0.008 per 1k tokens. My flow uses ~2.5k tokens per run → $0.02 per lead → $10/mo.
  • Make.com Basic: $19/mo (includes 10k operations, more than enough for 500 runs).
  • Airtable Plus: $12/mo for the base I use to store leads.
  • Total: roughly $41/mo.

I think $41/mo is a reasonable price for a fully automated lead‑qualification pipeline that saves me about 15 hours of manual work each month. If you’re just testing, the free tier of Make.com plus the Claude API free credits will let you run a few dozen flows without spending a cent.

We cover this in more depth elsewhere — deeper coverage of AI agent platforms.

When to grab the blueprint instead

If you’d rather skip the build and deploy a working version in an afternoon, we’ve packaged this workflow as a blueprint at deepusecase.com/vault/ai-agent-builder-kit.

— The Colophon

One AI tool. Tested. Reviewed.
In your inbox every Sunday.

~3 minute read. Real outcomes from operators, not marketers.

Free. One email per Sunday. Unsubscribe in one click.