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
-
- Create your first agent
- Agent directory structure
- Basic configuration
-
agent.jsonmetadata- Framework-specific directories (
claude/,.codex/) - File organization
-
config.jsonschema- System prompts
- Permission modes
- Tool allowlists
Hooks System
The hook system allows you to intercept and customize agent behavior at key lifecycle points.
-
- What are hooks?
- When to use hooks
- Hook execution flow
-
- TypeScript setup
- Type safety with
@agentrix/shared - Testing hooks
-
- Claude SDK hook types
- Input/output schemas
- Execution order
-
Specific Hook Documentation:
- PreToolUse/PostToolUse - Control tool execution
- Session Hooks - Session lifecycle
- Examples - Real-world patterns
Advanced Features
-
- Integrating Model Context Protocol servers
- Configuration and management
-
- Creating reusable skills
- Skill marketplace (future)
Quality Assurance
-
- Local testing
- Integration tests
- CI/CD pipelines
-
- Agent design patterns
- Error handling
- Security considerations
- Performance optimization
Reference
- 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
- Issues: GitHub Issues
- Discussions: GitHub Discussions
Related Documentation
- User Guide - For Agentrix platform users