lauren-framework/lauren-ai/building-agents

Claude Code and agent skill by lauren-framework/lauren-ai

Trust tier 3
  • community
  • ext:[{"type":"hook","description":"Pre/post lifecycle hooks"}]
Source check pending

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-agents

Semi-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.

Use codemap find "SymbolName" to locate any symbol before reading — it gives
exact file + line range and is faster than grep across the whole repo.

Building Agents with lauren-ai

Quick start

python
# agent.py — from __future__ import annotations IS allowed here (no @tool)
from __future__ import annotations
from lauren_ai import agent, use_tools
from .tools import get_price
@agent(model="claude-opus-4-6", system="You are a helpful shop assistant.")
@use_tools(get_price)
class ShopAgent: ...

Run it:

python
from lauren_ai import AgentRunnerBase, LLMConfig
cfg = LLMConfig(provider="anthropic", model="claude-opus-4-6")
runner = AgentRunnerBase(transport=transport)
result = await runner.run(ShopAgent(), "How much is a Widget?")
print(result.content)

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:

@agent() ← outermost (top) — applied last, reads all metadata
@remember() ← optional
@use_guardrails() ← optional
@use_tools(...) ← innermost (bottom) — applied first, sets USE_TOOLS_META
class MyAgent: ...

Full example with all optional layers:

python
from lauren_ai import agent, remember, use_guardrails, use_tools
from lauren_ai import PromptInjectionFilter, PIIRedactor
from .tools import search_database, send_email
from .memory import user_memory_store
@agent(model="claude-opus-4-6", system="You are a personal assistant.", max_turns=10)
@remember(store=user_memory_store, extract=True, inject=True, top_k=5)
@use_guardrails(
input=[PromptInjectionFilter(), PIIRedactor()],
)
@use_tools(search_database, send_email)
class PersonalAssistant: ...

Safety invariants

RuleWhy 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 toolsUse ctx.execution_context.request.state.get("user_id") — see security.md
Tool annotations must resolve when schema generation runsFuture 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():

ParameterTypeDefaultDescription
modelstrrequiredModel string, e.g. "claude-opus-4-6"
systemstr""System prompt for the agent
max_turnsint10Maximum agentic loop iterations
max_tokens_per_turnint4096Maximum output tokens per LLM call
temperaturefloat1.0Sampling temperature (0.0–1.0)
memory_window_tokensint40_000Rolling context window size in tokens
max_cost_usd`float \None`NoneHard cost cap; raises AgentBudgetExceededError
parallel_tool_callsboolTrueExecute multiple tool calls concurrently
tool_error_policystr"return_error""raise" \"return_error" \"skip"

Reference files

FileContents
agents.mdFull reference: minimal agent, lifecycle hooks, streaming, delegation, all AgentConfig params
../building-tools/tools.mdFunction-form and class-form tools, HITL, caching, built-in skills
../securing-agents/security.mdAuthentication 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

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
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/lauren-framework/lauren-ai/building-agents/badge)](https://verified-skill.com/skills/lauren-framework/lauren-ai/building-agents)

Something wrong with this skill or its page? Tell us.