agent-callbacks

Add callback hooks for logging and error handling around LLM calls and tool execution.

19|6|Updated Mar 12, 2026
One-click install
npx skills add https://github.com/NicolaiLassen/orxhestra --skill agent-callbacks
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: agent-callbacks
Source: https://github.com/NicolaiLassen/orxhestra/tree/main/docs/skills/agent-callbacks
Command: npx skills add https://github.com/NicolaiLassen/orxhestra --skill agent-callbacks

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Agent execution can feel like a black box, making it hard to debug failures, verify tool behavior, and monitor model calls in production.

Core Features & Use Cases

  • Model lifecycle callbacks: run logic before and after LLM requests to log inputs, tools available, and response summaries.
  • Tool lifecycle callbacks: capture tool start/end events to audit arguments and results.
  • Sub-agent delegation hooks: intercept and observe events produced by child agents when using an AgentTool.
  • Error handling hooks: intercept model errors to log issues and optionally return a recoverable response.
  • Tracing integration (Langfuse): stream events to a tracing backend via callbacks for monitoring and analytics.

Quick Start

Ask: “Enable model and tool callbacks for my orxhestra agent to log requests, tool calls, and errors during streaming runs.”

Frequently Asked Questions about agent-callbacks

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add observability to LLM agents to monitor prompts and tool calls?

Agent observability is achieved by attaching before and after callbacks to LLM model calls and tool execution. These hooks log prompts, available tools, and response summaries, making the agent execution flow transparent and auditable.

How do I handle errors during LLM model calls in production agents?

Error handling for LLM model calls uses dedicated error callback hooks to intercept failures. These hooks log the issue and can optionally return a recoverable response, allowing production agent orchestration to handle failures gracefully.

Can I trace agent execution events and stream them to Langfuse?

Yes, agent execution events can be streamed to Langfuse using external callback handlers. This tracing integration sends model lifecycle, tool execution, and sub-agent delegation events directly to the tracing backend for analytics.

How do I capture sub-agent delegation events when using an AgentTool?

Sub-agent delegation events are captured using specific delegation hooks. These hooks intercept and observe events produced by child agents during an AgentTool execution, providing visibility into nested agent workflows and tool arguments.

What is the best way to audit tool arguments and results during async streaming?

Auditing tool arguments and results during async streaming is handled by tool lifecycle callbacks. These hooks capture tool start and end events, recording the exact inputs and outputs of tool execution for verification and debugging.