"""Small Claude API starter for the AI Learning Coach workshop.

Before running:
1. Install the current Anthropic Python SDK.
2. Set ANTHROPIC_API_KEY in your environment.
3. Verify the current model ID in the official Claude documentation.
4. Optionally set CLAUDE_MODEL to that model ID.
"""

import os

from anthropic import Anthropic


client = Anthropic()  # Reads ANTHROPIC_API_KEY from the environment.
model = os.getenv("CLAUDE_MODEL", "claude-haiku-4-5-20251001")

message = client.messages.create(
    model=model,
    max_tokens=600,
    system=(
        "You are a supportive learning coach. Help students learn through "
        "explanation, practice, and feedback. Do not complete dishonest "
        "academic work. Ask for clarification when the learning goal is vague."
    ),
    messages=[
        {
            "role": "user",
            "content": (
                "I am a Python beginner. I have 30 minutes per day for one "
                "week. Create a practical study plan, one exercise, and three "
                "self-check questions."
            ),
        }
    ],
)

print(message.content[0].text)
