π¦ Twelve Factor Agents
Learn how to build production-ready AI agents using the twelve-factor methodology. We'll cover the core concepts and build a real agent from scratch.
Project Details
Open in GitHubBuilding a 12 Factor Agent
In this episode, we dove deep on the theory behind 12 factor agents, before getting hands on and building one from scratch
For a full deep dive of the concepts and visuals, check out 12-factor-agents
How to use this code
There are a few ways to use the code in this folder, the final result is in final/
and the step by step walkthrough is in step-by-step/
.
.
βββ README.md
βββ final
βΒ Β βββ baml_src
βΒ Β βΒ Β βββ agent.baml
βΒ Β βΒ Β βββ ...
βΒ Β βββ src
βΒ Β βΒ Β βββ agent.ts
βΒ Β βΒ Β βββ ...
βΒ Β βββ package-lock.json
βΒ Β βββ package.json
βΒ Β βββ tsconfig.json
βββ step-by-step
βββ walkthrough
βΒ Β βββ 00-index.ts
βΒ Β βββ 01-agent.baml
βΒ Β βββ 01-agent.ts
βΒ Β βββ ...more files...
βΒ Β βββ 10-server.ts
βββ package-lock.json
βββ package.json
βββ tsconfig.json
βββ walkthrough.md
final results
if you just want to run the final result of all our coding, use the code in final/
cd final
npm install
use the cli with
npx tsx src/index.ts 'hello world'
or run the server with
npx tsx src/server.ts
step by step walkthrough
if you want to walk through the code step by step, use the code in step-by-step/
cd step-by-step
npm install
then follow the steps in step-by-step/walkthrough.md one by one