lauren-framework/lauren-ai/building-agents
Claude Code and agent skill by lauren-framework/lauren-ai
- community
- ext:[{"type":"hook","description":"Pre/post lifecycle hooks"}]
Checking that the SKILL.md file is still in the repository.
Builds AI agents with the lauren-ai framework using @agent, @use_tools, and AgentRunner. Use when defining an agent class, setting up lifecycle hooks, streaming responses, implementing agent delegation, or configuring the agentic loop with tools, guardrails, and memory.
Install
npx vskill@latest install lauren-framework/lauren-ai/building-agentsSemi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard
SKILL.md
The same SKILL.md was published earlier as lauren-framework/lauren-ai/building-agents.
Usecodemap find "SymbolName"to locate any symbol before reading — it givesexact file + line range and is faster than grep across the whole repo.
Building Agents with lauren-ai
Quick start
Run it:
Decorator order (mandatory)
Decorators are applied bottom-up in Python. Always write them top-to-bottom in this order so each decorator reads the metadata set by those below it:
Full example with all optional layers:
Safety invariants
| Rule | Why it matters | |
|---|---|---|
| `@agent` always outermost (top), `@use_tools` always innermost (bottom) | Wrong order means @agent reads metadata before @use_tools writes it — tools silently disappear | |
| Always call decorators with parentheses | @agent() not @agent — bare form raises DecoratorUsageError at decoration time | |
| Use `@use_guardrails()` to attach guardrails to agents | @guardrail() is for making standalone DI-injectable guardrail classes; @use_guardrails() wires them into an agent | |
| Never trust LLM-supplied identity in tools | Use ctx.execution_context.request.state.get("user_id") — see security.md | |
| Tool annotations must resolve when schema generation runs | Future annotations are supported, but unresolved forward refs and circular imports in function-form tool files still break @tool() schema generation |
AgentConfig parameters
All parameters are passed as keyword arguments to @agent():
| Parameter | Type | Default | Description | |||
|---|---|---|---|---|---|---|
model | str | required | Model string, e.g. "claude-opus-4-6" | |||
system | str | "" | System prompt for the agent | |||
max_turns | int | 10 | Maximum agentic loop iterations | |||
max_tokens_per_turn | int | 4096 | Maximum output tokens per LLM call | |||
temperature | float | 1.0 | Sampling temperature (0.0–1.0) | |||
memory_window_tokens | int | 40_000 | Rolling context window size in tokens | |||
max_cost_usd | `float \ | None` | None | Hard cost cap; raises AgentBudgetExceededError | ||
parallel_tool_calls | bool | True | Execute multiple tool calls concurrently | |||
tool_error_policy | str | "return_error" | "raise" \ | "return_error" \ | "skip" |
Reference files
| File | Contents | |
|---|---|---|
| agents.md | Full reference: minimal agent, lifecycle hooks, streaming, delegation, all AgentConfig params | |
| ../building-tools/tools.md | Function-form and class-form tools, HITL, caching, built-in skills | |
| ../securing-agents/security.md | Authentication via ToolContext.execution_context.request.state |
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/building-agents/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Extension points
hookPre/post lifecycle hooks
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/lauren-framework/lauren-ai/building-agents)