Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add coco-research/coco --skill agent-lightninggit clone --depth 1 https://github.com/coco-research/cocoWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/coco-research/coco/agent-lightning)<a href="https://agentmods.dev/skills/coco-research/coco/agent-lightning"><img src="https://agentmods.dev/badge/skills/coco-research/coco/agent-lightning/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/coco-research/coco/agent-lightning"><img src="https://agentmods.dev/badge/skills/coco-research/coco/agent-lightning.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00048 | $0.01848 |
| Opus 5.5 | $0.00019 | $0.00739 |
| Sonnet 5.5 | $0.00010 | $0.00370 |
| Haiku 4.5 | $0.00005 | $0.00185 |
Grade B, and why
agent-lightning scanned grade B with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Sends data to an external URLmediumData exfiltration
A POST to an outside endpoint may be telemetry or may be exfiltration; either way the mod talks to somewhere, and you should know where.
const response = await fetch('http://localhost:8080/rollouts', { method: 'POST', How it starts
The opening of the file, as written. The whole thing — 352 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Agent Lightning
Microsoft's framework for training AI agents with reinforcement learning, automatic prompt optimization, and supervised fine-tuning.
Quick Start
Installation
pip install agentlightning
For nightly builds:
pip install --upgrade --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ --pre agentlightning
Minimal Integration (Zero Code Change)
Add agl.emit_xxx() helpers to your existing agent:
import agentlightning as agl
# Your existing agent code
def my_agent(task):
agl.emit_input(task) # Track input
response = llm.generate(task)
agl.emit_output(response) # Track output
reward = evaluate(response)
agl.emit_reward(reward) # Track reward
return response
Core Concepts
Architecture Flow
Agent (your code) → agl.emit_xxx() → Spans → LightningStore → Algorithm → Updated Resources
Key Components
| Component | Purpose |
|---|---|
LightningStore |
Central hub for traces, tasks, and resources |
Tracer |
Collects spans from agent execution |
Algorithm |
Consumes traces, produces improvements |
Trainer |
Orchestrates training loop |
Instrumentation
Emit Functions
import agentlightning as agl
# Basic emissions
agl.emit_input(prompt) # Track input to agent
agl.emit_output(response) # Track agent output
agl.emit_reward(score) # Track reward signal
agl.emit_tool_call(name, args) # Track tool usage
agl.emit_tool_result(result) # Track tool results
Tracer Context
from agentlightning import Tracer
tracer = Tracer(store=store)
with tracer.trace_context(task_id="task-123"):
# All emissions within this context are grouped
result = agent.run(task)
# Retrieve trace after execution
trace = tracer.get_last_trace()
OpenTelemetry Integration
Agent Lightning integrates with OpenTelemetry:
from agentlightning.utils.otel import get_tracer
tracer = get_tracer() # Returns OTel tracer for "agentlightning"
What ships with it
1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 3mo ago First seen · 352 lines · 48 tokens per session scan B 8e29e4f578b9
agent-lightning is a skill published in the GitHub repository coco-research/coco (323 stars, last pushed yesterday), licensed Apache-2.0. It adds 48 tokens to every session and 1,848 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it B with 1 finding (sends data to an external url). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
agent-lightning compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| agent-lightningcoco-research/coco | Skill | 323 | yesterday | Apache-2.0 | B | 48 | Claude Code, Codex |
| pageindexmarcusquinn/aidevops | Skill | 476 | today | MIT | A | 15 | Claude Code |
| infrastructure-llmdocxology/template | Skill | 25 | today | Apache-2.0 | A | 66 | Claude Code, Codex |
| infrastructure-search-moniddocxology/template | Skill | 25 | today | Apache-2.0 | A | 124 | Claude Code, Codex |
| template-autoresearch-projectdocxology/template | Skill | 25 | today | Apache-2.0 | A | 30 | Claude Code, Codex |
| bioinformatics-scientistwonsukchoi/domain-experts | Skill | 30 | today | MIT | A | 168 | Claude Code, Codex |
| ai-researcherK-Dense-AI/scientific-agents | Skill | 265 | 1mo ago | MIT | A | 111 | Claude Code |