协作头脑风暴
brainstorming
在实现前澄清需求、探索设计选择,并形成清晰的开发方向。
agent-authoring【开发与工程】Author and debug Agent Lightning agents with rollout decorators, LitAgent classes, resource injection, return contracts, and single-rollout smoke checks.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Use this sub-skill when the user wants to write, wrap, migrate, or debug an Agent Lightning agent.
| Request | Read/run |
|---|---|
| Create a function-based trainable agent | references/authoring-workflows.md |
Fix @rollout, @llm_rollout, or @prompt_rollout errors | references/troubleshooting.md and references/api-reference.md |
Write a class-based LitAgent | references/authoring-workflows.md |
| Validate one rollout without external services | python scripts/agent_rollout_smoke.py |
| Debug resources, prompt templates, or returned reward spans | references/troubleshooting.md, then route to ../tracing-and-instrumentation/SKILL.md if spans are involved |
def agent(task, prompt_template) -> float and def agent(task, llm) -> float.float is the simplest final reward path. Returning None is valid only when traces and rewards are emitted explicitly.LitAgent[T] and implement rollout(self, task, resources, rollout) or async/validation variants.OtelTracer, InMemoryLightningStore, and LitAgentRunner.step before using multi-process trainer flows.import agentlightning as agl
@agl.rollout
def my_agent(task: dict, prompt_template: agl.PromptTemplate) -> float:
prompt = prompt_template.format(**task)
# call tools or an LLM here
return 1.0
Run the bundled smoke script when you need an assertion-backed minimal example:
python scripts/agent_rollout_smoke.py
This sub-skill covers agent objects and resource injection. For store lifecycle, algorithms, and Trainer, use runner-store-training. For emitters, adapters, and trace analysis, use tracing-and-instrumentation. For CLI services and LLM proxy endpoint checks, use cli-and-services.