# ElizaOS Developer Update - October 22, 2025

## Core Framework

The ElizaOS framework architecture has undergone significant changes this week, particularly with the completion of our token migration infrastructure. Key updates include:

- **UUID-Based Agent Identification**: We've completed the migration to a UUID-only system for agent identity, allowing duplicate agent names while maintaining unique identification through randomly generated UUIDs. The changes affect core runtime, server, and SQL plugin layers with relevant database migrations.

```typescript
// Example of how agents are now identified in the system
const agent = {
  id: 'f8d7e9c2-3b5a-4f62-9a81-6d8e7f2c1b3a', // UUID-based identity
  name: 'Shopping Assistant', // No longer unique constraint
  // ...other properties
};
```

- **Message Service Architecture**: Added a pluggable `IMessageService` interface with default implementation, centralizing message handling, deletion, and channel clearing. This improves runtime stability and provides a cleaner architecture for handling different message types.

- **Port Autodiscovery**: Enhanced server initialization with automatic fallback to available ports when encountering `EADDRINUSE` errors:

```typescript
// Server will now attempt to find the next available port
try {
  await server.listen(port);
} catch (err) {
  if (err.code === 'EADDRINUSE') {
    logger.warn(`Port ${port} in use, trying ${port + 1}...`);
    await server.listen(port + 1);
    process.env.SERVER_PORT = String(port + 1);
  } else {
    throw err;
  }
}
```

## New Features

### 1. Direct Text Generation API

We've implemented the long-requested `generateText()` Promise-based API, providing a more intuitive method for simple text generation without requiring complex conversation handling:

```typescript
// Example usage
const response = await agent.generateText("What's the weather like in San Francisco?");
console.log(response); // Direct text response from the model

// With options
const customResponse = await agent.generateText("Summarize this article", {
  maxTokens: 200,
  temperature: 0.7,
  // Other model parameters
});
```

### 2. Streamdown Integration

Added [Streamdown](https://github.com/streamdown/streamdown) for enhanced AI response rendering with streaming support, providing a consistent visual experience across all interfaces:

```tsx
import { AiResponse } from './components/ai-elements/response';

// Replace legacy Markdown components
<AiResponse content={message.content} streaming={message.streaming} />
```

### 3. Cross-Platform Cryptography

Introduced a unified crypto interface that works across browser and Node.js environments:

```typescript
import { hashString, encrypt, decrypt } from './utils/crypto-compat';

// Browser and Node.js compatible operations
const hash = await hashString('sensitive data');
const encrypted = await encrypt('secret message', 'password');
const decrypted = await decrypt(encrypted, 'password');
```

## Bug Fixes

### Token Migration Infrastructure

The planned AI16z to ElizaOS token migration has been a primary focus, with several critical fixes:

- Resolved security vulnerabilities in the migration contract (audited and verified)
- Fixed Phantom wallet connectivity issues on the migration page
- Added proper error handling for migration edge cases

The migration launch was delayed due to third-party dependency coordination but is now scheduled within the next 48 hours. We've improved our communication channels to ensure users stay informed.

### Embedding Service Optimization

Fixed a performance issue with large databases by making the embedding service optional when no TEXT_EMBEDDING model is registered:

```typescript
// Before: Always tried to create embeddings
await embeddingService.queueMessage(message);

// After: Only creates embeddings when a model is available
if (embeddingService.isEnabled()) {
  await embeddingService.queueMessage(message);
}
```

### Telegram Plugin Fixes

Patched the Telegram plugin to resolve Telagraf errors that occurred in production environments but not during local development:

```typescript
// Fixed issue with callback suppression
const bot = new Telegraf(token, {
  telegram: {
    apiRoot: customApiRoot || undefined
  }
});

// Properly register action handlers
this.bot.action(/.*/, this.handleCallbackQuery.bind(this));
```

## API Changes

### 1. Session API Enhancement

Added `channelId` to session API responses, making it easier for clients to track conversations:

```typescript
// Updated response format
{
  "session": {
    "id": "sess_123abc",
    "agentId": "agent_456def",
    "channelId": "channel_789ghi", // New field
    "createdAt": "2025-10-21T14:30:00Z"
  }
}
```

### 2. Route Type Expansion

Added PATCH method support to the Route type, allowing plugins to define PATCH endpoints:

```typescript
const routes: Route[] = [
  {
    method: 'PATCH', // Now supported
    path: '/api/resources/:id',
    handler: async (req, res) => {
      // Handle partial updates
    }
  }
];
```

### 3. Memory Pagination

Added database-level pagination to the `getMemories` function with `limit` and `offset` parameters:

```typescript
// Example usage
const recentMemories = await db.getMemories({
  agentId: 'agent-123',
  limit: 10,
  offset: 0 // Skip first 0 entries (page 1)
});

const nextPage = await db.getMemories({
  agentId: 'agent-123',
  limit: 10,
  offset: 10 // Skip first 10 entries (page 2)
});
```

## Social Media Integrations

Twitter/X integration is now fully functional. Users have reported successful deployments of Twitter agents using our platform. We're continuing to monitor performance and gathering feedback for further improvements.

The Telegram plugin has received several important fixes:

- Resolved GIF animation issues in messages
- Fixed deployment challenges on DigitalOcean and Railway
- Added proper support for suppressing bootstrap callbacks in favor of custom action handlers

## Model Provider Updates

OpenRouter has announced a new stealth model called "Andromeda-alpha" for image and visual understanding. We're evaluating its capabilities for potential integration into our platform.

A community request for integrating the `n1n.ai` API as a model provider has been submitted. This integration would expand our framework's access to a wide range of large language models and multimodal capabilities.

## Breaking Changes

As we continue to refine our V2 architecture, be aware of the following changes that might impact your migration from V1:

1. **Agent Identification**: Agents now use UUIDs for identity rather than names. If you've been relying on agent names as unique identifiers, you'll need to update your code to use `agent.id` instead.

2. **CLI Deployment System**: Completely migrated from traditional Docker image builds to a modern bootstrapper architecture, significantly improving deployment speed and reducing resource usage:

```bash
# Old (no longer works)
elizaos deploy --use-docker --tag my-image:v1

# New (default behavior)
elizaos deploy
```

3. **Character Schema Changes**: The character schema now includes comprehensive validation with detailed Zod schemas. Review your character definitions to ensure compliance with the enhanced validation.

If you encounter any issues with these changes, please refer to our updated documentation or reach out to our support team on Discord.