Skip to main content

Agent-TS Architecture

This document covers the internal architecture of Agent-TS, including the component structure, message flow, and extension patterns.

Component Overview

File Responsibilities

Core Files

Tools Directory

Service Files

Request Flow

Text Message Processing

Image Upload Processing

OpenAI Integration

Assistant Configuration

Tool Registration Pattern

Security Layers

Input Sanitization

Rate Limiting

Service Authentication

For internal service calls, the agent uses HMAC-based authentication:

Error Handling

Graceful Degradation

Extension Guide

Adding a New Tool

  1. Create the tool definition and handler:
  1. Register in olive-agent.ts:
  1. Restart the agent to apply changes.

Next Steps

Configuration

Environment variables reference

Tools Reference

Complete tool documentation