WM—01 · WatermelonsonFrom wrappers to coordinated agents2026

The
LL(M)adder.

From a model call to systems that retrieve, act, and delegate.

Simple API and tool demos

07Coordination
06State & memory
05The harness
04MCP
03Tool calling
02Context
01The wrapper
Ali Karpuzoglu · watermelonson.com→ next · ← back · n notes
IntroductionFrom wrappers to coordinated agents2023–2026

Ali Karpuzoglu

Senior AI engineer & technical lead. Master’s in Autonomous Systems.

Head of Development at an AI education startup, 2023–2026. Part of my work was building agents.

Today: the architecture behind LLM applications, from one request to coordinated work.

Introduction
The timelineFrom wrappers to coordinated agents2023–2026

The layers overlap.

WhenA useful landmarkWhat it illustrates
Before 2023RAG research (2020); ReAct (2022)Retrieval and reasoning/action loops predate the wrapper boom.
2023Chat-style applications; function calling; AutoGenModel APIs become a common starting point. Multi-agent experimentation is already happening.
Late 2024MCP is introducedA shared protocol for tools and context across applications.
2025–2026Composing these capabilitiesRuntime controls, context, reusable integrations, and coordination work together.
The timeline
01 · The wrapperText in, text outEarly 2023

A familiar starting point

request →
response.

A UI collects input. Your application adds instructions, calls a model, and displays the answer. Application-specific information must be supplied in the request.

This example is stateless. The application must supply history.

The next question: how does the answer become useful for your documents, your users, and your current data?

systemYou are a concise assistant.
userIn two sentences: what is an LLM agent?
model
assistantAn LLM agent is a system that uses a language model to reason, plan and act toward a goal…
01 · The wrapper
01 · The wrapperLive · one call, nothing else
01_call.py
02 · ContextFrom wrappers to coordinated agents2023–2026

Give the model the relevant information.

Question → retrieve relevant material → assemble context → model → answer

Instructions

What the application wants the model to do.

Retrieved information

Relevant passages, records, or search results, with their sources.

Conversation

The history needed to understand this request.

Retrieval-augmented generation: retrieve information and use it to ground the answer.

02 · Context
02 · ContextFrom wrappers to coordinated agents2023–2026

Choose what the model sees.

NeedApplication responsibility
Relevant evidenceSelect useful passages; keep source references.
Room to workBudget for instructions, history, tool results, and the answer.
Long conversationsSelect, trim, or summarize history; preserve important facts.
Continuity across sessionsPersist useful state and retrieve it when needed.

More context can help. Irrelevant or excessive context can also hide what matters.

02 · Context
03 · Tool callingThe model requests an action2023 → · 02_tools.py

Function calling · no framework yet

The model requests. The runtime executes.

model
decides
tool request
now()
your side of the fence
youexecute it
result
the date and time
again

Ask the model, give it the tool schemas alongside the messages.

If it did not ask for a tool, it answered, and we are done.

Otherwise we run the tool on our side, and hand the result back as a message. The model never runs a tool you defined.

Then we go around again. The model chooses the next step from the result. This is a minimal agent loop.

# this loop is the agent
for turn in range(1, 9):
    resp = client.chat.completions.create(
        model=args.be.model, messages=messages, tools=TOOLS,
    )
    msg = resp.choices[0].message
    messages.append(msg.model_dump(exclude_none=True))
    # no tool wanted → it answered
    if not msg.tool_calls:
        break
    # we execute, not the model
    for call in msg.tool_calls:
        result = dispatch(call.function.name,
                          call.function.arguments)
        messages.append({"role": "tool",
                         "tool_call_id": call.id,
                         "content": result})
03 · The loop
03 · Tool callingLive · watch the messages array grow
02_tools.py
03 · Tool callingWhat it cost

The ceiling

Too much
wiring.

Each external service needs an adapter: a tool description, arguments, execution, and results. Different applications may repeat that work.

Shared libraries help. A shared protocol lets compatible applications reuse an integration through the same interface. That is where MCP fits.

03 · What it cost
04 · MCPA reusable integration boundaryNovember 2024 →

Model Context Protocol

You point it at a server and the tools appear.

The host discovers tool schemas through MCP and exposes selected tools to the model. The decision/action/result loop stays the same.

The server implements the integration. Compatible applications can reuse it. MCP also supports resources and prompts.

mcp server local or remote

nowCurrent local date and time. list_filesList files in the sandbox directory. read_fileRead a sandbox file by name. word_countCount words in a sandbox file. echoEcho text back. Filler tool. upperUppercase some text. Filler tool. reverseReverse some text. Filler tool. addAdd two numbers. Filler tool.
initialize() list_tools() at run time

the loop's tools 0

now list_files read_file word_count echo upper reverse add
This demo loads all eight schemas upfront
04 · MCP
04 · MCPLive · all eight tools, then a filter
03_mcp.py · mcp_server.py
04 · MCPFrom wrappers to coordinated agents2023–2026

APIs for LLMs?

A useful analogy. More precisely: MCP is a standard interface for LLM applications to discover and use tools and context, often backed by existing APIs.

MCP providesThe host / runtime decides
Tool discovery and invocationWhich tools enter the model’s context and which calls are allowed.
Resources and promptsWhen to include data or instructions.
A local or remote connectionCredentials, scopes, isolation, and connection policy.

Tool search and deferred loading can avoid putting every schema into every request.

04 · MCP
05 · The harnessAgent ≠ bigger model

The model decides.
The harness runs the show.

User input

