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
- Create the tool definition and handler:
- Register in
olive-agent.ts:
- Restart the agent to apply changes.
Next Steps
Configuration
Environment variables reference
Tools Reference
Complete tool documentation