About AgentLab
What this page is, in plain terms.
AgentLab is a small teaching demo: it shows, rather than explains, what an AI agent actually
is — a while loop that lets a language model pick the next function call. There's
no product behind it. It's one page, one loop, one fictional shop.
What's running
The lab page sends your message to Google's Gemini API (currently gemini-flash-latest)
along with eight tools for a small homewares shop — look up an order, read a policy, check stock,
issue a refund, and so on. The model decides which tool to call, sees the result, and decides
again, up to 12 turns per run. Every tool call actually changes the shop's data, so you can check
the agent's work in the tables further down the page instead of taking its word for it.
The three panels underneath
- What the model sees — the exact conversation, tool calls, and results being re-sent to the model on every turn. The model is stateless; it remembers nothing on its own.
- Tool schemas — the JSON function declarations the model actually reads, generated straight off the C# method signatures.
- The source — the real code behind the loop, embedded in the app so what you read here is exactly what's running, not a pasted snippet that drifts.
- System prompt — the instruction the agent is given before any of this starts.
Step-through mode
Check "Approve every tool call" before running, and the loop pauses before each tool call and waits for you to approve or deny it — useful for watching one decision at a time instead of a transcript that's already finished.
The fictional shop
The orders, customers, inventory, and emails are all made up and reset to the same seed data every time you press "Reset the shop." Nothing here is a real order, a real customer, or a real charge. See Privacy for what does and doesn't leave your browser.
Part of ClarkApps
AgentLab is a ClarkApps project.
← Back to the lab