ai-agent

agent-lightning

The absolute trainer to light up AI agents.
18,872 stars1,701 forksPythonUpdated 11/2/2026100% free · open source
What it does

Agent‑Lightning lets you quickly prototype, train, and evaluate autonomous LLM‑based agents with a few CLI commands.

When to use it
  • •You need a self‑contained way to turn a prompt‑based workflow into a loop‑back agent that can call tools and persist state.
  • •You want to benchmark different prompting strategies (react‑loop, tool‑use, memory) without writing custom RL code.
  • •Your startup is building a customer‑support bot that must plan, execute, and self‑correct on real‑time data.
Ready-to-paste prompt
agent-lightning run --config examples/travel_agent.yaml --input "Schedule a 2‑hour video call with the product team tomorrow at 10 AM PST and add it to my Google Calendar."
Heads up: The CLI validates the presence of an LLM API key at runtime; if `OPENAI_API_KEY` (or `AZURE_OPENAI_ENDPOINT`/`AZURE_OPENAI_KEY`) is missing the command exits with a cryptic error. Set the env var before the first run.
Saves to your device
Use with Claude
New

Skip the builder — one click puts this in Claude, Cursor, Antigravity and more.

🔑 Needs an API key

Works after you add credentials — the setup agent will ask you for them.

Try it instantly — no install
Claude Code
mkdir -p ~/.claude/skills/agent-lightning && curl -fsSL https://workflowstacks.com/api/skills/agent-lightning/claude-skill -o ~/.claude/skills/agent-lightning/SKILL.md
Open in another AI app

Opens the app with this repo with the prompt ready to go — no copy-paste needed.

Connect the whole catalog (MCP)
claude mcp add --transport http workflowstacks https://workflowstacks.com/api/mcp

Adds a WorkflowStacks connector to Claude Code: search and load any skill here by chatting.

How agent-lightning works
Codeflow
Free to inspect

Agent-lightning is a medium Python project (~12k lines across 86 code files, plus 24 test files). Setup is light: installs like a normal app. Reading the code is optional. Last commit this month, MIT license, has a test suite.

Size
Medium codebase
~12k lines · 86 code files · ~2 h to skim
Setup
One-command install
Installs like a normal app. Reading the code is optional.
Runs on
Python
No API keys detected
Python 99%Shell 1%
Where to start reading
  1. 1
    README.md
    Start here — what it does and how to install it
  2. 2
    pyproject.toml
    Dependencies and the commands it exposes
  3. 3
    agentlightning/__init__.py
    Inside agentlightning/ — the main logic begins here
  4. 4
    examples/calc_x/.dockerignore
    A worked example — copy this to get going
What's in each folder
agentlightning/Core code — the actual logic38 files
skills/Prompts, skills & agent definitions9 files
examples/Examples you can copy68 files
docs/Documentation35 files
scripts/Helper scripts3 files
tests/Tests — proof it works24 files
.github/CI / automation (GitHub Actions)6 files
.agents/Tool / agent settings2 files
READMEHas testsDocumentedCI checksExamples includedMIT licenseUpdated this month
Quick Actions
Details
Creator
microsoft
Language
Python
Category
ai-agent
Published
6/18/2025

Are you the creator of this tool? and earn 85% of every sale.

Show it off in your README:

Featured on WorkflowStacks
[![Featured on WorkflowStacks](https://workflowstacks.com/api/badge/agent-lightning.svg)](https://workflowstacks.com/skills/agent-lightning?utm_source=github&utm_medium=badge)
🔥 Hot this week, in your inbox
Skills like this, every Monday.

The five fastest-growing open-source AI skills, ranked by GitHub star growth. One email a week, unsubscribe anytime.