Agent lightning

From LowyShin/giip-dev-agent · View interactive version

Agent lightning is an AI agent skill from the GitHub repository LowyShin/giip-dev-agent. Trace, optimize, and evaluate agent execution with Microsoft Agent Lightning — rollout decorators for tracing, prompt-template optimization driven by reward signals, and dashboard evaluation across multiple rollouts. Use when profiling or tuning an agent's prompt/tool-call behavior instead of editin

How to use this skill

Skill file

Agent Lightning Skill

Use Microsoft Agent Lightning to trace, optimize, and evaluate agent performance.

🎯 When to Use

⚡ How to Trace

To trace a task, wrap the main function with the @agl.rollout decorator.

import agentlightning as agl

@agl.rollout
def my_agent_task(prompt):
    # Agent logic here
    pass

⚡ How to Optimize Prompts

Use agl.PromptTemplate for parts of the prompt that you want the framework to optimize.

template = agl.PromptTemplate(
    "You are an expert coder. Solve this: {{task}}",
    role="system"
)

# During rollout:
prompt = template.render(task="Write a binary search")

📊 Viewing Results

Run the dashboard to see traces and performance metrics:

python scripts/agl_dashboard.py
# or
agl-dashboard

🏗️ Environment

[!IMPORTANT]

Agent Lightning requires Linux (WSL2 on Windows). All Python scripts using this skill should be executed in a WSL2 environment with agentlightning installed.

⚡ Optimization Integration

When using this skill for critical tasks, please run it within a /native-trace context to capture performance data for self-improvement via /aioptimize.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.