lauren-framework/lauren-ai/agent-step-logging
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.
Log each agentic loop step using lifecycle hooks on the @agent class. Use when you need structured per-step logs for debugging, auditing, or monitoring without modifying the runner or adding external infrastructure.
Install
npx vskill@latest install lauren-framework/lauren-ai/agent-step-loggingSemi-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/agent-step-logging.
Usecodemap find "AgentContext"to check the lifecycle hook signatures.
Agent Execution Step Logging
Define on_start, on_turn_complete, on_tool_result, and on_finish lifecycle hooks on your @agent()-decorated class to log each step.
Hook signatures
| Hook | Parameters | Called when | ||
|---|---|---|---|---|
on_start | (ctx: AgentContext) | Before first LLM call | ||
on_turn_complete | (completion: Completion, ctx: AgentContext) | After each LLM call | ||
on_tool_result | `(result: ToolResult, ctx: AgentContext) -> ToolResult \ | None` | After each tool execution | |
on_finish | (response: AgentResponse, ctx: AgentContext) | After the run completes |
Pattern
Capture logs in tests
Use a list-based handler to assert on log output without configuring a real logging destination:
Or use pytest's built-in caplog fixture:
Notes
- Hooks are optional — define only the ones you need.
on_tool_resultreturningNoneleaves the result unchanged; returning a
new ToolResult replaces it (useful for sanitising sensitive outputs).
- Hooks run synchronously or asynchronously — both
defandasync defwork. - The runner swallows hook exceptions (logging a warning) so a broken hook
never aborts the agent run.
Security
- Security scanPassed, 95 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/agent-step-logging/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/agent-step-logging)