Methodology · Agent Constructionprovenverified

Agentic Workflow Construction

also known as four-component agent build

Applies to: agentcoding-agentbrowser-agentvoice-agent

Tags: agent-anatomyfour-componentinteraction-paradigm

Build an agent out of four named parts before you write any loop. The four parts are the model, the tools, the data stores, and the loop prompt that ties them together. Also pick how much freedom the model gets each turn. That choice is the interaction paradigm: passive, explicit, or autonomous. Keep every part separate so you can swap one without touching the rest. The more freedom you give the model, the more safety checks the loop needs.

Methodology process overview

Intent. Make agent authors name the four parts and the freedom level before they code, so a failure points to one part instead of smearing across a vague agent.

When to apply. Use this when you build a new agent from scratch. It fits a coding agent, a customer-service agent, a browser agent, or an internal-tools agent. Do it on day one, before you write the loop. Don't apply it when you are just wiring up a single model call with no tools or memory. That is a prompt, not an agent.

Inputs

  • Task specificationWhat the agent has to do, written as something a user can ask for.
  • Available model(s)The models the agent can call. Note each one's cost, speed, and what it is good at.
  • Tool inventoryThe outside services the agent may use: APIs, databases, search, browsers, sandboxes.
  • Data store(s)The places the agent reads and writes: memory stores, vector indexes, caches, scratchpads.

Outputs

  • Named four-component agentAn agent whose model, tools, data stores, and loop prompt are each built on their own and easy to swap.
  • Declared interaction paradigmThe chosen freedom level. Passive means the model only writes text. Explicit means the model uses tools when told to. Autonomous means the model picks its own tools and keeps going until the job is done.
  • Agent loopThe control flow that runs the four parts under the freedom level you picked.

Steps (7)

  1. Pick the interaction paradigm

    Pick how much freedom the model gets. Passive: it only writes text and cannot see tools or memory. Explicit: the loop calls tools at set points and the model just decides the content. Autonomous: the model decides what to do at each step. Pick the lowest level that solves the task. More freedom costs more and is risky to turn on too early.

  2. Author the model component

    Choose the model, the rough shape of the system prompt, and the output format if you need one. This is where the smarts live. Everything else is plumbing.

    usesAugmented LLMStructured Output

  3. Author the tool component

    List the tools as typed function signatures with the descriptions the model will see. Each tool returns structured data, not loose prose. Check every tool return against its schema before it goes back into the loop.

    usesTool Use

  4. Author the data-store component

    Pick the memory shape: scratchpad, key-value store, vector index, or event log. Decide what the model reads at each step. Decide what the loop writes after each step.

    usesScratchpadEpisodic Memory

  5. Author the agent-loop prompt

    Write the loop prompt that ties the model, tools, and data stores together. Say clearly which tools exist, when the loop ends, and what success looks like.

  6. Add guardrails and verifiers

    For autonomous agents, add input and output guardrails, tool-call checks, and a stop condition. The more freedom the model has, the more checks the loop needs.

    usesInput/Output Guardrails

  7. Bind to an orchestration framework only when needed

    If the loop needs fan-out, retries, observability, or a state-machine shape, move it into a framework such as LangGraph, CrewAI, AutoGen, or Pydantic AI. Do not reach for one on day one. A hand-rolled loop is fine for the first cycle.

Framework-specific instructions

Pick a framework and generate a framework-targeted rewrite of this methodology's steps.

Choose framework

AI-generated for Agent Development Kit (ADK) (Google) — verify against official docs.

Principles

  • Name all four parts. Debugging an unnamed part is debugging fog.
  • Pick the lowest freedom level that solves the task.
  • Tool returns are structured data, never loose prose.
  • Safety checks grow with freedom. Passive needs almost none. Autonomous needs many.

Known failure modes (3)

Related patterns (5)

Related compositions (2)

Related methodologies (2)

Sources (2)

Provenance

  • Added to catalog:
  • Last updated:
  • Verification status: verified