# ElizaOS Developer Update
**Week of October 14-20, 2025**

## 1. Core Framework

We've made significant architectural improvements to the ElizaOS framework this week, focusing on message handling, runtime flexibility, and agent identification:

### Message Service Refactoring
The core framework now features a pluggable message service architecture with the introduction of `IMessageService` and `DefaultMessageService` implementations. This centralizes message deletion, channel clearing, and response logic, providing a more consistent API surface:

```typescript
// New MessageService interface
export interface IMessageService {
  sendMessage(message: MessageToSend): Promise<Message>;
  deleteMessage(messageId: string, channelId?: string): Promise<void>;
  clearChannel(channelId: string): Promise<void>;
  // Additional methods...
}
```

### UUID-Based Agent Identification
We've migrated to UUID-only agent identification, allowing duplicate agent names for the first time:

```typescript
// Old approach (name-based identification)
const agentId = stringToUuid(character.name);

// New approach (random UUID generation)
const agentId = character.id || uuidv4();
```

This change affects runtime, database, and server layers, with migrations ensuring backward compatibility. You can now create multiple agents with the same name but different UUIDs.

### Character Builder Consolidation
We've moved `buildCharacterPlugins()` functionality from CLI and server packages into the core, standardizing how character configurations are constructed and reducing duplication:

```typescript
// Now available in core
import { buildCharacterPlugins } from '@elizaos/core';

const plugins = buildCharacterPlugins(character, options);
```

## 2. New Features

### Promise-Based Text Generation API
We've implemented a new `generateText()` API for simple text generation tasks, addressing a long-standing community request (Issue #5923):

```typescript
import { generateText } from '@elizaos/core';

// Simple promise-based API for generating text
const response = await generateText({
  runtime,
  input: "What's the capital of France?",
  options: {
    model: "gpt-4",
    temperature: 0.7,
    includeCharacter: false // Optional: generate without character personality
  }
});

console.log(response); // "The capital of France is Paris."
```

### Background Evaluator Execution
Evaluators now run asynchronously with robust error handling and logging, preventing them from blocking the main message flow:

```typescript
// In bootstrap plugin (simplified)
runtime.evaluateMessage(message).catch(err => {
  runtime.logger.error('Error running evaluators:', err);
});

// Continue processing without waiting
```

### Optional Embedding Service
The embedding service is now automatically disabled when no TEXT_EMBEDDING model is registered, reducing resource usage and simplifying configuration:

```typescript
// No need for explicit disabling - it auto-detects model availability
const embeddingModel = runtime.models.find(m => m.type === 'TEXT_EMBEDDING');
if (!embeddingModel) {
  // Service automatically becomes a no-op
  return;
}
```

### PATCH Method Support
Added support for PATCH HTTP method in the Route type:

```typescript
// Now supports all common HTTP methods
export type Method = 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH';
```

## 3. Bug Fixes

### Context Size Management
Fixed an issue where large message databases (1GB+) were causing context size errors with OpenAI. The problem was identified as duplicate character.ts files loading alongside custom agents, creating redundant context:

```typescript
// Previous behavior: Multiple character definitions in context
// character.ts from custom agent + character.ts from default

// Fixed behavior: Single character definition in context
// Uses proper module resolution to avoid duplicates
```

We've also added configurable message limits to the recentMessages provider to prevent these issues in the future.

### Session API Responses
Added missing channelId to session API responses, fixing an issue where WebSocket clients couldn't properly identify channel information:

```typescript
// Updated schema
export const SessionInfoResponse = z.object({
  id: z.string(),
  createdAt: z.string(),
  status: z.enum(['ACTIVE', 'CLOSED']),
  agentId: z.string(),
  channelId: z.string(), // Now included in response
  // ...
});
```

### Telegram Plugin Deployment
Fixed issues with the Telegram plugin in cloud deployments (DigitalOcean, Railway) where Telegraf-related errors were occurring despite working locally. The fix will be rolled out with the next plugin update.

## 4. API Changes

### Server Startup Unification
Server initialization has been standardized through a unified API:

```typescript
// New simplified server start method
import { AgentServer } from '@elizaos/server';

// Auto-initializes, resolves port, and optionally starts agents
const server = await AgentServer.start({
  port: process.env.SERVER_PORT || 3000,
  autoInitialize: true,
  startAgents: true
});
```

This replaces the previous approach involving separate PluginLoader and ConfigManager instances.

### Database Pagination
Added offset parameter to `getMemories()` for improved database-level pagination:

```typescript
// New pagination parameters
const memories = await database.getMemories({
  limit: 50,    // Maximum number of results
  offset: 100,  // Skip first 100 results
  // Other filters...
});
```

### Environment Configuration
Enhanced environment variable loading with better defaults and secrets handling:

```typescript
// Load from multiple sources with precedence
const config = loadEnvironment({
  dotEnvPath: './.env',           // Optional path to .env file
  processEnv: process.env,        // Current process environment
  secretsPath: './secrets.json',  // Optional secrets file
  prefix: 'ELIZA_'                // Optional prefix filter
});
```

## 5. Social Media Integrations

### Twitter/X Plugin Update
The Twitter plugin now requires a Basic subscription to the X API, as the free usage tier is deprecated and not recommended for serious applications due to rate limits:

```bash
# Installation of latest version
bun i @elizaos/plugin-twitter

# Required environment variables
X_API_KEY=your_api_key
X_API_SECRET=your_api_secret
X_ACCESS_TOKEN=your_access_token
X_ACCESS_SECRET=your_access_secret
```

Users attempting to use the free tier may encounter "too many requests" errors that can lead to permanent API bans.

### Telegram Image Handling
Issues were identified with image handling in the Telegram plugin (#18), specifically the inability to send images without rendering their URI. This will be fixed in an upcoming release.

## 6. Model Provider Updates

### Embedding Provider Optimizations
Made embedding services optional when no TEXT_EMBEDDING model is registered, improving performance for deployments that don't require vector search:

```typescript
// Plugin will automatically detect if embeddings are available
// No configuration changes needed
```

### n1n.ai Integration Request
A new issue (#6064) was opened requesting integration with n1n.ai as a model provider. This would expand access to a wide range of LLMs and multimodal capabilities. Interested developers can follow or contribute to this integration.

## 7. Breaking Changes

### Token Migration from AI16Z to ElizaOS
The migration from AI16Z to ElizaOS token is scheduled to begin on October 21st with a 90-day window for completion:

- Migration ratio: 1:6 (AI16Z to ElizaOS)
- Migrated tokens are immediately unlocked upon blockchain settlement
- Users have 90 days to complete the migration

Questions remain about exchange listings and wallet compatibility. More details will be provided as the launch proceeds.

### CLI Deployment Architecture Change
The ElizaOS CLI deployment system has been completely migrated from Docker image builds to a modern bootstrapper architecture:

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

# New (default behavior)
elizaos deploy

# With existing artifact
elizaos deploy --skip-artifact --artifact-path ./dist/artifact.tar.gz
```

This change significantly improves deployment speed, reduces resource usage, and eliminates platform size limitations. The new system creates lightweight tar.gz artifacts (typically <50MB vs 500MB+ Docker images) and uploads them to Cloudflare R2 via a secure API.

---

This update represents a significant step forward in ElizaOS's architecture, with major improvements to core systems, developer experience, and deployment capabilities. The team continues to focus on stability and performance as we approach the token migration.