Reference · Teaching Assistant

Agent surfaces cheat sheet

Which rung each generation belongs on, where state lives, and how the three platforms compare. Facts checked 2026-09-16 (updated the same day for the "agents own memory" assumption).

1 · The ladder and the climbing test

  1. Plain LLM callCode assembles the inputs, and one call returns a fixed shape.
  2. Workflow / ADK 2.0 graphCode fixes the order of steps; nodes are functions, LLM calls or agents.
  3. Agent with toolsThe model decides what to fetch next.
  4. Managed agent sessionA vendor hosts the loop, a sandbox and session state.

Climb only if the model must decide what to fetch mid-task · the job can wait · the gain is worth several times the tokens (~$0.01 plain vs ~$0.03–0.15 agent per Lesson).

2 · Where state lives (depends on your memory decision)

AssumptionRule
Original: generators never write memory; Postgres is the recordSession-per-job. The agent is stateless, reads Postgres through tools or a bundle, and returns fixed shapes.
Current (2026-09-16): agents may write memory; Postgres is only the harnessSession-per-Thread. /next or the morning run creates a session. Taps and Replies are new events. Threads are never closed (2026-09-17), so sessions stay resumable indefinitely, and memories are written incrementally after each turn or when a newer Thread starts.

Harness test: keep it in Postgres if your code needs it deterministically (routing a Telegram update, the Topic's latest Lesson for progression taps, update_id dedup, jobs and runRef, the Topic in progress, the Backlog copy, spend). Session = the open Thread's transcript. Long-term memory = facts that outlast a Thread (what was hard, Notes, recaps).

2b · Memory services

Memory Bank (Google Agent Platform)Claude Managed Agents memory stores
ModelLLM extraction plus consolidation; similarity retrieval by scopeFiles the agent reads and writes in a mounted directory
WritesFrom session events (add_session_to_memory), event ingestion, or direct CreateMemoryAgent file edits; API seeding
AuditRevisions; TTLImmutable versions; redact
ADK TSVertexAiMemoryBankService (in the 2.1.0 package; docs show only Python); PreloadMemoryTool / LoadMemoryTooln/a
Cost$0.30/GiB-month storage; $0.085 per 3M reads or 1M writes; Gemini tokens billed separately (since 2026-09-01)Part of the Managed Agents session costs
CatchNeeds a GCP project and an Agent Engine id; extraction runs on Gemini; memory-poisoning risk; psql readback lostClaude only

3 · Placement for this project

GenerationRungReason
Reply classifyPlain~2 s placeholder; fixed inputs
Exercise · Answer feedback · Topic recapPlainAll inputs known
Follow-up (plain Instruction)PlainThread context is already loaded
Follow-up that needs Project codeAgent (node)The model picks which files to read
Lesson (select → write)ADK graph + agent select nodeFixed order; exploration only in select
Project digest refreshManaged agentSandbox with git; slow is fine; outside the Thread

4 · Platforms

ADK 2.0 TSClaude Managed AgentsGemini Antigravity
StatusGA 2026-08-21BetaPublic preview
HostingYou (Cloud Run)AnthropicGoogle
ModelsGemini; OpenRouter via custom BaseLlmClaude onlyGemini 3.5–3.8 Flash only
OpenRouter-only ruleKeptBrokenBroken
Output shapezod outputSchemaValidate yourselfNo structured outputs
Custom toolsIn your processagent.custom_tool_use → idle → user.custom_tool_resultrequires_action → create with function_result
Long runsYour requestSSE stream / webhooksbackground: true + poll
StateTS 2.1: in-memory, Postgres (DatabaseSessionService), or Agent Platform sessionsSessions + memory storesprevious_interaction_id; environments kept 7 days
Extra costCloud Run (free tier likely)$0.08 per active hour; budget cap per sessionSandbox compute free during preview

5 · Seam contract (agent-ready)

generate(kind, jobId, bundle) → { done, result } | { pending, runRef }
collect(runRef)               → { done, result } | { pending } | { failed }

The 150 s Edge wall clock makes pending → collect mandatory for agent engines. Collect through a webhook (Claude Managed Agents, or a Cloud Run callback) or a pg_cron poll (Antigravity). For managed runs, mount the context bundle as files instead of custom tools: each custom-tool call is a round trip through your code.

Sources

Building effective agents · Why we built ADK 2.0 · ADK 2.0 · ADK graphs · ADK human input · ADK sessions · Claude Managed Agents · Gemini Managed Agents · Antigravity agent · Custom agents · Memory Bank · Memory Bank + ADK · adk-js source