Anatomy of an agentic loop
An agent isn't a prompt — it's a loop that reasons, calls tools, observes, and repeats until it can answer. Here's that loop, running live.
A chatbot takes one message and returns one answer. An agent does something fundamentally different: it runs a loop. It reasons about what to do, takes an action — usually a tool call — observes the result, and decides whether it’s done or needs to go around again.
That loop is the whole game. Everything Thaliq builds sits under it. So instead of describing it, press Play and watch one run:
Hit Play or Step to watch the agent think.
Reason → Act → Observe → repeat
Every turn of the loop has the same shape:
- Reason — the model decides what needs to happen next. Sometimes that’s “I can answer now.” Often it’s “I need more information.”
- Act — the model calls a tool: an HTTP endpoint, a database query, an MCP server. This is where the agent touches the real world.
- Observe — the tool result comes back into context, and the model reasons again.
The loop keeps going until the model has enough to answer. Two tool calls or ten, the shape never changes — which is exactly why it can be infrastructure.
Tools are how agents do anything real
A model on its own can only produce text. Give it check_order, create_ticket, or a Google Sheets MCP server, and it can look things up and take actions. In the demo above, the agent doesn’t know where order #1234 is — it calls a tool to find out, then answers from the result. No hallucinated tracking numbers.
When the loop should stop and ask a human
Look at the second scenario (Refund + HITL). The agent gets to a point where it could act — but the refund is above the auto-approve limit. So the loop pauses and requests human-in-the-loop approval instead of pushing the button.
That’s not a limitation; it’s the design. Autonomy where it’s safe, a human checkpoint where it isn’t. The loop is where you enforce that.
Why this is infrastructure, not a prompt
Running one loop in a notebook is easy. Running millions, in production, is not. The loop needs:
- Streaming so users see tokens and tool calls as they happen.
- Durable memory so a conversation survives a redeploy.
- Retries, timeouts and cancellation for tools that fail or hang.
- Guardrails and HITL wired into every turn.
- Usage facts — tokens in, tokens out — so you can see cost per agent.
That’s the part nobody wants to rebuild. It’s what Thaliq is: the loop, the tools, the memory and the guardrails, as infrastructure — model-agnostic, so you bring your own LLM, and deployable in our cloud or yours.
The loop is simple. Making it dependable is the work. We did the work.