Build your own AI agent (Hard)

The runtime under a coding agent: a sandboxed workspace, exact edits, permissions, plans, budgets, rollback, helper agents and checked answers.

Claude Code, Codex, Cursor and Devin all run on a runtime like this: the model proposes actions, the runtime checks and executes them on a sandbox, and logs everything.

About 420 minutes across 10 stages. Skills: Sandboxing, Permissions, DAG plans, Budgets, Checkpoints, Multi-agent, Structured output.

The guides are part of licode Club.

Stages

  1. Write the run loop and its event log.
  2. Give the agent a sandboxed workspace.
  3. Edit files with exact, safe replacements.
  4. Enforce permissions with ALLOW and DENY globs.
  5. Check plans and run their steps in a safe order.
  6. Stop runs that go over a step or token budget.
  7. Save checkpoints and roll back to them.
  8. Let the agent hand work to a read-only helper.
  9. Check the final answer against a schema.
  10. Report actions, time and errors at the end.