# agent-lightning | Microsoft | Knowledge Base | Instagit

The absolute trainer to light up AI agents.

GitHub Stars: 16.4k

Repository: https://github.com/microsoft/agent-lightning

---

## Articles

### [Testing Strategies for Agent Training Pipelines in Agent-Lightning: A Complete Guide](/microsoft/agent-lightning/testing-strategies-agent-training-pipelines-agent-lightning)

Master testing strategies for agent training pipelines in Agent Lightning. Explore component wiring, strategy selection, and runtime contracts for robust AI agent development.

- Tags: testing-strategies
- Published: 2026-04-01

### [How to Implement Checkpointing and Resume Training in Agent-Lightning](/microsoft/agent-lightning/checkpointing-resuming-training-agent-lightning)

Learn how to implement checkpointing and resume training in Agent-Lightning. Automatically save model weights and training state to resume from the exact batch where you left off.

- Tags: how-to-guide
- Published: 2026-04-01

### [Worker Management and Resource Allocation in Agent-Lightning: A Complete Technical Guide](/microsoft/agent-lightning/worker-management-resource-allocation-agent-lightning)

Master worker management and resource allocation in Agent-Lightning. Learn how this guide details scalable agent execution with store-driven APIs and lifecycle management.

- Tags: how-to-guide
- Published: 2026-04-01

### [Algorithm Selection Criteria: VERL vs APO vs SFT in Agent-Lightning](/microsoft/agent-lightning/algorithm-selection-criteria-verl-apo-sft-agent-lightning)

Select VERL for direct weight modification, APO for prompt optimization without retraining, or SFT for supervised fine-tuning in Agent-Lightning. Learn algorithm selection criteria.

- Tags: deep-dive
- Published: 2026-04-01

### [Migrating from Legacy Runner to the New Architecture in Agent-Lightning: A Complete Guide](/microsoft/agent-lightning/migrate-legacy-runner-new-architecture-agent-lightning)

Upgrade Agent Lightning from legacy runner to new architecture. Switch to LitAgentRunner and LightningStore for async execution, heartbeats, and unified storage. Read our complete guide.

- Tags: migration-guide
- Published: 2026-04-01

### [Security Considerations for the LLM Proxy in Agent-Lightning: Risks and Mitigations](/microsoft/agent-lightning/security-considerations-llm-proxy-agent-lightning)

Secure your LLM proxy in agent-lightning. Learn essential security considerations, default risks, and mitigation strategies for your OpenAI-compatible API endpoint.

- Tags: security-considerations
- Published: 2026-04-01

### [Optimizing Performance for Large-Scale Agent Training with Agent-Lightning](/microsoft/agent-lightning/optimize-performance-large-scale-agent-training-agent-lightning)

Boost large-scale agent training performance with Agent-Lightning. Optimize with ClientServerExecutionStrategy, persist rollouts in MongoLightningStore, and configure environment variables to scale effectively.

- Tags: performance
- Published: 2026-04-01

### [Implementing Custom Reward Functions in Agent Lightning: A Complete Guide](/microsoft/agent-lightning/implement-custom-reward-functions-agent-lightning)

Learn to implement custom reward functions in Agent Lightning using emit_reward() and find_final_reward(). This guide provides step-by-step instructions for integrating scalar and multi-dimensional rewards.

- Tags: how-to-guide
- Published: 2026-04-01

### [Debugging Training Failures and Tracing Issues in Agent-Lightning: A Complete Guide](/microsoft/agent-lightning/debugging-training-failures-tracing-issues-agent-lightning)

Debug training failures and trace issues in Agent Lightning with a three-layer diagnostic approach. Isolate crashes, missing traces, and stalled RL loops quickly. Learn more.

- Tags: how-to-guide
- Published: 2026-04-01

### [Configuring Environment Variables for Agent-Lightning Production Deployments](/microsoft/agent-lightning/configure-environment-variables-agent-lightning-production-deployment)

Configure environment variables for agent-lightning production deployments to manage GPU and CPU nodes and connect to persistent stores like MongoDB. Learn how in our guide.

- Tags: how-to-guide
- Published: 2026-04-01

### [Ensuring Thread-Safety and Async Safety in Distributed Training with Agent-Lightning](/microsoft/agent-lightning/thread-safety-async-safety-distributed-training-agent-lightning)

