Claude API · Python · 51 reference templates
The anatomy
of an agent.
Fifty-one small, runnable Python templates — one file per concept — organized like a field reference for agentic AI. Start from a single API call, work up through memory, tools, and planning, and end at multi-agent systems. Every template is heavily commented and built to be read, not just run.
Fig. 1 — the core agentic loop, and where each Core Architecture piece attaches to it
↩ feeds back into REASON via
Memory/
· bounded every cycle by
Execution_Loops/
· checked at every step by
Safety_and_Control/
51Templates
10Concept modules
1API — Claude
0Framework dependencies
SETUPrun from repo root
# 1. install the one dependency pip install -r requirements.txt # 2. set your key — get one at platform.claude.com export ANTHROPIC_API_KEY=your-key-here # 3. run any template — start here python3 Core_Architecture/basics/basic.py