building-agents
Skill0 starsChanged 6 months agoMITView on GitHub
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.
2 other projects use a version of this.
Adopted by
Most recently taken up by
- reddygopalkrishna/developer-agent-skillstheir own version, first seen Nov 8, 2026
- tines/skillstheir own version, first seen Aug 24, 2026
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 2
- reddygopalkrishna/developer-agent-skills★ 8same name
- tines/skills★ 1same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository65 other files it gives its agents.
- AGENTS.mdAGENTS.md
- skills/building-agents/agents.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- llms-full.txtllms.txt
- llms.txtllms.txt
- adding-guardrailsSkill
- agent-health-timeoutSkill
- agent-permission-scopingSkill
- agent-session-isolationSkill
- agent-step-loggingSkill
- agent-supervisor-routerSkill
- agent-telemetrySkill
- async-agent-backgroundSkill
- building-teamsSkill
- building-toolsSkill
- calendar-scheduling-toolSkill
- callback-tracing-handlerSkill
- chain-of-thought-promptingSkill
- chat-model-configurationSkill
- code-execution-sandboxSkill
- common-agent-patternsSkill
- context-window-managementSkill
- conversation-memorySkill
- conversation-state-dbSkill
- database-query-toolSkill
- document-loadersSkill
- document-rerankingSkill
- email-notification-toolSkill
- embedding-model-ingestionSkill
- fallback-model-chainSkill
- few-shot-injectionSkill
- filesystem-toolSkill
- human-in-the-loopSkill
- hybrid-searchSkill
- inspecting-streamsSkill
- integrating-with-laurenSkill
- json-schema-enforcementSkill
- llm-provider-connectionSkill
- llm-rate-limitingSkill
- long-term-vector-memorySkill
- managing-memorySkill
- migrating-to-lauren-aiSkill
- multi-agent-delegationSkill
- multi-tool-orchestrationSkill
- multi-turn-tool-stateSkill
- output-guardrailsSkill
- plan-and-execute-agentSkill
- prompt-injection-defenseSkill
- prompt-versioningSkill
- rag-pipelineSkill
- react-agent-loopSkill
- response-validation-retrySkill
- rest-api-toolSkill
- securing-agentsSkill
- semantic-cacheSkill
- streaming-response-handlerSkill
- structured-output-parsingSkill
- sub-agent-spawningSkill
- system-prompt-templatingSkill
- testing-agentsSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 85
All parameters are passed as keyword arguments to @agent():
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
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
# 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:
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:
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
| 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 |
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

