Additional Features

Extended capabilities and integrations in ExtendedLM

PDF Processing

ExtendedLM includes powerful PDF processing capabilities for document analysis and extraction.

PDF Upload & Analysis

Upload and analyze PDF documents with automatic text extraction and processing.

Features

  • Text Extraction: Extract text from any PDF
  • OCR Support: Extract text from scanned PDFs using Tesseract.js
  • Image Extraction: Extract embedded images
  • Table Detection: Identify and extract tables
  • Metadata Extraction: Author, title, creation date, etc.
  • RAG Integration: Automatic chunking and embedding for retrieval
  • PDF Viewer: Embedded viewer with highlighting

PDF Reading Agent

Specialized agent for PDF document analysis:

// PDF Reading Agent
// File: app/lib/agents/pdf-reading-agent.ts

const pdfReadingAgent = {
  name: 'PDF Reading Agent',
  description: 'Analyzes and extracts information from PDF documents',

  tools: [
    'pdf_extract_text',
    'pdf_extract_tables',
    'pdf_search',
    'pdf_summarize',
  ],

  async processQuery(query: string, pdfId: string) {
    // Load PDF content
    const pdf = await loadPDF(pdfId);

    // Extract relevant sections based on query
    const relevantChunks = await retrieveRelevantChunks(query, pdf);

    // Generate response with citations
    const response = await generateResponseWithCitations(
      query,
      relevantChunks
    );

    return response;
  },
};

Translation Services

Multi-language support with AI-powered translation.

Translation Agent

Specialized agent for high-quality translations:

// Translation Agent
// File: app/lib/agents/translation-agent.ts

interface TranslationRequest {
  text: string;
  sourceLang: string;
  targetLang: string;
  context?: string;
  preserveFormatting?: boolean;
}

export async function translate(request: TranslationRequest) {
  const systemPrompt = `You are an expert translator.
Translate the following text from ${request.sourceLang} to ${request.targetLang}.

Context: ${request.context || 'General translation'}

Important:
- Maintain natural, fluent language
- Preserve technical terms appropriately
- ${request.preserveFormatting ? 'Preserve all formatting (markdown, code blocks, etc.)' : ''}
- Adapt cultural references when necessary`;

  const response = await generateCompletion({
    model: 'gpt-4o',
    messages: [
      { role: 'system', content: systemPrompt },
      { role: 'user', content: request.text },
    ],
  });

  return response.content;
}

Supported Languages

  • English (EN)
  • Japanese (JA)
  • Chinese Simplified (ZH-CN)
  • Chinese Traditional (ZH-TW)
  • Korean (KO)
  • Spanish (ES)
  • French (FR)
  • German (DE)
  • Italian (IT)
  • Portuguese (PT)
  • Russian (RU)
  • Arabic (AR)
  • Hindi (HI)
  • + 50 more languages

Translation Features

  • Context-aware: Understands domain-specific terminology
  • Format Preservation: Maintains Markdown, code blocks, etc.
  • Batch Translation: Translate multiple messages at once
  • Translation Memory: Consistent terminology across translations
  • Quality Estimation: Confidence scores for translations

Weather Integration

Real-time weather data and forecasts via Weather Agent.

Weather Agent

// Weather Agent
// File: app/lib/agents/weather-agent.ts

import { OpenWeatherMapAPI } from '@/lib/weather-api';

const weatherTools = [
  {
    name: 'get_current_weather',
    description: 'Get current weather for a location',
    parameters: {
      type: 'object',
      properties: {
        location: {
          type: 'string',
          description: 'City name or coordinates',
        },
        units: {
          type: 'string',
          enum: ['metric', 'imperial'],
          default: 'metric',
        },
      },
      required: ['location'],
    },
  },
  {
    name: 'get_forecast',
    description: 'Get weather forecast for next 5 days',
    parameters: {
      type: 'object',
      properties: {
        location: { type: 'string' },
        days: { type: 'number', minimum: 1, maximum: 5 },
      },
      required: ['location'],
    },
  },
];

