Implementations
Build-it-yourself guides — wiring a Eureka-style reward loop and a multimodal web agent end-to-end using Google's Agent Development Kit (ADK).
Pattern-thinking and case studies tell you what to build. The Implementations topic tells you how. Each writeup is a concrete walk-through of assembling a working agent with Google ADK — setting up the agent, wiring the tools, running the loop, handling exit conditions, plugging in evaluation and human feedback.
We use ADK because it's a current, capable, openly documented framework. The patterns transfer to LangChain, AutoGen, LangGraph, smolagents — most agent SDKs converge on a similar set of primitives. ADK is the surface; the design lessons are framework-agnostic.
Key concepts
- ADK gives you primitives — agent, tool, runner, evaluation — not opinions about what to build
- Setup is the most error-prone step in any agent build — env, tool registration, prompt scaffolding all need to line up
- Loop control matters as much as loop logic — step budgets, success predicates, stagnation checks save real cost
- Evaluation harness is part of the implementation, not an afterthought
- Human-in-the-loop hooks are easier to add early than to retrofit
Reference template
// Agent build, in order
1. Define the goal (what done looks like)
2. Pick the primary pattern (ReAct? planner-executor? multi-agent?)
3. Design the tool surface (function signatures, schemas)
4. Wire memory (working context, persistence, retrieval)
5. Set instructions (role, rules, format)
6. Implement the loop (step, observe, decide, repeat)
7. Set exit conditions (success? budget? stagnation?)
8. Add observability (logging, traces, eval hooks)
9. Evaluate (on a held-out set, against a rubric)
10. Iterate (failures into the eval set, fix, repeat) Adapt to your problem; the structure is the load-bearing part.
Common pitfalls
- Skipping the smallest hello-world before adding complexity — debug the wiring first, then add the cleverness
- Hardcoding loop budgets without observability — you'll hit the budget and not know why
- Tool surfaces that overlap — the model picks at random when two tools could plausibly do the job
- No exit condition for stagnation — agents can spin on the same step indefinitely without a stagnation detector
Related topics
Items (5)
- Agent Development Kit (ADK) Overview
Google's Agent Development Kit. What's in the box: agent primitives, tools, orchestration, evaluation harness, and the workflow it expects.
Implementation Foundational - Setting Up and Grounding an Agent
Wiring an agent to its environment — env vars, tool registration, prompt scaffolding, and the smallest workable hello-world loop.
Implementation Intermediate - Building a Eureka-Style Reward Loop with ADK
End-to-end implementation: reward generation, evaluation, selection, reflection, and human feedback — wired together as a closed loop.
Implementation Advanced - Building a Multimodal Web Agent with ADK
Playwright state management, screenshot-and-DOM grounding tools, and a multimodal ReAct loop assembled with ADK primitives.
Implementation Advanced - Loop Control and Exit Conditions
When to stop. Step budgets, success predicates, stagnation detection, escape-hatch handoffs — the under-loved half of every agent.
Implementation Intermediate