Summary of Today’s Gen AI Classroom: One Prompt, Many Personas – System Prompts and the Tutor Agent (30 Sep 2026)

We started building a real agent today. Before the code, one idea that does most of the work: the system prompt.

1. What a System Prompt Is

The constant context you give the model: its role, tone and rules. The user’s questions change with every turn; the system prompt doesn’t.

The practical lesson: when an agent misbehaves, fix the system prompt before you touch the code. It’s faster, cheaper and usually the actual problem.

2. Same Idea Everywhere

We drove the point home with the same trick on three platforms:

  • Claude: tutor styles
  • OpenAI Playground: a professional, calm customer-care agent for a food-delivery app
  • Google AI Studio (Gemini Flash): thinking levels, and a deliberately sarcastic persona

Identical question, wildly different answers. Nothing changed but the system prompt. The sarcastic-aunt persona was the joke, but it makes the point better than a polite one would: the model has no fixed personality of its own.

3. Today’s Build: The Tutor Agent

An agent that adapts its teaching style to what the learner needs:

ModeFor
Detailed explanationLearning a topic from scratch
Quick revisionPrepping for an exam or interview
Explain like I’m 10No background knowledge at all

One agent, three system prompts. That’s the whole design.

4. query or client?

  • query — no memory needed. One question, one answer. We’re using this today.
  • ClaudeSDKClient — use it when the conversation has to remember earlier turns.

Start with query. Add the client only when you actually need continuity.

5. Setting the System Prompt in Code

from claude_agent_sdk import query, ClaudeAgentOptions

options = ClaudeAgentOptions(
    system_prompt=(
        "You are a patient tutor. Explain concepts to a complete beginner, "
        "using simple language and one concrete example."
    ),
    max_turns=1,
)

async for message in query(prompt="What is an API?", options=options):
    print(message)

Change the string, change the agent. No other code moves.

6. Project Setup

mkdir claude_demo_agents
cd claude_demo_agents
uv init .
uv add claude-agent-sdk python-dotenv ipykernel
code .

Then create a tutor/ folder with exercise1_message_exchange.py, and copy your .env in at the project root.

  • ipykernel is what lets you run notebooks in this project.
  • Every project gets its own dependencies. Installing system software (via apt or brew) is not the same as adding a library. Project-level isolation is what stops one project breaking another.
  • Select the right interpreter in VS Code: Command Palette (Ctrl+Shift+P, or Cmd+Shift+P on Mac) → Python: Select Interpreter → pick the one inside this project’s .venv. Wrong interpreter is the most common cause of “but I installed it!”
  • Keep your key in .env, load it with load_dotenv() and os.getenv, and drive the script from if __name__ == "__main__":.

7. API Keys

  • A Claude API key is needed for these exercises. About $5 (₹500) is enough to work through them.
  • No key yet? Gemini has a free tier via Google AI Studio and the concepts are identical, though the class code will be Claude-specific.

✅ Action Items

  1. Install uv if you haven’t, then set up the project exactly as above.
  2. Get your Claude API key loaded from .env.
  3. Write the three tutor system prompts and run the same question through each. Notice how much the answer changes.
  4. New students: watch the previous four recordings to get your environment ready before the next session.

⏭️ Next up: message streams and options, then giving the tutor agent memory.

By continuous learner

enthusiastic technology learner

1 comment

Leave a Reply

Discover more from Direct AI Powered By Quality Thought

Subscribe now to keep reading and get access to the full archive.

Continue reading