export async function getCurrentWeather(location: string, units = 'metric') {
  const api = new OpenWeatherMapAPI(process.env.OPENWEATHER_API_KEY);
  const weather = await api.getCurrentWeather(location, units);

  return {
    location: weather.name,
    temperature: weather.main.temp,
    feels_like: weather.main.feels_like,
    humidity: weather.main.humidity,
    description: weather.weather[0].description,
    wind_speed: weather.wind.speed,
    icon: weather.weather[0].icon,
  };
}

Weather Features

  • Current Weather: Real-time conditions for any location
  • 5-Day Forecast: Extended weather predictions
  • Hourly Forecast: Hour-by-hour predictions
  • Weather Alerts: Severe weather warnings
  • Air Quality: AQI and pollutant levels
  • UV Index: UV radiation levels
  • Sunrise/Sunset: Solar position data

SSH Terminal

Browser-based SSH terminal for remote server access.

Terminal Interface

// SSH Terminal component
// File: app/components/Terminal/SSHTerminal.tsx

import { Terminal } from 'xterm';
import { FitAddon } from 'xterm-addon-fit';
import { WebLinksAddon } from 'xterm-addon-web-links';

export function SSHTerminal({ connectionId }: { connectionId: string }) {
  const terminalRef = useRef(null);
  const terminal = useRef();
  const socket = useRef();

  useEffect(() => {
    // Initialize xterm.js
    terminal.current = new Terminal({
      cursorBlink: true,
      fontSize: 14,
      fontFamily: 'JetBrains Mono, monospace',
      theme: {
        background: '#1e1e1e',
        foreground: '#d4d4d4',
      },
    });

    const fitAddon = new FitAddon();
    terminal.current.loadAddon(fitAddon);
    terminal.current.loadAddon(new WebLinksAddon());

    terminal.current.open(terminalRef.current!);
    fitAddon.fit();

    // Connect to SSH WebSocket
    socket.current = new WebSocket(
      `ws://localhost:3000/api/ssh/connect/${connectionId}`
    );

    socket.current.onmessage = (event) => {
      terminal.current?.write(event.data);
    };

    terminal.current.onData((data) => {
      socket.current?.send(data);
    });

    return () => {
      socket.current?.close();
      terminal.current?.dispose();
    };
  }, [connectionId]);

  return <div ref={terminalRef} className="terminal-container" />;
}

Features

  • Full Terminal Emulation: xterm.js-based terminal
  • Multiple Sessions: Manage multiple SSH connections
  • Tab Support: Switch between terminal tabs
  • Copy/Paste: Clipboard integration
  • Saved Connections: Store frequently used connections
  • SFTP Support: File transfer via SFTP
  • Port Forwarding: SSH tunnel configuration

Speech Features

Voice input and text-to-speech capabilities.

Speech-to-Text

// Voice input using Whisper API
// File: app/components/Chat/VoiceInput.tsx

export function VoiceInput({ onTranscript }: { onTranscript: (text: string) => void }) {
  const [isRecording, setIsRecording] = useState(false);
  const mediaRecorder = useRef();
  const audioChunks = useRef([]);

  const startRecording = async () => {
    const stream = await navigator.mediaDevices.getUserMedia({ audio: true });
    mediaRecorder.current = new MediaRecorder(stream);

    mediaRecorder.current.ondataavailable = (event) => {
      audioChunks.current.push(event.data);
    };

    mediaRecorder.current.onstop = async () => {
      const audioBlob = new Blob(audioChunks.current, { type: 'audio/webm' });
      audioChunks.current = [];

      // Send to Whisper API
      const formData = new FormData();
      formData.append('file', audioBlob, 'audio.webm');
      formData.append('model', 'whisper-1');

      const response = await fetch('/api/speech/transcribe', {
        method: 'POST',
        body: formData,
      });

      const { text } = await response.json();
      onTranscript(text);
    };

    mediaRecorder.current.start();
    setIsRecording(true);
  };

  const stopRecording = () => {
    mediaRecorder.current?.stop();
    setIsRecording(false);
  };

  return (
    <button
      onMouseDown={startRecording}
      onMouseUp={stopRecording}
      className={isRecording ? 'recording' : ''}
    >
      {isRecording ? '🔴 Recording...' : '🎤 Hold to speak'}
    </button>
  );
}

