LaunchKit · 2026
Back to Skills

agent-lightning

Microsoft Research's agent training framework.

0
419 downloads
by @olmmlo-cmd

Setup & Installation

openclaw skills install @olmmlo-cmd/agent-lightning

Or with the ClawHub CLI, for registry-managed skill folders outside a full OpenClaw workspace:

npx clawhub install agent-lightning

What This Skill Does

Agent Lightning is Microsoft Research's framework for training AI agents using Reinforcement Learning, Automatic Prompt Optimization, and Supervised Fine-tuning. It instruments existing agents with minimal code changes via emit helpers or a tracer wrapper. Supports LangChain, AutoGen, CrewAI, and OpenAI Agent SDK out of the box.

Unlike manual prompt engineering or full model retraining, Agent Lightning applies RL and prompt optimization directly to your existing agent code without requiring a rewrite or framework switch.

When to use it

  • Improving a SQL-generation agent's accuracy through RL training
  • Tuning system prompts automatically for a customer support agent
  • Fine-tuning a coding assistant on preference data
  • Running benchmark evaluations on a multi-agent pipeline
  • Exporting optimized prompts or model weights for production deployment

Example Workflow

Here's how your AI assistant might use this skill in practice.

INPUT

User asks: train my LangChain agent on SQL generation tasks using reinforcement learning

AGENT
  1. 1Instrument the agent by wrapping it with agentlightning tracer or adding emit_tool_call helpers
  2. 2Create a config.yaml specifying agent type as langchain, algorithm as grpo, and eval tasks including sql-generation
  3. 3Run `agent-lightning train --config config.yaml` to start training
  4. 4Monitor loss curves and reward metrics via `agent-lightning dashboard --port 8080`
  5. 5Export the trained prompts or model with `agent-lightning export` for deployment
OUTPUT

Optimized agent with improved SQL generation accuracy, exportable for production use

Requirements

Accounts, API keys, or tools you or your AI assistant may need to set up while using this skill.

OPENAI_API_KEY environment variable