11 AI Agents in Python with LangGraph: Free Source Code and Course

11 AI agents in Python with LangGraph: free source code, a 12-module course and a prompt guide on GitHub
AI agents · LangGraph · Python · Free source code

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 YouTube
The short answer

The 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.

11runnable AI agents with sample data
12course modules from zero to deployment
10+LangGraph patterns you will learn
0external services needed to run them
★Get the free source code on GitHubClone or download the repository, star it to save it, and follow the steps below to run your first agent in about 10 minutes.Open the repository
Key facts: the 11 AI agents repository
What you get11 runnable agents, a 12-module LangGraph course and a prompt guide with 11 agent specs
Language and frameworkPython 3.11+, LangGraph and LangChain
ModelClaude (default claude-sonnet-5) through the Anthropic API
LevelBeginner to advanced: complexity 1 → 3
External servicesNone: databases, APIs and systems are replaced with local sample data
PriceFree and open on GitHub; you pay only for model usage
Want to build these agents with live guidance?These agents come from Python ka Chilla: Build AI Agents, my course where we build, deploy and sell AI agents step by step in Urdu/Hindi.
Explore the course →

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.

Short · 1:36
11 AI Agents with Source Code Using Python and LangGraph Available on This GitHub Repo
11 AI Agents with Source Code Using Python and LangGraph Available on This GitHub Repo. A 90-second tour of the repository.
Section 1

What is in the 11 AI agents repository?

Quick answer

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.

FolderWhat it isStart 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 --graph prints 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.

Tutorial · 16:40
AI Agents Explained: Real-World Use Cases & Future (Urdu/Hindi) | 2026 Guide
AI Agents Explained: Real-World Use Cases & Future (Urdu/Hindi) | 2026 Guide. What AI agents are and where businesses use them.
Key takeaways
  • Three folders: runnable code, a course and a prompt guide.
  • Everything runs locally with sample data.
  • Test the setup for free with –graph.

↑ Back to topNext: The 11 AI agents at a glance →

Section 2

Which 11 AI agents are included, and what does each one do?

Quick answer

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.

#AgentDomainLevelPattern you learn
01SQL Data AnalystData analytics●○○Tool loop + SQL self-correction
02CSV/Excel Data AnalystData analytics●○○File tools + structured output
03BI Dashboard InsightsData analytics●●○Multi-step reasoning + summariser
04Customer SupportCustomer service●○○Intent router + checkpointed chat
05HR Resume ScreenerHR●●○Parallel fan-out + reduce
06Finance Expense AuditorFinance●●○Rules + human approval (interrupt)
07Marketing ContentMarketing●●○Generate → critique → revise
08Legal Document ReviewerLegal●●●Chunking + fan-out + citation checks
09Healthcare IntakeHealthcare●●●Guardrails + PII scrub + escalation
10DevOps Incident TriageDevOps●●●Parallel evidence + severity + approval gate
11E-commerce RecommenderRetail●●●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:

Live session · 33:37
Day-13: Eleven AI Agents Built with LangGraph (Source Code)
Day-13: Eleven AI Agents Built with LangGraph (Source Code). All eleven agents explained, with the source code.
Key takeaways
  • 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.

↑ Back to topNext: Run your first agent →

Section 3

How do you run your first AI agent from the repository?

Quick answer

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.

  1. Install Python 3.11+ and a code editor; my VS Code guide shows the setup.
  2. Get an API key from the Anthropic Console.
  3. Clone the repository (or download the ZIP from GitHub).
  4. Set up one agent with the commands below, starting with 01_sql_data_analyst.
macOS / Linux
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?"
Windows (PowerShell)
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
PowerShell blocks the activate script? Run Set-ExecutionPolicy -Scope CurrentUser RemoteSigned once, then try again. To leave the environment, type deactivate.
About models: the agents default to 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.

Key takeaways
  • One folder, one virtual environment, one .env file.
  • Use –graph to test for free.
  • Change MODEL carefully and test after switching.

↑ Back to topNext: Learn LangGraph with the course →

Section 4

How do you learn LangGraph with the free 12-module course?

Quick answer

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.

  1. Module 00Setup & mental model
  2. Module 01Why LangGraph
  3. Module 02Your first graph
  4. Module 03State schemas
  5. Module 04Tools
ModuleTopicModuleTopic
00Setup & mental model06Memory & checkpointing
01Why LangGraph07Human-in-the-loop
02Your first graph08Multi-agent patterns
03State schemas09Streaming & observability
04Tools10Guardrails & deployment
05Conditional edges & routing11Capstone 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:

