How AI Agents Work
Goals, tools, loops and limits: how agents act, and how to keep them safe.
- Suits
- Learners who know how chatbots generate text (Stage B) and want to understand AI tools that take actions.
- Before this
- Where it fits
- Level 3, Maker (13+): Work like a developer: real React projects with tests in the Maker Studio, a real repo, branches, pull requests and code review, plus safety habits for keys, secrets and dependencies. This course is in Under the hood: The concepts and tools behind an app: files, front end and back end, data, APIs, Git, hosting and deployment.
What you'll be able to do
- Describe the agent loop: goal, plan, act, observe, repeat.
- Inspect what an agent can access and choose least-privilege permissions and approvals.
- Explain prompt injection (OWASP LLM01) and excessive agency (OWASP LLM06) with examples.
- Evaluate an agent with test tasks, result checks, logs and stop controls.
Lessons
1. What is an AI agent?
20 minAn agent is a model in a loop with tools: goal, plan, act, observe.
2. Tools, permissions and approvals
25 minInspect what an agent can access, use approvals for risky actions, and apply least privilege.
3. Prompt injection and excessive agency
25 minHow hidden instructions in content can redirect agents (OWASP LLM01), and why too much power makes it worse (LLM06).
4. Evaluating agents
20 minTest tasks, checking results, reading logs, and limits and stop buttons.
How it's assessed
- Explains the agent loop using a real or made-up log.
- Chooses least-privilege permissions and approvals for a described agent.
- Identifies a prompt injection attempt and names layered defences.
- Evaluates an agent log for accuracy, scope and honesty.
To complete the course
- Pass all four lesson checks (70% or more).
- Complete the permission inspector activity.
Notes for parents, guardians and teachers
- All agent activities run inside Amphicode's sandbox. Learners do not install or sign up for any agent product, and never hold API keys.
- Prompt-injection examples are harmless and fictional. Learners are told never to test attacks on real services.
What comes next
- G2: Building Agents in the Sandbox · Design tools, run the agent loop, and add approvals, limits and a stop button, all inside Amphicode's sandbox.
- G3: The Agent Landscape · What real AI agents exist, what they can do, who makes them, and how their safety designs compare.
A parent, guardian or teacher creates the account. A short placement check suggests where each learner starts.