Learn how Agent-Lightning ensures thread-safety and async safety in distributed training using LightningStoreThreaded, cooperative cancellation, and process-isolated Ray actors.

- Tags: best-practices
- Published: 2026-04-01

### [Handling Large-Scale Span Storage and Eviction Policies in Agent-Lightning](/microsoft/agent-lightning/large-scale-span-storage-eviction-policies-agent-lightning)

Learn how Agent-Lightning handles large scale span storage and eviction policies. Prevent OOM errors with automatic memory management and configurable thresholds for optimal performance.

- Tags: best-practices
- Published: 2026-04-01

### [Customizing the Training Loop in Agent-Lightning's Trainer: Architecture and Implementation Guide](/microsoft/agent-lightning/customize-training-loop-agent-lightning-trainer)

Learn to customize Agent-Lightning's Trainer training loop. Explore passing custom ComponentSpecs, subclassing, or injecting Hooks for flexible algorithm and execution strategy modifications. Maximize your agent training effici...

- Tags: architecture
- Published: 2026-04-01

### [Integrating OpenTelemetry for Custom Tracing in Agent-Lightning](/microsoft/agent-lightning/opentelemetry-integration-custom-tracing-agent-lightning)

Integrate OpenTelemetry for custom tracing in agent-lightning easily. The library simplifies span, tag, and link creation without manual SDK management. Learn more!

- Tags: how-to-guide
- Published: 2026-04-01

### [How to Configure LLM Proxy and Rate Limiting in Agent-Lightning](/microsoft/agent-lightning/configure-llm-proxy-rate-limiting-agent-lightning)

Learn how to configure LLM proxy and rate limiting in Agent-Lightning. Master LiteLLM integration and server setup for efficient AI agent management.

- Tags: how-to-guide
- Published: 2026-04-01

### [When to Use Different Emitter Types in Agent-Lightning: A Complete Guide to Observability](/microsoft/agent-lightning/agent-lightning-emitter-types-usage)

Master agent-lightning emitter types for effective observability. Learn when to use emit_reward, emit_message, emit_object, and more for RL training, debugging, and tracing.

- Tags: how-to-guide
- Published: 2026-04-01

### [Understanding Execution Modes in Agent-Lightning: Shared Memory, Inter-Process, and Client-Server](/microsoft/agent-lightning/agent-lightning-execution-modes-shared-memory-inter-process-client-server)

Explore Agent-Lightning execution modes: shared-memory, client-server, and full orchestration. Master process topology, communication, and shutdown semantics for efficient agent deployment.

- Tags: deep-dive
- Published: 2026-04-01

### [Multi-Agent Selective Optimization in Agent-Lightning: 5 Strategies for Targeted Training](/microsoft/agent-lightning/multi-agent-selective-optimization-strategies-agent-lightning)

Discover multi-agent selective optimization strategies in Agent-Lightning. Learn to target specific agents with regex filters for efficient training without code changes. Visit microsoft/agent-lightning.

- Tags: how-to-guide
- Published: 2026-04-01

### [How to Build Custom Training Algorithms for Agent-Lightning: A Complete Guide](/microsoft/agent-lightning/build-custom-training-algorithms-agent-lightning)

Learn to build custom training algorithms for Agent-Lightning. Subclass the Algorithm class, implement the run method, and leverage decorators for dependencies. A complete guide.

- Tags: how-to-guide
- Published: 2026-04-01

### [Which LightningStore Backend to Choose: MongoDB, SQLite, or In-Memory](/microsoft/agent-lightning/lightningstore-backend-comparison-mongodb-sqlite-in-memory)

Choosing a LightningStore backend? Select MongoDB for production, In-Memory for tests, and note SQLite is unimplemented. Optimize your training and testing with the right choice.

- Tags: deep-dive
- Published: 2026-04-01

### [How to Implement a Custom Tracer for Proprietary Frameworks in agent-lightning](/microsoft/agent-lightning/custom-tracer-implementation-proprietary-frameworks-agent-lightning)

Learn to implement a custom tracer for proprietary frameworks in agent-lightning. Extend the base Tracer class and integrate with LitAgentRunner for distributed tracing.

- Tags: how-to-guide
- Published: 2026-04-01