ContextInput + history + skills
ModelDecides next action
ToolsExecute approved action
Tool resultsAppend to conversation

ProviderConnects the model

Hooks + permissionsInspect / allow / block

After-tool hook

Next call

↑ Final answer → user

SteeringNew guidance → context

CallbacksEvents → streaming UI, logs, metrics
Harness policyBudgets · iteration limits · stop / pause
PluginsPackage tools, hooks & configuration
SkillsSupply task instructions & resources
One agent run · repeated model calls
05 · Building blocksFrom wrappers to coordinated agents2023–2026

Where the names fit.

TermRole in the system
AgentA model-driven loop pursuing a task using context and available actions.
Harness / runtimeRuns the loop and manages execution, state, limits, and permissions.
Framework / SDKReusable code for building agents, runtimes, and workflows.
SkillTask instructions and supporting resources, loaded when relevant.
PluginA host-specific package of extensions, such as tools, skills, or integrations.
05 · Building blocks
05 · StateFrom wrappers to coordinated agents2023–2026

Transcripts alone can only do so much.

Working context

What this model call can see: instructions, selected history, results.

Durable knowledge

Information retained for later work and retrieved when relevant.

Execution state

What was requested, what completed, and where to resume.

The application decides what persists, what is shared, and what each agent receives.

05 · State
06 · Multiple agentsFrom wrappers to coordinated agents2023–2026

Split the work.

Specialization

Different instructions, tools, or access for different responsibilities.

Separate context

Each specialist receives the material needed for its assignment.

Parallel work

Independent investigations can proceed at the same time.

Each specialist is another agent loop. Multiple agents may use the same underlying model - but they don't have to

06 · Multiple agents
06 · CoordinationFrom wrappers to coordinated agents2023–2026

Who chooses the next step?

PatternControlTradeoff
Agents as toolsA parent delegates bounded tasks and uses the returned results.Simple ownership; parent context and synthesis can become bottlenecks.
Graph / workflowExplicit dependencies, conditional branches, and possible loops.Clear structure; routing and state still need careful design.
Handoffs / swarmAgents can choose which specialist takes over next.Flexible routing; repeated handoffs can waste work and budget.
06 · Coordination
06 · Worked exampleFrom wrappers to coordinated agents2023–2026

A refund request, end to end.

Parent agentTask, delegation, synthesis
↓ bounded assignments   ·   ↑ findings + evidence
Account lookupOrder history + refund policyMCP client → internal systems
Delivery investigationCarrier tracking + exceptionsRead-only external tools
Decide & actEvidence → proposal → approval → refund
Runtime around every loop: context · permissions · state · budgets · events
06 · Worked example
06 · Worked exampleFrom wrappers to coordinated agents2023–2026

Follow the information and control.

StepWhat movesWho controls it
1 · AssignQuestion, relevant context, expected result, allowed toolsParent chooses tasks; runtime enforces access.
2 · InvestigateTool requests → execution → evidenceEach specialist runs its own loop.
3 · ReturnFindings, source references, uncertainty, blockersSpecialist returns a result to the parent.
4 · DecideA proposal with its evidence, and what it would costDependent work starts after the findings.
5 · Act or escalateThe refund, or a human approving itRuntime gates the one consequential call.
06 · Worked example
06 · TradeoffsFrom wrappers to coordinated agents2023–2026

Delegation adds work of its own.

CostDesign response
Repeated context and model callsDelegate bounded work; pass only relevant information.
Lost details in handoffsUse explicit result formats, evidence, and artifact references.
Conflicting edits or decisionsDefine ownership; isolate writes; reconcile changes.
Loops, failures, cancellationEnforce shared budgets, timeouts, and clear completion rules.

Compare against a single-agent baseline: quality, elapsed time, cost, and failure rate.

06 · Tradeoffs
07 · Choosing complexityFrom wrappers to coordinated agents2023–2026

Evaluate the system you will run.

Outcome

Did it solve the task? Use checks and a clear quality rubric.

Execution

Were actions permitted, required steps completed, and failures handled?

Cost & reliability

Measure repeated runs, long sessions, latency, and total resource use.

Test runtime rules cheaply. Evaluate task success with the deployed model and configuration.

07 · Choosing complexity
07 · Choosing complexityFrom wrappers to coordinated agents2023–2026

Use the pieces the task needs.

Task shapeA reasonable starting point
A bounded transformationOne model call.
An answer grounded in your dataRetrieval plus generation.
A known sequence of stepsAn explicit workflow.
Actions depend on what is discoveredAn agent loop with scoped tools.
Separable work or distinct responsibilitiesCoordinated agents, evaluated against a simpler baseline.
07 · Choosing complexity
The complete pictureFrom wrappers to coordinated agents2023–2026

What changed around the model?

Request → context → model → action → result → next decision

Connections

Tools execute actions. MCP standardizes access to integrations.

Execution

The harness manages the loop. Skills and plugins supply reusable capabilities.

Coordination

Multiple loops exchange assignments and results under an orchestration policy.

The architecture grows around the work you need it to do.

The complete picture
QuestionsFrom wrappers to coordinated agents2023–2026

From one answer to coordinated work.

What does the model need to know? What may it do? Who decides what happens next?

Ali Karpuzoglu · watermelonson.com

Questions

Run the demos in this browser

Point the demo buttons at any OpenAI-compatible chat-completions endpoint. Requests go straight from this page to that endpoint; the key stays in this tab. The browser port runs 01_call, 02_tools and 03_mcp; the other rungs replay their recordings.