#412 · Primary category: Education & Research

agents-from-scratch

agent-architecture ai-agents ai-education ai-from-scratch artificial-intelligence llama llm local-llm machine-learning no-framework open-source-education prompt-engineering python

Build AI agents from first principles using a local LLM - no frameworks, no cloud APIs, no hidden reasoning.

Project last updated:07/25/26

GitHub Stars

971

Forks

244

Contributors

4

License

MIT

Why we included this project

Most agent tutorials hand you a framework and ask you to trust it. This one does the opposite: it builds a single agent from one local LLM call across 12 lessons, with every mechanism left visible in the code. You start with plain text in and text out and work gradually through system prompts, JSON output contracts, routing, tool definitions, the observe-decide-act loop, memory, planning, and lastly evals and telemetry. Because it all runs on a GGUF model you download yourself, there are no cloud calls or API keys obscuring the behavior, so each step stays traceable to explicit code. The companion complete_example.py keeps each lesson's function isolated, letting you adjust one concept at a time before wiring everything together. That makes it useful both for developers who want a mechanical grasp of agent internals and for educators looking for a clean teaching example.

Articles for this project

No articles for this project yet.

To suggest a topic or contribute an article, contact us.

Related projects in this category