Live session · 1:16:50
Day-11: Build an AI Agent A-Z with Python & LangGraph
Day-11: Build an AI Agent A-Z with Python & LangGraph. Build a LangGraph agent from zero.
Live session · 1:07:20
Day-10: How to Build an AI Agent in Python & Claude Code
Day-10: How to Build an AI Agent in Python & Claude Code. Build an agent in Python with Claude Code.

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.

Key takeaways
  • 12 modules, 30–45 minutes each, with exercises.
  • Concepts build strictly in order.
  • Ends with case studies of real agents from the repository.

↑ Back to topNext: Design your own agent with the prompt guide →

Section 5

How do you design your own AI agent with the prompt guide?

Quick answer

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.

  1. Pick the closest pattern, not the closest domain: a router, a fan-out, a critique loop, human approval or memory.
  2. Fill the master template: agent name, domain, primary user, pattern, hard constraints, tools and data, and tone.
  3. Generate the spec with an LLM; it follows the same 11 sections as the example agents.
  4. Compare it with the most similar example spec in guide/agents/.
  5. 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.

Key takeaways
  • Choose by pattern, not domain.
  • The master template produces a full 11-section spec.
  • Use the matching runnable agent as your starting code.

↑ Back to topNext: A learning path: beginner to advanced →

Section 6

What is the best learning path through the 11 agents?

Quick answer

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.

Level 1 · Beginner01 SQL · 02 CSV/Excel · 04 SupportTool calling and self-correction, structured output, and routing by intent with chat memory.
Level 2 · Intermediate03 BI · 05 HR · 06 Finance · 07 MarketingMulti-step reasoning, parallel fan-out with Send, human approval with interrupt, and generate-critique-revise loops.
Level 3 · Advanced08 Legal · 09 Health · 10 DevOps · 11 RetailLong-document chunking with citation checks, fail-closed guardrails, parallel evidence gathering and memory across sessions.
  1. Week 1Foundations. Course modules 00–04, then run agents 01 and 02.
  2. Week 2Routing and memory. Modules 05–07, then agents 04 and 06.
  3. Week 3Parallel and multi-agent. Modules 08–09, then agents 03, 05 and 07.
  4. 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:

Live session · 39:39
Day-14: 4 AI Agents Team Integrated in Datajin App
Day-14: 4 AI Agents Team Integrated in Datajin App. Four agents working as a team in a real product.
Live session · 30:04
Day-17: Top 5 AI Agents Built in Python (Source Code & Materials)
Day-17: Top 5 AI Agents Built in Python (Source Code & Materials). Five more Python 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.

Key takeaways
  • Follow the complexity levels 1 → 2 → 3.
  • Pair each week of the course with matching agents.
  • Finish by designing your own agent.

↑ Back to topNext: Turn the agents into real projects →

Section 7

How do you turn these agents into real projects or client work?

Quick answer

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.

AgentReal-world project ideaWho pays for it
SQL / CSV analystAsk-your-data assistant for a company database or spreadsheetsStartups, managers, analysts
Customer supportWebsite or WhatsApp support bot with handover to staffE-commerce, SaaS, service businesses
HR resume screenerCV ranking and shortlist reportsRecruiters, HR teams
Finance expense auditorExpense and invoice checks with manager approvalAccounting firms, finance teams
Marketing contentBrand-safe content studio for posts and adsAgencies, creators, brands
Legal document reviewerContract checklist review with verified citationsLaw firms, procurement teams
E-commerce recommenderPersonal shopping assistant with memoryOnline 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.

Live session · 1:02:47
Day-18: AI Agent Development to Deployment A-Z (Live Example)
Day-18: AI Agent Development to Deployment A-Z (Live Example). Take an agent from code to a live server.
Live session · 21:45
Day 12: AI Agent Ideas to Earn Millions | Era of Agentic AI
Day 12: AI Agent Ideas to Earn Millions | Era of Agentic AI. Business ideas for the agents you build.
Build, deploy and sell AI agents with usPython ka Chilla: Build AI Agents takes you from Python basics to LangGraph, RAG, MCP, Claude Code and deployment, with live classes, a Discord community and real projects.
  • 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
Join Python ka Chilla →
Key takeaways
  • 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

Every lesson used in this guide, in Urdu/Hindi. Visit the Codanics YouTube channel

Links and tools

Related guides on Codanics

More AI, data science and career guides on the Codanics blog.

Codanics on YouTubeAI agents, LangGraph, Python and data science, in Urdu and Hindi.
Subscribe

Key terms explained

Short definitions of the words used in this guide

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.

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.

Leave a Reply

Your email address will not be published. Required fields are marked *