agenticforge-hooks

Implement AgenticFORCE hook contracts and lifecycle instrumentation in TypeScript.

75|4|Updated Mar 3, 2026
One-click install
npx skills add https://github.com/LittleBlacky/AgenticFORGE --skill agenticforge-hooks
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: agenticforge-hooks
Source: https://github.com/LittleBlacky/AgenticFORGE/tree/main/skills/agenticforge-hooks
Command: npx skills add https://github.com/LittleBlacky/AgenticFORGE --skill agenticforge-hooks

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

AgenticFORGE hook lifecycles can be error-prone to implement and observe in production. This skill provides structured patterns, contracts, and runnable TypeScript code to design, register, and instrument hooks across agent lifecycles.

Core Features & Use Cases

  • Design and implement AgentHook contracts and registration patterns.
  • Lifecycle instrumentation for beforeRun, afterRun, onError, beforeLLMCall, afterLLMCall, beforeToolCall, afterToolCall.
  • Observability and strict/error handling patterns for production-grade reliability.
  • Real-world examples of implementing custom hooks and metrics integration.

Quick Start

Create and register a simple audit hook that logs beforeRun and afterRun using the ConsoleLoggingHook pattern.

Frequently Asked Questions about agenticforge-hooks

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

FAQPage Schema
How do I implement lifecycle hooks in TypeScript agents?

TypeScript lifecycle hooks are implemented by defining AgentHook contracts and registering modular callbacks for execution phases like beforeRun and afterRun. This provides structured patterns, traceable logging, and safe error handling for production-grade reliability.

What is the best way to add observability and instrumentation to LLM calls?

Observability for LLM calls is added by instrumenting beforeLLMCall and afterLLMCall lifecycle phases with structured hooks. This approach enables traceable logging and metrics integration, ensuring complete visibility into agent execution and tool interactions.

Can I enforce strict error handling and priority ordering for agent hooks?

Strict error handling and priority ordering are supported through configurable hook registration patterns. You can enforce strict modes to fail execution on errors and define priority ordering to control the exact sequence of hook execution across agent lifecycles.

How do I create a custom audit hook to log beforeRun and afterRun events?

Custom audit hooks are created using the ConsoleLoggingHook pattern to log beforeRun and afterRun events. This quick start approach provides a runnable TypeScript implementation for registering modular hook contracts that trace agent execution phases.

When do I need modular hook contracts for production agents?

Modular hook contracts are needed when building production agents requiring structured lifecycle management and traceable instrumentation. They solve error-prone implementation by providing safe error handling, registration patterns, and observability across tool and LLM execution phases.

Does AgenticFORGE support instrumentation for tool call lifecycles?

AgenticFORGE supports instrumentation for tool call lifecycles through beforeToolCall and afterToolCall phases. These hooks enable traceable logging and metrics integration, allowing robust observability of tool execution within production agent workflows.