# Build an AI agent

> From a first working loop to a production stack.

- Canonical: https://starkslab.com/learn/build-an-ai-agent
- Notes: 6 · Updated: 2026-11-24

## Read in this order

1. [How to Build Your First AI Agent: A Beginner Tutorial That Actually Ships](https://starkslab.com/notes/build-first-ai-agent-tutorial.md): Build your first AI agent with a local runtime, one constrained tool, visible traces, stop conditions, and a practical production checklist. (Guide; 2026-03-10)
2. [How an AI Agent’s Basic Control Loop Runs in Python](https://starkslab.com/notes/ai-agent-basic-control-loop-python-source-trace.md): Inspect one execution of Federico Jan's Minimal Agent Framework at a pinned commit. Follow a local file read/write task from scripted model actions through tool validation, dispatch, state updates and final output; use trace events, deliberate halts and replay to build a worksheet readers can apply to another agent repository. (Guide; tested; 2026-10-14)
3. [Build an AI Agent Framework in Python: MAF Loop, Tools, Traces](https://starkslab.com/notes/build-lightweight-ai-agent-framework-python.md): Build an AI agent framework in Python with MAF's one-loop runtime, typed tool schemas, JSONL traces, real API battle tests, and honest failure modes. (Guide; tested; 2026-03-08)
4. [How to Build an AI Agent Beyond the Demo: The Production Stack](https://starkslab.com/notes/build-ai-agent-production-stack.md): A practical map of the production stack behind AI agents: runtime, tools, memory, workflows, observability, evals, guardrails, deployment gates, and control-plane boundaries. (Explainer; 2026-05-09)
5. [AI Agent Architecture: Build Factories, Not Fake Teams](https://starkslab.com/notes/ai-agent-architecture-build-agent-factories.md): Use this AI agent architecture page to choose factory-model queues, worker contracts, QA gates, and rework lanes before building an AI agent framework. (Explainer; 2026-04-26)
6. [Escape Velocity: Ship the Smallest Working System](https://starkslab.com/notes/escape-velocity-smallest-system.md): Acceleration comes from shipping the smallest working system, then compounding it with tight feedback loops. (Explainer; 2026-02-02)

## Tools in these notes

- [Minimal Agent Framework](https://starkslab.com/tools/minimal-agent-framework.md)

---

Starkslab index for agents: https://starkslab.com/llms.txt lists every page with its Markdown link.
