Skip to content
Back to skills

Agent Authoring

ASecurity

"Author and debug Agent Lightning agents with rollout decorators,

  • 247 stars
  • 0 votes
  • 0 copies
  • 6 views
  • Added September 8, 2026
businesspythongobashdebuggingapi

Works with

  • cli
  • api

Security analysis

A100/100

Pro scans all 5 files and shows the line behind each finding

Scanned September 8, 2026

npx -y skills add VectorSpaceLab/AREX-Skill --skill agent-authoring --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Agent Authoring?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Agent Authoring
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/vectorspacelab-agent-authoring/badge)](https://www.skillsdirectory.com/skills/vectorspacelab-agent-authoring)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: agent-authoring
description: "Author and debug Agent Lightning agents with rollout decorators,
  LitAgent classes, resource injection, return contracts, and single-rollout
  smoke checks."
disable-model-invocation: true
metadata:
  disco-role: operating
license: MIT
---

# Agent authoring

Use this sub-skill when the user wants to write, wrap, migrate, or debug an Agent Lightning agent.

## Route by task

| Request | Read/run |
| --- | --- |
| Create a function-based trainable agent | [references/authoring-workflows.md](references/authoring-workflows.md) |
| Fix `@rollout`, `@llm_rollout`, or `@prompt_rollout` errors | [references/troubleshooting.md](references/troubleshooting.md) and [references/api-reference.md](references/api-reference.md) |
| Write a class-based `LitAgent` | [references/authoring-workflows.md](references/authoring-workflows.md#class-based-agents) |
| Validate one rollout without external services | `python scripts/agent_rollout_smoke.py` |
| Debug resources, prompt templates, or returned reward spans | [references/troubleshooting.md](references/troubleshooting.md), then route to [../tracing-and-instrumentation/SKILL.md](../tracing-and-instrumentation/SKILL.md) if spans are involved |

## Key rules

- Every agent consumes one task input and some tunable resources.
- Function decorators support known signatures, not arbitrary callables. The most common patterns are `def agent(task, prompt_template) -> float` and `def agent(task, llm) -> float`.
- Returning a `float` is the simplest final reward path. Returning `None` is valid only when traces and rewards are emitted explicitly.
- Class-based agents subclass `LitAgent[T]` and implement `rollout(self, task, resources, rollout)` or async/validation variants.
- For local debugging, prefer `OtelTracer`, `InMemoryLightningStore`, and `LitAgentRunner.step` before using multi-process trainer flows.

## Minimal authoring pattern

```python
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:

```bash
python scripts/agent_rollout_smoke.py
```

## Boundary

This sub-skill covers agent objects and resource injection. For store lifecycle, algorithms, and `Trainer`, use [runner-store-training](../runner-store-training/SKILL.md). For emitters, adapters, and trace analysis, use [tracing-and-instrumentation](../tracing-and-instrumentation/SKILL.md). For CLI services and LLM proxy endpoint checks, use [cli-and-services](../cli-and-services/SKILL.md).

Files in this skill

  • SKILL.md2.6 KB
  • references/api-reference.md3.3 KB
  • references/authoring-workflows.md4.8 KB
  • references/troubleshooting.md3.8 KB
  • scripts/agent_rollout_smoke.py2.5 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.