Skip to content
ODUONYE.
Go back

AI-Native Engineering 00: Choose the Smallest Agentic Shape

This is part 1 of 9 in the AI-Native Engineering series. Start with the course index or continue to the next part below.

Audience. You should know one programming language, Git, a shell, HTTP, and how to run tests. The examples use plain files, JSON, HTTP, Git, and shell so the ideas transfer across agent SDKs.

Shared capstone. Every part extends the same shop-agent: a support agent that searches products, inspects orders, and prepares—but never executes—a refund recommendation. The companion repository lives alongside the site source.

Choose the Smallest Agentic Shape

Capability. Decide whether a task needs a deterministic function, a workflow, or an autonomous agent.

Mental model. A workflow has a known path; an agent chooses the next step from observations. Start with the smallest shape that meets the need. Anthropic’s guidance is to start simple, evaluate, and add autonomy only when simpler systems fail.

flowchart TD
    Q[Task] -->|ask whether steps are known| D{Fixed path?}
    D -->|yes| W[Workflow]
    D -->|no, observable feedback| A[Bounded agent]
    D -->|no safe stop/evidence| H[Human-led task]

Text equivalent: Start with the task. A known sequence becomes a workflow. An unknown sequence can become a bounded agent only when it has observable feedback and a stop condition; otherwise a human should lead it.

Module contract. Starting state: course/shop-agent and labs/module-0.md. Edit decision.md; run the command in that file; prove the safe handoff test passes.

Five terms. model (the reasoning engine); tool (a typed action or query); workflow (fixed orchestration); agent (model-led loop); harness (the code that runs the loop and enforces limits).

Worked example. “Sum today’s orders” is a function. “Classify a support message, look up an order, and choose between answer, question, or handoff” is a workflow with a bounded decision. “Investigate an unknown production regression across logs, code, and tests” is agent-shaped because the steps are not known in advance.

Your turn. For three tasks, write: goal, allowed actions, stop condition, evidence of success, and whether the path is fixed. If you cannot state a stop condition, the task is not ready for an autonomous agent.

Break it. Remove the maximum-step limit and feed a tool timeout. The agent must stop, record the failure, and hand off rather than loop forever.

Acceptance test. A decision.md file contains three choices and a reason for each. A test proves the agent stops after N failed tool calls.

Use when / don’t use when. Use an agent for open-ended, multi-step work with observable feedback. Do not use one for a stable calculation, a known CRUD path, or a high-stakes action without a human checkpoint.

Continue the series

Next: Package Procedural Knowledge as Agent Skills →

Return to the course index.


Share this post:

Previous Post
Designing a Reliable Go Backend for AI and Real-Time Products
Next Post
AI-Native Engineering 01: Package Procedural Knowledge as Agent Skills