Creating Talking Agents
Basic talking agents and orchestration.
A practical, playful, code-first guide to building agentic AI systems using Gemini, orchestration, memory, tools, retrieval, RAG, MCP servers, and multi-agent reasoning patterns.
Go to Google AI Studio and log in with your Google account.
Select API Keys from the left navigation panel.
Click Get API Key and connect a Google Cloud project.
Save the key in environment variables or configuration files.
Each script introduces one new mental model. Read them in sequence to understand how modern agentic systems evolve from simple prompts into orchestration architectures.
Basic talking agents and orchestration.
Identity, memory, and fact extraction.
Moderator controls conversation routing.
Tool-calling agents using external functions.
Structured outputs and machine-readable reasoning.
Agents reason and route control dynamically.
Supervisor routes work to specialist agents.
Fan-out and fan-in reasoning systems.
Competing agents and judge evaluation.
Persistent database-backed memory systems.
Collaborative multi-agent memory architecture.
Transform text into structured entities.
Prepare documents for semantic retrieval.
Retrieve vectors before answering.
Retrieval-augmented generation basics.
Agent decides when retrieval is needed.
Retrieval across multiple reasoning steps.
Understanding the Model Context Protocol.
Client-side MCP communication.
Build custom MCP-powered servers.
End-to-end architecture with MCP tools.
Start with the class that wraps Gemini. That is the mind of the pattern.
Look for memory, facts, retrieved context, JSON outputs, and tool results.
The orchestrator tells you how control moves between agents.
System prompts define roles, routing, constraints, and structured behavior.
Change one variable at a time: role, memory, tool, retrieval, or routing.
The earliest scripts teach the basic loop: receive input, build context, call Gemini, store response.
Alternation, moderation, supervisor routing, and handoff are all control-flow patterns.
Chunking, embedding, vector search, RAG, and multi-hop retrieval prevent blind guessing.
The MCP patterns separate reasoning from capability, letting agents call external tool servers.
This cookbook moves from simple conversations to serious agent architecture: memory, tools, supervision, retrieval, MCP, and full integration.
Read the scripts in order. Each one adds a new capability to the previous mental model. By the end, you are no longer just prompting a model — you are designing an intelligent system.