Free & open · no paywall, ever

IntegrAuth Academy

Identity, security and practical AI — free, from zero. Byte-sized lessons, real diagrams, hands-on labs, zero fluff. Two programs, each with its own exam and certificate.

20 tracks 241 lessons 242 hands-on labs 230+ diagrams 100% free

English is hard? Your browser can translate this page into Tamil, Telugu, Kannada, Malayalam or Hindi. Tech words stay in English so you learn the real names.

How?
  • Chrome on phone: ⋮ menu → Translate
  • Chrome on computer: right-click → Translate to …
  • Edge: the translate icon in the address bar
Practical AI Track 2 · Working with AI
0/75 lessons read
WORKING WITH AI · LESSON 9

Agents, subagents and skills

Priya asks Kai, the team's AI agent, why checkout errors went up. Kai decides what to read. Your goal: see how an agent works, and when it should stop.

🧪 Interactive lab — enable JavaScript to play with this one.

Goalfrom Priya1 · Think2 · Actcall a tool3 · Observeresult into contextDone: goal metand checked (tests pass)Stop: limit reachedsteps · tokens · time · stuckPause: ask a humanbefore a risky action
Think, act, observe, repeat. The exits keep it safe.
Key points
  • An agent picks its own next step, in a loop.
  • It needs exits: a real check, limits, and a person before risky steps.
  • A subagent does a big, messy job and returns a summary.
  • A skill loads only when a task needs it.

Chatbot, workflow or agent?

Who picks the next step? A chatbot answers one question. An AI agent picks each step itself. It is like a cook who tastes the soup, adds salt, and tastes again. Treat an agent like a new intern. You give it a task and clear limits, and you check its work. Agents do more, but are harder to predict. Start simple. Fixed steps? Use a workflow (Automations and agent builders).

When to stop

  • A real check that the goal is met, like a passing test. The agent saying "done" is not a check.
  • Limits on steps, tokens, money and time.
  • Stuck? The same action failed 3 times in a row? Stop and report.
  • Ask a person before deleting data, spending money or sending email.

Subagents and skills

Thousands of log lines would fill Kai's context window. A log is the written record of what a program did. So a subagent, a helper with its own empty context, reads them. It sends back only a summary.

An agent skill is a folder of know-how, like the steps for release notes. The agent first sees only each skill's name and description. It loads the full steps when a task matches.

Now pick the right skill for each task.

🧪 Interactive lab — enable JavaScript to play with this one.

Go deeper: the loop

An agent is a model that makes tool calls in a loop. Normal code runs around it.

  1. Think. Look at the goal and all results so far. Pick the next step.
  2. Act. Call a tool. For example, search the logs or run the tests.
  3. Observe. The tool's result is added to the context.
  4. Repeat until the goal is met or a limit says stop.

Each turn sends the whole, growing context again. So long runs can cost a lot. Mistakes also add up. A wrong guess in step 2 can steer steps 3 to 20.

Anthropic's guide Building effective agents (December 2024) made this idea popular. Its advice: give an agent freedom only when fixed steps can't do the job.

Go deeper: subagents

A subagent knows nothing about your chat so far. So it needs a full brief: what to read, what to look for, and what to send back. It often gets its own instructions and fewer tools, too.

Handing off work has a price. The summary can leave out a detail that turns out to matter. The total tokens across all agents usually go up, not down. You pay for the helper's reading, plus the brief and the summary. So hand off big, messy jobs that stand on their own. Do small jobs yourself.

On Kai's first try, it read three days of logs itself. Its context got so full that it lost an error code it had found. On the second try, a subagent read the logs and sent back five lines. Kai read only the two files they pointed to. Then it wrote one test that showed the bug, and stopped.

Go deeper: skills

A skill folder has a SKILL.md file. It holds a short name, a description and the full steps. It can also hold scripts, templates or other files.

The skill loads in stages. This is called progressive disclosure. At the start, the agent loads only each skill's name and description. The full steps load only when a task matches. Scripts run only when needed. So an agent can have dozens of skills and pay for almost none of them.

Anthropic made the Agent Skills format and shared it as an open standard. As of October 2026, many tools support it, like Claude Code, OpenAI's Codex, Gemini CLI, GitHub Copilot and Cursor.

  • Tool: a way to act, like "run the tests."
  • MCP server: a standard way to plug in tools from outside (MCP).
  • Skill: know-how, like "how we do releases."
  • Subagent: an extra worker with its own context.
Go deeper: many agents

A common setup is a lead agent with workers. This is called orchestrator-workers. The lead splits the job and gives each worker a part. Workers often run at the same time. Then the lead checks and joins the results. In another setup, one agent writes and a second one reviews. They repeat until the work passes. This is evaluator-optimizer.

Both can beat one agent on big jobs that split well. But both cost more, and more things can go wrong. Agents from different companies can also hand work to each other. Then ask whose authority each one has (agent-to-agent). Each agent also needs its own identity (AI agents and MCP).

Watch out

A log line or a web page can hide orders for the agent (prompt injection). Give agents only the tools they need. Skills can run scripts, so install them only from sources you trust.

🧪 Try it free

Write a skill for one task you do often. Use the Agent Skills quickstart. Compare results with and without it.