Fana Telegram Oracle Agent v0.2.0 - Revamped Doc Update

User & Developer Documentation

Table of Contents

  1. Introduction

  2. Getting Started

  3. Core Features

    • Direct Messaging

    • Group Chat Integration

    • Multimedia Support

    • Voice Messages

    • Document Handling

  4. Usage Guide

    • Basic Commands

    • Trigger Words

    • Message Handling

  5. Advanced Features

    • Session Management

    • Split Message Handling

    • Error Recovery

    • Notification System

  6. Privacy & Security

  7. Benefits

  8. Developer Section

  9. Conclusion

Introduction

Fana Telegram Oracle Agent is a sophisticated AI-powered Telegram bot written in Rust, designed to provide intelligent responses, handle multimedia content, and facilitate both personal and group interactions. Version 0.2.0 introduces enhanced features for multimedia processing, improved error handling, and robust state management.

Getting Started

  1. Search for the bot on Telegram (bot name to be provided by administrator)

  2. Start a conversation by sending "/start"

  3. The bot will respond and be ready for interaction

Core Features

Direct Messaging

  • One-on-one conversations with the AI agent

  • Continuous conversation memory within sessions

  • Personalized responses based on user context

  • Option to enable/disable DM responses through admin settings

  • Multi-tasking support while conversing

Group Chat Integration

  • Responds to specific triggers in group conversations

  • Smart group chat management

  • Configurable trigger words

  • Option to use command-only mode (/command) in groups

  • Maintains separate context for each group

  • Automatic message deduplication

Multimedia Support

  • Image processing and analysis

  • Supports PNG and other common image formats

  • Ability to respond to images with contextual understanding

  • Image caption processing and integration with text responses

  • Automatic media file handling

Voice Messages

  • Voice message transcription (when enabled)

  • Audio file processing in OGG format

  • Integration of voice context with text responses

  • Multi-tasking support during voice interactions

  • Automatic transcription for trigger detection in groups

Document Handling

  • Document processing and analysis

  • Support for various file formats

  • Context-aware responses to document content

  • Integrated document and text response handling

  • Secure file processing

Usage Guide

Basic Commands

  • /start - Initialize the bot

  • /help - Get help information

  • Custom commands can be configured by administrator

Trigger Words

  • Configurable trigger system for group chats

  • Custom triggers can be set by administrators

  • Separate trigger settings for DMs and groups

  • Automatic trigger word cleaning

Message Handling

  • Smart handling of split messages

  • Automatic message deduplication

  • Caption integration with media messages

  • Forwarded message support

  • Message editing support

Advanced Features

Session Management

  • Persistent session handling with UUID-based tracking

  • State preservation between restarts

  • Automatic state backup every 5 minutes

  • Separate states for groups and individual chats

  • Crash recovery support

Split Message Handling

  • Automatic combination of split messages

  • Message order preservation

  • Interrupted message handling

  • Context maintenance across splits

  • Deduplication of repeated content

Error Recovery

  • Automatic error handling and recovery

  • User-friendly error messages

  • Automatic restart on critical errors

  • Connection issue handling

  • Comprehensive error logging

Notification System

  • Email notifications support

  • Telegram notifications integration

  • Configurable notification settings

  • Negative feedback handling

  • Alert system for critical events

Privacy & Security

  • Secure message handling

  • No permanent message storage

  • Configurable data retention

  • Protected API communications

  • Token-based authentication

  • Resource usage limits

Benefits

  1. Versatile Communication

    • Multi-modal interaction support

    • Group and private chat functionality

    • Flexible response modes

    • Multi-tasking capabilities

  2. Reliable Performance

    • Automatic error recovery

    • Persistent state management

    • Robust message handling

    • Resource-optimized processing

  3. Smart Interactions

    • Context-aware responses

    • Multi-modal understanding

    • Adaptive conversation flow

    • Intelligent trigger system

  4. Enterprise Ready

    • Configurable settings

    • Monitoring capabilities

    • Scalable architecture

    • Docker deployment support

Developer Section

Technical Architecture

Environment Configuration

# Essential Settings
TELEGRAM_BOT_TOKEN=       # Telegram bot token
API_URL=                  # LLM API endpoint
API_TOKEN=                # Authentication token
GROQ_API_KEY=            # Groq API key
PORT=                     # Service port

# Feature Toggles
DM_TRIGGERS_ENABLED=      # DM triggers
GROUP_TRIGGERS_ENABLED=   # Group triggers
IMAGE_UPLOAD_ENABLED=     # Image processing
TRANSCRIBE_AUDIO_ENABLED= # Audio transcription

Project Structure

src/
├── api/            # API interaction logic
├── handlers/       # Message and event handlers
├── notifications/  # Notification systems
├── transcribe/     # Audio transcription
└── utils/          # Utility functions

Deployment

Docker Configuration

  • Resource limits: 0.8 CPU cores and 2GB memory

  • Automatic restart policy

  • Volume mounts for logs and state

  • Environment-based configuration

State Management

  • Periodic state saving (5-minute intervals)

  • JSON-based state storage

  • Crash recovery mechanisms

  • Session tracking system

Monitoring

Logging System

  • Structured logging

  • Debug level configuration

  • Automatic log rotation

  • Performance metrics tracking

Error Handling

  • Comprehensive error logging

  • Graceful failure recovery

  • Rate limiting implementation

  • Connection error management

Development Guidelines

  • Use Rust async/await for concurrency

  • Implement proper error handling

  • Follow resource limitation guidelines

  • Maintain backward compatibility

  • Document API changes

Conclusion

Fana Telegram Oracle Agent v0.2.0 represents a sophisticated, production-ready solution for AI-powered Telegram interactions. Its robust feature set, combined with intelligent handling of various media types and conversations, makes it an ideal choice for both personal and group chat environments. The system's focus on reliability, security, and user experience ensures consistent and helpful interactions while maintaining data privacy and system stability.

The comprehensive developer tools and documentation make it easily maintainable and extensible, while the Docker-based deployment ensures consistent operation across different environments.

For technical support or additional configuration options, please contact your system administrator.


Note: Some features may be enabled/disabled based on administrator settings. Please check with your system administrator for specific configuration details.

Last updated