Text-to-Speech

// TTS using OpenAI TTS API
// File: app/lib/tts.ts

export async function synthesizeSpeech(
  text: string,
  voice: 'alloy' | 'echo' | 'fable' | 'onyx' | 'nova' | 'shimmer' = 'nova'
) {
  const response = await fetch('/api/speech/synthesize', {
    method: 'POST',
    headers: { 'Content-Type': 'application/json' },
    body: JSON.stringify({ text, voice, model: 'tts-1-hd' }),
  });

  const audioBlob = await response.blob();
  const audioUrl = URL.createObjectURL(audioBlob);

  const audio = new Audio(audioUrl);
  await audio.play();

  return audio;
}

Features

  • Whisper Integration: High-quality speech recognition
  • Multi-language Support: 50+ languages for transcription
  • TTS Voices: 6 natural-sounding voices (Alloy, Echo, Fable, Onyx, Nova, Shimmer)
  • Continuous Listening: Voice activity detection
  • Noise Reduction: Filter background noise
  • Auto-punctuation: Automatic punctuation in transcripts

Screen Capture

Capture screenshots and screen recordings for analysis.

Screenshot Capture

// Screen capture using Screen Capture API
// File: app/components/ScreenCapture.tsx

export async function captureScreen() {
  try {
    const stream = await navigator.mediaDevices.getDisplayMedia({
      video: { mediaSource: 'screen' },
    });

    const video = document.createElement('video');
    video.srcObject = stream;
    await video.play();

    const canvas = document.createElement('canvas');
    canvas.width = video.videoWidth;
    canvas.height = video.videoHeight;

    const ctx = canvas.getContext('2d');
    ctx?.drawImage(video, 0, 0);

    stream.getTracks().forEach((track) => track.stop());

    return canvas.toDataURL('image/png');
  } catch (error) {
    console.error('Screen capture failed:', error);
    throw error;
  }
}

Features

  • Full Screen Capture: Capture entire screen
  • Window Capture: Capture specific window
  • Tab Capture: Capture browser tab
  • Annotation Tools: Draw on screenshots before sending
  • Vision Analysis: Automatically analyze with vision models
  • OCR: Extract text from screenshots

Notebook & Memo System

Organize notes, code snippets, and research in structured notebooks.

Notebook Structure

// Notebook data model
// File: app/types/notebook.ts

interface Notebook {
  id: string;
  title: string;
  description?: string;
  created_at: string;
  updated_at: string;
  user_id: string;
  folder_id?: string;
  tags: string[];
  sections: Section[];
}

interface Section {
  id: string;
  title: string;
  order: number;
  cells: Cell[];
}

interface Cell {
  id: string;
  type: 'markdown' | 'code' | 'ai-generated';
  content: string;
  language?: string;
  outputs?: CellOutput[];
  metadata?: Record;
}

interface CellOutput {
  type: 'text' | 'image' | 'table' | 'error';
  data: any;
}

Features

  • Markdown Cells: Rich text with Markdown
  • Code Cells: Executable code with syntax highlighting
  • AI-generated Cells: Save AI responses as notebook cells
  • Sections: Organize into collapsible sections
  • Tags: Tag and categorize notebooks
  • Search: Full-text search across notebooks
  • Export: Export as Markdown, PDF, or Jupyter Notebook
  • Collaboration: Share notebooks with team

