11 AI Agents in Python with LangGraph: Free Source Code, Course and Prompt Guide
One free GitHub repository with 11 working AI agents, from a beginner SQL analyst to advanced multi-step agents with memory, guardrails and human approval, plus a 12-module LangGraph course and a prompt library to design your own agents.
Subscribe on YouTubeThe free 11 AI agents repository on GitHub gives you everything to learn and build AI agents in Python with LangGraph. It has runnable code for 11 business agents (SQL and CSV analysts, BI insights, customer support, HR screening, expense auditing, marketing content, legal review, healthcare intake, DevOps triage and an e-commerce recommender), a 12-module beginner course and a prompt guide with 11 agent specs. Every agent runs on a laptop with sample data; you only need Python 3.11+ and an Anthropic API key.
| What you get | 11 runnable agents, a 12-module LangGraph course and a prompt guide with 11 agent specs |
|---|---|
| Language and framework | Python 3.11+, LangGraph and LangChain |
| Model | Claude (default claude-sonnet-5) through the Anthropic API |
| Level | Beginner to advanced: complexity 1 → 3 |
| External services | None: databases, APIs and systems are replaced with local sample data |
| Price | Free and open on GitHub; you pay only for model usage |
Most AI agent tutorials stop at a chatbot that calls one tool. Real business agents need more: they must recover from errors, ask a human before risky actions, remember customers, process many documents in parallel and refuse unsafe requests. Learning all of that from scattered blog posts is slow.
That is why I put 11 complete agents in one place. Each one solves a real business problem and shows one important LangGraph pattern, and they are ordered from easy to advanced. You can read the spec, take the course, run the code and then change it for your own project or client.
In this guide
What is in the 11 AI agents repository?
The repository has three independent folders: agents_code with working Python code for all 11 agents, course with a 12-module beginner course on LangGraph, and guide with a master prompt template and 11 detailed agent specifications. Read the guide to design an agent, take the course to learn the framework, and run the code to see it working.
| Folder | What it is | Start here |
|---|---|---|
| agents_code/ | Working Python code for all 11 agents. Each folder has its own virtual environment, requirements.txt, sample data and README. | Run an agent |
| course/ | A 12-module LangGraph course for beginners, written slide-style with speaker notes, exercises and common mistakes. | Learn the framework |
| guide/ | A prompt library: a master template plus 11 complete agent specs (no code) you can hand to an LLM or a teammate. | Design your own agent |
- Runs on a laptop: databases, order systems, metrics and paging tools are replaced with local sample data
- Same structure everywhere: each agent.py has State, Tools, Nodes, Graph and CLI sections
- Free check before you spend:
python agent.py --graphprints the agent’s diagram without calling the model - Easy to customise: swap the functions in the Tools section for your real database or API
New to agents? Start with my explainer below, then read the official LangGraph documentation alongside the course.
- Three folders: runnable code, a course and a prompt guide.
- Everything runs locally with sample data.
- Test the setup for free with –graph.
Which 11 AI agents are included, and what does each one do?
The 11 agents are a SQL data analyst, a CSV/Excel analyst, a BI dashboard insights agent, a customer support agent, an HR resume screener, a finance expense auditor, a marketing content agent, a legal document reviewer, a healthcare intake agent, a DevOps incident triage agent and an e-commerce recommender. They are ordered by complexity from 1 to 3, and each one teaches a different LangGraph pattern.
| # | Agent | Domain | Level | Pattern you learn |
|---|---|---|---|---|
| 01 | SQL Data Analyst | Data analytics | ●○○ | Tool loop + SQL self-correction |
| 02 | CSV/Excel Data Analyst | Data analytics | ●○○ | File tools + structured output |
| 03 | BI Dashboard Insights | Data analytics | ●●○ | Multi-step reasoning + summariser |
| 04 | Customer Support | Customer service | ●○○ | Intent router + checkpointed chat |
| 05 | HR Resume Screener | HR | ●●○ | Parallel fan-out + reduce |
| 06 | Finance Expense Auditor | Finance | ●●○ | Rules + human approval (interrupt) |
| 07 | Marketing Content | Marketing | ●●○ | Generate → critique → revise |
| 08 | Legal Document Reviewer | Legal | ●●● | Chunking + fan-out + citation checks |
| 09 | Healthcare Intake | Healthcare | ●●● | Guardrails + PII scrub + escalation |
| 10 | DevOps Incident Triage | DevOps | ●●● | Parallel evidence + severity + approval gate |
| 11 | E-commerce Recommender | Retail | ●●● | Session memory + long-term Store |
What each agent does
- 01. SQL Data Analyst
- Turns a plain-English question into a read-only SQL query, runs it on SQLite, repairs the query if the database returns an error (up to 3 attempts) and explains the result.
- 02. CSV/Excel Data Analyst
- Answers questions about a CSV, Excel or Parquet file. The model writes one pandas expression, a sandboxed tool runs it, and you get a validated result with a summary, table and caveats.
- 03. BI Dashboard Insights
- Ranks the biggest metric changes in code, tests which dimensions explain them, computes confidence and writes a short executive summary.
- 04. Customer Support
- Classifies each message (order status, returns, tech help, billing), routes it to the right path and hands over to a human with a summary when needed.
- 05. HR Resume Screener
- Builds a scoring rubric from a job description, removes personal data before the model sees a resume, scores all candidates in parallel and writes a ranked report.
- 06. Finance Expense Auditor
- Checks expense reports against policy rules, finds duplicates, and pauses for a finance manager's approval; the pause is saved so you can resume later.
- 07. Marketing Content
- A writer drafts copy from a brief, checkers flag unsupported claims and banned words, an editor scores it, and the best-scoring draft wins.
- 08. Legal Document Reviewer
- Reviews a long contract against a checklist section by section, in parallel, and verifies every quoted citation against the original text.
- 09. Healthcare Intake
- Collects pre-visit information while removing personal data, screening for emergencies and blocking any diagnosis or treatment advice.
- 10. DevOps Incident Triage
- Gathers metrics, logs and recent changes in parallel, ranks causes, computes severity in code and proposes a runbook action that a human must approve.
- 11. E-commerce Recommender
- A shopping assistant that remembers preferences across visits, enforces budget and size rules in code and lets shoppers see or delete what it remembers.
In this live session I walk through all eleven agents and their code:
- 11 business agents across data, support, HR, finance, legal, health, DevOps and retail.
- Complexity rises from 1 to 3.
- Each agent teaches one key LangGraph pattern.
How do you run your first AI agent from the repository?
Install Python 3.11 or newer, clone the repository, open one agent folder, create a virtual environment, install requirements.txt, copy .env.example to .env and paste your Anthropic API key, then run python agent.py. Run python agent.py –graph first to check your setup without spending API credits.
- Install Python 3.11+ and a code editor; my VS Code guide shows the setup.
- Get an API key from the Anthropic Console.
- Clone the repository (or download the ZIP from GitHub).
- Set up one agent with the commands below, starting with
01_sql_data_analyst.
git clone https://github.com/AammarTufail/eleven_ai_agents_for_begineers_to_advance_level_developers.git cd eleven_ai_agents_for_begineers_to_advance_level_developers/agents_code/01_sql_data_analyst python3 -m venv .venv source .venv/bin/activate python -m pip install --upgrade pip pip install -r requirements.txt cp .env.example .env # then open .env and paste your ANTHROPIC_API_KEY python agent.py --graph # free check: prints the graph, no model call python agent.py "Which 5 products had the highest revenue in the last 30 days?"
cd agents_code\01_sql_data_analyst python -m venv .venv .\.venv\Scripts\Activate.ps1 python -m pip install --upgrade pip pip install -r requirements.txt copy .env.example .env # then edit .env and paste your API key python agent.py
Set-ExecutionPolicy -Scope CurrentUser RemoteSigned once, then try again. To leave the environment, type deactivate.claude-sonnet-5. You can change the MODEL line in .env, but newer Claude models such as Sonnet 5.5 and Opus 5.5 changed some tool-calling rules, so test an agent after you switch. Keep your API key in .env and never commit it to GitHub.Never used Git before? My git and GitHub crash course explains cloning, commits and pushing in Urdu/Hindi.
- One folder, one virtual environment, one .env file.
- Use –graph to test for free.
- Change MODEL carefully and test after switching.
How do you learn LangGraph with the free 12-module course?
The course folder takes you from ‘what is an agent?’ to shipping a multi-step agent in 12 modules of 30 to 45 minutes each. You learn state, nodes and edges, tools, routing, memory and checkpointing, human-in-the-loop approval, multi-agent patterns, streaming, guardrails and deployment, and finish with case studies of four agents from the repository.
- Module 00Setup & mental model
- Module 01Why LangGraph
- Module 02Your first graph
- Module 03State schemas
- Module 04Tools
| Module | Topic | Module | Topic |
|---|---|---|---|
| 00 | Setup & mental model | 06 | Memory & checkpointing |
| 01 | Why LangGraph | 07 | Human-in-the-loop |
| 02 | Your first graph | 08 | Multi-agent patterns |
| 03 | State schemas | 09 | Streaming & observability |
| 04 | Tools | 10 | Guardrails & deployment |
| 05 | Conditional edges & routing | 11 | Capstone case studies |
Each module is written like slides, with at most six bullets per slide, speaker notes, short code snippets, a recap, a 10–15 minute exercise and a list of common mistakes. Open the course folder and start with module 00. If you prefer video, this live session builds a LangGraph agent from scratch:
Agents are built on large language models, so it helps to know how they work and how to prompt them. Read my prompt engineering guide and the NLP with Hugging Face guide for the foundations.
- 12 modules, 30–45 minutes each, with exercises.
- Concepts build strictly in order.
- Ends with case studies of real agents from the repository.
How do you design your own AI agent with the prompt guide?
Open the master prompt template in the guide folder, fill in the placeholders (agent name, domain, user, LangGraph pattern, hard constraints, tools and tone), and paste it into an LLM such as Claude. You get a complete, implementation-ready agent specification with the same 11 sections as the example specs, which you or Claude Code can then turn into code.
- Pick the closest pattern, not the closest domain: a router, a fan-out, a critique loop, human approval or memory.
- Fill the master template: agent name, domain, primary user, pattern, hard constraints, tools and data, and tone.
- Generate the spec with an LLM; it follows the same 11 sections as the example agents.
- Compare it with the most similar example spec in
guide/agents/. - Build it by hand or with Claude Code, using the matching agent in
agents_code/as a starting point.
Example: filled-in master template fields
Agent name: Clinic Appointment Assistant Domain: Healthcare (small private clinic) Primary user: Patients booking or changing appointments on WhatsApp Core LangGraph pattern to showcase: router + human-in-the-loop Hard constraints: no medical advice, no PII sent to the model unscrubbed, staff approve every cancellation Available tools / data sources: appointment calendar (read/write), clinic FAQ, staff notification Tone / persona: warm, short, professional; English and Urdu
The full template, with an adaptation checklist, is in guide/00_master_prompt_template.md. To build the spec into an app faster, see how I use Claude Code in my Claude Code guide.
- Choose by pattern, not domain.
- The master template produces a full 11-section spec.
- Use the matching runnable agent as your starting code.
What is the best learning path through the 11 agents?
Start with the complexity-1 agents (SQL analyst, CSV analyst and customer support) to learn tools, structured output and routing. Move to complexity 2 (BI insights, HR screener, expense auditor, marketing content) for multi-step reasoning, parallel fan-out, human approval and critique loops. Finish with complexity 3 (legal reviewer, healthcare intake, DevOps triage, e-commerce recommender) for chunking, guardrails, orchestration and long-term memory.
- Week 1Foundations. Course modules 00–04, then run agents 01 and 02.
- Week 2Routing and memory. Modules 05–07, then agents 04 and 06.
- Week 3Parallel and multi-agent. Modules 08–09, then agents 03, 05 and 07.
- Week 4Production patterns. Modules 10–11, then agents 08–11, and build your own agent with the prompt guide.
Once you are comfortable, see how several agents work together in a real product, and study five more agents with source code:
For even more examples, the companion repository top five AI agents for research and my free book Five Research AI Agents explain research-focused agents step by step.
- Follow the complexity levels 1 → 2 → 3.
- Pair each week of the course with matching agents.
- Finish by designing your own agent.
How do you turn these agents into real projects or client work?
Replace the sample data in each agent’s Tools section with real systems, add a simple interface such as Streamlit or a chat widget, keep the human approval steps, test on real examples, and deploy the agent on a server. The 11 agents map directly to services businesses pay for: data analysis, customer support, HR screening, document review and recommendations.
| Agent | Real-world project idea | Who pays for it |
|---|---|---|
| SQL / CSV analyst | Ask-your-data assistant for a company database or spreadsheets | Startups, managers, analysts |
| Customer support | Website or WhatsApp support bot with handover to staff | E-commerce, SaaS, service businesses |
| HR resume screener | CV ranking and shortlist reports | Recruiters, HR teams |
| Finance expense auditor | Expense and invoice checks with manager approval | Accounting firms, finance teams |
| Marketing content | Brand-safe content studio for posts and ads | Agencies, creators, brands |
| Legal document reviewer | Contract checklist review with verified citations | Law firms, procurement teams |
| E-commerce recommender | Personal shopping assistant with memory | Online shops |
- Connect real data through the Tools section, and give each tool only the permissions it needs
- Keep humans in the loop for payments, emails, cancellations and anything risky
- Protect personal data: reuse the PII-scrubbing ideas from agents 05 and 09
- Test before launch with real questions, and log what the agent does
To deploy an agent on your own domain with HTTPS, follow my guide to deploying AI agents on a Hostinger VPS, or package it with Docker. For agents that answer from documents, add retrieval with my RAG tutorial in Python. And to sell these as services, read freelancing with AI and AI agents in the global market.
- AI, LLMs, RAG and what makes AI agentic
- LangGraph, tools, memory and human-in-the-loop
- Claude Code and agentic AI for real projects
- Deploying agents on your own server
- Swap sample data for real systems in the Tools section.
- Keep approvals, guardrails and testing.
- Deploy on a VPS or with Docker, then sell as a service.
All 10 videos: AI agents and LangGraph
- 1
- 2Day-13: Eleven AI Agents Built with LangGraph (Source Code)Live session · 33:37
- 3
- 4Day-11: Build an AI Agent A-Z with Python & LangGraphLive session · 1:16:50
- 5Day-10: How to Build an AI Agent in Python & Claude CodeLive session · 1:07:20
- 6Day-14: 4 AI Agents Team Integrated in Datajin AppLive session · 39:39
- 7Day-17: Top 5 AI Agents Built in Python (Source Code & Materials)Live session · 30:04
- 8Day-18: AI Agent Development to Deployment A-Z (Live Example)Live session · 1:02:47
- 9Day 12: AI Agent Ideas to Earn Millions | Era of Agentic AILive session · 21:45
- 10LLMs & Agentic AI Masterclass: RAG, Skills, MCP & Loop EngineeringLive session · 1:13:35
No videos match. Try another word.
Links and tools
- 111 AI agents repository (GitHub)Source code, course and prompt guide
- 2agents_code folderRunnable code for all 11 agents
- 3course folderThe 12-module LangGraph course
- 4guide folderMaster prompt template and 11 specs
- 5LangGraph documentationOfficial docs for the framework
- 6Anthropic ConsoleCreate your API key
- 7Claude models overviewCurrent Claude models and prices
- 8Top five AI agents for researchMore agents with source code
Related guides on Codanics
- 1Python ka Chilla: Build AI AgentsThe course behind these agents
- 2RAG tutorial in PythonAdd document search to your agents
- 3Deploy AI agents on a VPSPut your agent online with HTTPS
- 4Freelancing with AI and AI agentsSell agent projects to global clients
- 5Claude Code for content creationBuild faster with Claude Code
- 6Five Research AI Agents (free book)Research agents explained with code
- 7Prompt engineering guideWrite better system prompts
- 8NLP with Hugging FaceLanguage model foundations
- 9Docker for AI developersPackage agents for deployment
- 10Pandas mastery guideData skills behind the analyst agents
- 11VS Code as your IDESet up your editor
- 12Free AI & data science roadmapWhere to start if you are new
More AI, data science and career guides on the Codanics blog.
Key terms explained
- AI agent
- A program where a language model decides the next step and uses tools, such as a database query or a search, to finish a task.
- LangGraph
- An open-source Python library for building agents as graphs of steps (nodes) connected by edges, with state, memory and human approval.
- State
- The shared data the graph passes from step to step, such as messages, results and counters.
- Node
- One step in a LangGraph graph, usually a Python function that reads and updates the state.
- Conditional edge
- A connection that chooses the next node based on the state, for example routing by intent.
- Tool calling
- Letting the model call Python functions you define and use their results.
- Checkpointer
- Saves the graph's state so a conversation or paused workflow can continue later.
- interrupt()
- A LangGraph function that pauses a graph for human input or approval; you resume it with Command(resume=…).
- Send (fan-out)
- A LangGraph feature that runs the same node many times in parallel, for example once per resume.
- Store
- LangGraph's long-term memory that survives across sessions, such as a shopper's preferences.
- Guardrail
- A rule in code that blocks unsafe input or output, such as personal data or medical advice.
- PII
- Personally identifiable information, such as names, phone numbers and addresses.
Frequently asked questions
What is in the 11 AI agents GitHub repository?
Three parts: runnable Python code for 11 LangGraph agents (each with its own requirements, sample data and README), a 12-module beginner course on LangGraph, and a prompt guide with a master template and 11 written agent specifications. It is free on GitHub.
Do I need experience with LangGraph to use these agents?
No. If you know basic Python (functions, lists, dictionaries), start with the course in the course folder, then run agents 01, 02 and 04, which are marked complexity 1. The agents get harder step by step up to complexity 3.
What do I need to run the agents?
Python 3.11 or newer, an Anthropic API key from the Claude Console, and internet access for the model calls. Each agent has its own virtual environment and requirements.txt. All databases and external systems are replaced with local sample data, so everything runs on a laptop.
Can I test an agent without spending API credits?
Yes. Run python agent.py –graph inside any agent folder. It builds the graph and prints its diagram without calling the model, so you can check that your setup works before you use your API key.
Which AI model do the agents use?
The default is Claude Sonnet 5 (claude-sonnet-5), set through the MODEL variable in the .env file. You can try another Claude model there, but newer models such as Claude Sonnet 5.5 and Opus 5.5 changed some tool-calling rules, so test an agent after switching.
Can I use these agents with my own data?
Yes. Every agent.py has a clearly marked Tools section. Replace the sample functions there with your real database, API or files. For example, the SQL agent accepts your own SQLite database through the DB_PATH variable.
Which agent should I start with?
Start with the SQL Data Analyst (01) to learn the tool loop, then the Customer Support agent (04) to learn routing and memory. After that, try the HR Resume Screener (05) for parallel processing and the Finance Expense Auditor (06) for human approval.
Can I use these agents for freelancing or client projects?
They are a strong base for portfolio demos and client prototypes: support bots, data analysts, document reviewers and recommenders are all in demand. Add the client's real data, test carefully, keep a human approval step and deploy them securely.
Is LangGraph free?
Yes, LangGraph is an open-source Python library. You only pay for the language model you call, such as Claude through the Anthropic API.
No questions match. Try another word.
About the author. Dr. Muhammad Aammar Tufail is the founder of Codanics and completed his PhD in a Marie Skłodowska-Curie programme. He teaches Python, AI agents, NLP, data science and bioinformatics in Urdu and Hindi, and builds AI products such as the Datajin data analytics app.
Follow him on Facebook, Instagram, TikTok and LinkedIn, and see his code on GitHub.
Requirements and defaults are taken from the repository’s README files. Libraries and models change; check the repository and the official documentation if something behaves differently.









