Skip to main content

Agent Developers Guide

Welcome to the Agentrix Agent Development documentation. This guide will help you build custom agents for the Agentrix platform.

What is an Agentrix Agent?​

An Agentrix agent is a specialized AI assistant configured to perform specific tasks. Each agent is:

  • Self-contained: A git repository with standardized structure
  • Framework-agnostic: Supports Claude Agent SDK and OpenAI Codex
  • Customizable: Hooks, MCP servers, skills, and custom prompts
  • Type-safe: Full TypeScript support for hooks and configuration

Quick Start​

See Getting Started for detailed instructions.

Documentation Structure​

Core Concepts​

  1. Getting Started

    • Create your first agent
    • Agent directory structure
    • Basic configuration
  2. Agent Structure

    • agent.json metadata
    • Framework-specific directories (claude/, .codex/)
    • File organization
  3. Configuration

    • config.json schema
    • System prompts
    • Permission modes
    • Tool allowlists

Hooks System​

The hook system allows you to intercept and customize agent behavior at key lifecycle points.

  1. Hooks Overview

    • What are hooks?
    • When to use hooks
    • Hook execution flow
  2. Development Guide

    • TypeScript setup
    • Type safety with @agentrix/shared
    • Testing hooks
  3. Hook Types Reference

    • Claude SDK hook types
    • Input/output schemas
    • Execution order
  4. Specific Hook Documentation:

Advanced Features​

  1. MCP Servers

    • Integrating Model Context Protocol servers
    • Configuration and management
  2. Skills

    • Creating reusable skills
    • Skill marketplace (future)

Quality Assurance​

  1. Testing

    • Local testing
    • Integration tests
    • CI/CD pipelines
  2. Best Practices

    • Agent design patterns
    • Error handling
    • Security considerations
    • Performance optimization

Reference​

  1. API Reference
    • TypeScript types
    • Schema definitions
    • Hook signatures

Examples​

Simple Agent​

// agent.json
{
"name": "code-reviewer",
"version": "1.0.0",
"description": "Automated code review assistant"
}
// claude/hooks/src/index.ts
import type { PreToolUseHookInput } from '@anthropic-ai/claude-agent-sdk';

export async function PreToolUse(
input: PreToolUseHookInput,
toolUseID: string,
options: { signal: AbortSignal }
) {
// Approve all Edit tool calls
if (input.tool_name === 'Edit') {
return { decision: 'approve' };
}

// Ask for confirmation for other tools
return {};
}

See complete examples for more patterns.

Getting Help​