Quick Notes

Lightweight memo system for quick captures:

  • Scratch Pad: Temporary notes that auto-save
  • Voice Memos: Record voice notes with transcription
  • Clipper: Save interesting messages from conversations
  • Templates: Pre-defined note templates

Schedule Manager

Integrated calendar and task management via MCP cal2prompt.

Calendar Integration

// Calendar MCP integration
// File: mcp-servers/cal2prompt/index.ts

export const calendarTools = [
  {
    name: 'get_calendar_events',
    description: 'Get calendar events for a date range',
    inputSchema: {
      type: 'object',
      properties: {
        start_date: { type: 'string', format: 'date' },
        end_date: { type: 'string', format: 'date' },
        calendar_ids: { type: 'array', items: { type: 'string' } },
      },
      required: ['start_date', 'end_date'],
    },
  },
  {
    name: 'create_event',
    description: 'Create a new calendar event',
    inputSchema: {
      type: 'object',
      properties: {
        title: { type: 'string' },
        start: { type: 'string', format: 'date-time' },
        end: { type: 'string', format: 'date-time' },
        description: { type: 'string' },
        location: { type: 'string' },
        attendees: { type: 'array', items: { type: 'string' } },
      },
      required: ['title', 'start', 'end'],
    },
  },
];

Features

  • Calendar View: Month, week, day views
  • Event Creation: Natural language event creation ("Schedule meeting with John tomorrow at 2pm")
  • Reminders: Set reminders for events
  • Recurring Events: Daily, weekly, monthly patterns
  • Time Zone Support: Multi-timezone event scheduling
  • Conflict Detection: Warn about scheduling conflicts
  • Calendar Sync: Sync with Google Calendar, Outlook, etc.

Task Management

  • Task Lists: Create and organize tasks
  • Subtasks: Break down complex tasks
  • Due Dates: Set deadlines with reminders
  • Priority Levels: High, medium, low priority
  • Task Dependencies: Link related tasks
  • AI Suggestions: AI recommends task breakdowns and time estimates

Storage Manager

File storage and management powered by Supabase Storage.

File Upload

Upload files with drag-and-drop interface and automatic organization.

Storage Features

  • File Browser: Navigate uploaded files
  • Drag & Drop: Easy file uploads
  • Folders: Organize files into folders
  • File Preview: Preview images, PDFs, text files
  • Sharing: Generate shareable links with expiration
  • Access Control: Secure file permissions
  • Versioning: Keep file versions
  • Bulk Operations: Upload, download, delete multiple files

Storage Buckets

  • avatars: User profile pictures
  • attachments: Message attachments
  • documents: RAG documents
  • exports: Exported conversations and workflows
  • uploads: General user uploads

Admin Dashboard

Administrative interface for platform management.

User Management

// Admin user management
// File: app/admin/users/page.tsx

export default function AdminUsers() {
  const [users, setUsers] = useState<User[]>([]);

  useEffect(() => {
    loadUsers();
  }, []);

  async function loadUsers() {
    const response = await fetch('/api/admin/users');
    const data = await response.json();
    setUsers(data.users);
  }

  return (
    <div className="admin-panel">
      <h1>User Management</h1>

      <table>
        <thead>
          <tr>
            <th>Email</th>
            <th>Name</th>
            <th>Created</th>
            <th>Usage</th>
            <th>Actions</th>
          </tr>
        </thead>
        <tbody>
          {users.map((user) => (
            <UserRow key={user.id} user={user} />
          ))}
        </tbody>
      </table>
    </div>
  );
}

Admin Features

  • User Management: View, edit, suspend users
  • Usage Analytics: Track token usage, API calls, storage
  • Model Configuration: Configure available models and providers
  • System Monitoring: Monitor Gateway, database, queues
  • Logs Viewer: View application and error logs
  • Billing: Manage subscriptions and payments
  • Feature Flags: Enable/disable features per user
  • Rate Limiting: Configure rate limits per user/tier

