Designing Your First Agent (On Your Phone)
The Goal
In this chapter, you will build your first small agentic system without writing code.
You will do it in an ordinary chat interface, even on your phone. The point is not that a chat thread is the final form of an agent platform. The point is that the core architecture from Chapter 3 can be practiced in plain language:
role
โ
task
โ
step
โ
tool-like action
โ
memory log
โ
reflection
โ
revision
This exercise builds a research assistant with a Manager role, a Researcher role, a visible Knowledge Log, and a review step.
One important boundary: the “tools” in this chapter are simulated unless your chat application actually has browsing, retrieval, or file access enabled. Simulated tools are useful for learning the pattern, but they are not evidence. If the system pretends to search, you should treat the results as hypotheses until verified.
What You Are About to Build
The system has three parts:
| Part | Responsibility |
|---|---|
| Manager | breaks the user’s goal into steps and decides what happens next |
| Researcher | gathers and explains information for each step |
| Tool prompts | describe allowed actions such as search, summarize, compare, and format |
The runtime here is just the chat session. The state is text you ask the model to maintain. The memory is a visible Knowledge Log in the conversation. The human operator is you: you decide whether the result is useful and whether any claim needs verification.
By the end, you will have a reusable prompt pattern for a lightweight research assistant.
Step 1: Assign the Roles
Start with one message that defines the system:
I want you to help me as a small role-based agent system.
Roles:
- Manager: breaks my goal into steps, assigns work, and keeps track of progress.
- Researcher: gathers considerations, explains tradeoffs, and reports findings.
- Reviewer: checks the final answer for clarity, bias, missing context, and usefulness.
State:
- Keep a visible Knowledge Log.
- Keep a visible Open Questions list.
- After each step, update both.
Tool boundary:
- If you do not have live browsing or file access, say that clearly.
- You may simulate search only as a brainstorming aid.
- Do not present simulated search as verified evidence.
Wait for my topic before beginning.
Example: Define the Agent Team
Manager Agent
I will coordinate the task, decide what should happen next, and keep track of progress.
Researcher Agent
I will carry out research tasks assigned by the Manager and report findings in a structured way.
Available capabilities
- Search – retrieve external information if a real search tool is available.
- Summarization – condense source material into useful notes.
- Extraction – turn relevant information into structured data.
- Review – inspect the output against explicit criteria.
This message does more than ask for help. It creates roles, state, memory, a tool boundary, and a finite action space. In a real agent runtime, the model cannot do every action it can describe. In this exercise, make the same boundary visible:
Allowed actions:
- propose next research step
- summarize available information
- ask for verification
- update Knowledge Log
- update Open Questions
- request human decision
Not allowed:
- claim simulated search as a source
- mark a claim verified without evidence
- continue after the completion contract is met
Step 2: Give the Manager a Task
Now provide a topic:
Manager: I want to learn about the future of urban transportation.
Break this into 3-5 research steps.
For each step, say what the Researcher should produce.
A useful response should look something like this:
Manager plan:
1. Identify major current trends.
2. Compare emerging technologies.
3. Examine environmental and policy implications.
4. Identify risks, uncertainties, and open questions.
5. Produce a short final brief.
Do not worry if your result differs. Variation is part of the exercise. What matters is that the Manager creates visible work units.
Step 3: Run the Researcher
Ask the Researcher to handle the first step:
Researcher: Complete step 1.
Use the available tools if you actually have them.
If not, clearly label your output as unverified background knowledge.
Return:
- three trends
- why each matters
- one uncertainty for each
- Knowledge Log update
- Open Questions update
Example: Create and Execute the Research Plan
Manager Agent
For the topic The Future of Urban Transportation, use this five-step plan:
- Key trends and technologies
- Sustainability and environmental impact
- Social and economic dimensions
- Global city case studies
- Future scenarios and challenges
Assign each step to the Researcher and maintain a Knowledge Log with completed work, useful findings, and open questions.
Researcher Agent – Step 1
Three technologies worth investigating are:
- Micromobility – e-bikes, scooters, and other lightweight vehicles for short urban journeys.
- Electric road systems – infrastructure that can provide power to electric vehicles while they travel.
- Advanced air mobility – emerging electric vertical take-off and landing systems for short-distance transport.
Because this is a no-browsing exercise unless real tools are enabled, these are unverified background candidates rather than sourced findings.
The system now has a loop:
Manager assigns
โ
Researcher produces
โ
state is updated
โ
human inspects
If a claim matters, ask for verification:
Which claims in that answer require live sources before I should trust them?
List them separately from general background reasoning.
That one prompt teaches an important habit: agent outputs are not automatically evidence.
Step 4: Add Memory Without a Database
You can simulate memory by asking the system to maintain visible state:
Before moving to step 2, show:
1. Knowledge Log
2. Open Questions
3. Completed Steps
4. Next Step
Knowledge Log
| Step | Topic | Status |
|---|---|---|
| 1 | Key trends and technologies | Complete |
| 2 | Sustainability and environmental impact | Pending |
| 3 | Social and economic dimensions | Pending |
| 4 | Global city case studies | Pending |
| 5 | Future scenarios and challenges | Pending |
Open Questions
- Which claims need live sources?
- Which examples are specific to one city or region?
- Which trends are mature enough to include in a final brief?
This is not long-term memory in the technical sense. It is conversation state. The model can use it because it remains in context.
You can make the distinction explicit:
At the end of this session, create a compact Memory Summary I can save.
It should include durable preferences, important findings, unresolved questions,
and suggested next actions.
If you paste that summary into a future session, you have created manual persistent memory. A real application would store and retrieve that memory for you.
Example: Make the Completion Contract Explicit
User
At the end of the task, produce a concise summary covering all five research steps. Include open questions and mark anything that still needs source verification.
Manager Agent
Completion now requires a final summary covering all five steps, a list of unresolved questions, and a clear separation between verified evidence and unverified background reasoning.
Step 5: Add Reflection
Now add a review loop:
Reviewer: Evaluate the Researcher's latest output.
Use these criteria:
- clarity
- relevance to the user's goal
- evidence quality
- missing perspectives
- unsupported claims
Return:
- score from 1 to 10
- two strengths
- two weaknesses
- one recommended revision
Example: Add a Review Loop
After each research step, the Researcher produces a candidate result. The Manager or Reviewer evaluates it against explicit criteria:
| Step | Clarity | Depth | Relevance | Evidence status | Action |
|---|---|---|---|---|---|
| 1 | 9 | 8 | 9 | Unverified | Keep as background; verify before publication |
| 2 | 8 | 7 | 9 | Needs sources | Revise with clearer tradeoffs |
| 3 | 9 | 8 | 8 | Unverified | Keep and add open questions |
The numerical scores are not proof that the work is correct. They are a lightweight mechanism for deciding whether another review is warranted.
Manager Agent
The current result is clear and well structured, but two improvements would make it stronger:
- Attach sources to factual claims when real search is available.
- Add a compact comparison of the major findings.
Then ask the Researcher to revise:
Researcher: Revise your previous answer using the Reviewer's feedback.
Preserve any useful content.
Mark any unverified claim as unverified.
This is stronger than asking the model to “improve itself.” The system now has a candidate, a critique, a revision, and a comparison point.
Step 6: Complete the Brief
After the research steps are complete, ask the Manager to assemble the result:
Manager: Produce the final brief.
Use the Knowledge Log and Open Questions.
Structure it as:
- executive summary
- major trends
- tradeoffs
- uncertainties
- recommended next research
Then introduce a final review:
Reviewer: Evaluate the final brief for clarity, balance, and usefulness.
Identify any claim that should be checked against a live source before publication.
Researcher Agent
The Researcher then produces a revised candidate incorporating those changes. The runtime or human operator can compare the revision with the previous version before accepting it.
At this point, you have built a small agentic workflow on your phone. It is not a production agent, but it has the shape of one:
roles
+
visible state
+
tool boundary
+
memory summary
+
reflection
+
human review
What You Just Created
The exercise maps directly to the architecture in Chapter 3:
| Agent trait | How you built it |
|---|---|
| Roles | Manager, Researcher, Reviewer |
| Tools | Declared available or simulated actions |
| Memory | Knowledge Log, Open Questions, Memory Summary |
| Steps | Manager plan and assigned research stages |
| Coordination | Handoffs between roles |
| Reflection | Reviewer critique and Researcher revision |
| Human control | You inspect, redirect, and decide what to trust |
The most important lesson is that agent architecture is not reserved for code. You can practice the design pattern in conversation. Code becomes important later when you need persistence, real tools, validation, permissions, scheduling, privacy, testing, or deployment. But the basic habit starts here:
Define the roles, expose the state, control the tools, inspect the output, and preserve what works.
That is how a chat becomes a small system, and how the reflection loop becomes something you can manage rather than merely repeat.