Analytics Dashboard

  • User Metrics: Active users, retention, engagement
  • Usage Metrics: Messages sent, tokens consumed, storage used
  • Model Metrics: Model usage distribution, latency, errors
  • Cost Tracking: API costs per model/user
  • Performance Metrics: Response time, uptime, error rates

Widget & Embed

Embeddable chat widget for integrating ExtendedLM into external websites.

Widget Installation

<!-- Add to your website -->
<script>
  (function() {
    var script = document.createElement('script');
    script.src = 'https://extendedlm.com/widget.js';
    script.async = true;
    script.onload = function() {
      ExtendedLM.init({
        apiKey: 'YOUR_API_KEY',
        position: 'bottom-right',
        theme: 'light',
        welcomeMessage: 'How can I help you today?',
      });
    };
    document.head.appendChild(script);
  })();
</script>

Widget Configuration

// Widget configuration options
interface WidgetConfig {
  // Required
  apiKey: string;

  // Appearance
  position?: 'bottom-right' | 'bottom-left' | 'top-right' | 'top-left';
  theme?: 'light' | 'dark' | 'auto';
  primaryColor?: string;
  borderRadius?: number;

  // Behavior
  welcomeMessage?: string;
  placeholder?: string;
  autoOpen?: boolean;
  persistConversation?: boolean;

  // Agent settings
  agent?: string;
  model?: string;
  temperature?: number;

  // UI customization
  showBranding?: boolean;
  customCSS?: string;
  avatar?: string;

  // Callbacks
  onMessage?: (message: Message) => void;
  onOpen?: () => void;
  onClose?: () => void;
}

Widget Features

  • Responsive Design: Works on desktop and mobile
  • Themable: Match your website's design
  • Persistent Chat: Conversations saved across sessions
  • Custom Branding: Add your logo and colors
  • Callbacks: React to widget events
  • Multi-language: Automatic language detection
  • Analytics: Track widget usage and engagement

iframe Embed

Full-page embed for integrating into dashboards:

<iframe
  src="https://extendedlm.com/embed?apiKey=YOUR_API_KEY&theme=light"
  width="100%"
  height="600px"
  frameborder="0"
  allow="microphone; clipboard-write"
></iframe>

Export & Import

Export conversations, workflows, and settings for backup or migration.

Export Formats

  • JSON: Complete data with metadata
  • Markdown: Readable conversation format
  • PDF: Formatted PDF with syntax highlighting
  • HTML: Standalone HTML page
  • CSV: Tabular data export

Export Functionality

Export conversations and data in multiple formats including JSON, Markdown, PDF, and HTML.

Import Features

  • Conversation Import: Import from JSON or Markdown
  • Workflow Import: Import workflow definitions
  • Settings Import: Restore settings from backup
  • Bulk Import: Import multiple items at once
  • Migration Tools: Migrate from ChatGPT, Claude, etc.

Third-Party Integrations

ExtendedLM integrates with popular services and platforms.

Available Integrations

Communication:
  • Slack - Send messages, create channels
  • Discord - Bot integration
  • Microsoft Teams - Chat integration
Productivity:
  • Google Workspace - Gmail, Drive, Calendar
  • Microsoft 365 - Outlook, OneDrive, Calendar
  • Notion - Database integration
  • Trello - Board and card management
Development:
  • GitHub - Repository access, PR creation
  • GitLab - CI/CD integration
  • Jira - Issue tracking
Smart Home:
  • SwitchBot - Device control (via MCP)
  • Philips Hue - Lighting control
  • Home Assistant - Home automation
Data & Analytics:
  • Google Analytics - Data retrieval
  • Mixpanel - Event tracking
  • Tableau - Visualization

Integration via MCP

Create custom integrations using Model Context Protocol for connecting external services and APIs.