# ElizaOS Developer Update - May 30, 2025

## 1. Core Framework

The ElizaOS v2 (now officially referred to as 1.0.0) is scheduled for release today after extensive development. This release represents a significant transformation from responsive agents to intelligent agents capable of planning, coordinating, and executing complex operations across blockchains.

Key architectural improvements include:

- **Multi-client and multi-chain capabilities** with a unified wallet solution that supports multiple chains and clients
- **Enhanced RAG pipeline** with a faster and more efficient memory system for improved agent intelligence
- **Multi-repo/org support** through a significant refactor (issue #108) by jin
- **Service registry pattern** ([PR #4719](https://github.com/elizaos/eliza/pull/4719)) allowing external plugins to have typed services referenced elsewhere

The team has also improved environment variable handling by merging process.env variables into .env files:

```bash
# Environment files are now properly resolved across both development and server environments
# PR #4806 addressed issues with server hosting environments
# PR #4752 fixed .env hoisting in non-monorepo directories
```

## 2. New Features

### WebSocket-based Log Streaming

[PR #4765](https://github.com/elizaos/eliza/pull/4765) implements real-time log streaming with a live mode toggle:

```javascript
// Client-side implementation of WebSocket log consumer
const logSocket = new WebSocket(`ws://${window.location.host}/api/logs/stream`);
logSocket.onmessage = (event) => {
  const logs = JSON.parse(event.data);
  // Process and display logs in real-time
};
```

### Comprehensive Image and Video Chat Support

[PR #4750](https://github.com/elizaos/eliza/pull/4750) adds full support for image and video handling:

```javascript
// Example of handling image content in messages
const handleImageMessage = async (message) => {
  if (message.content?.imageUrl) {
    // Process, display, and analyze image content
    const imageDescription = await getImageDescription(message.content.imageUrl);
    return { ...message, imageAnalysis: imageDescription };
  }
  return message;
};
```

### PDF Document Processing for RAG

[PR #4611](https://github.com/elizaos/eliza/pull/4611) enables extraction and embedding of PDF content:

```javascript
// Extract text from PDF files for knowledge processing
import { getDocument } from 'pdfjs-dist';

export async function extractPdfText(buffer) {
  const pdf = await getDocument({ data: buffer }).promise;
  let text = '';
  for (let i = 1; i <= pdf.numPages; i++) {
    const page = await pdf.getPage(i);
    const content = await page.getTextContent();
    text += content.items.map(item => item.str).join(' ');
  }
  return text;
}
```

## 3. Bug Fixes

### API Key Configuration Issues

Users reported problems with API key configuration causing crashes after several chats. Investigation revealed that ElizaOS requires both OpenAI and Anthropic API keys to function properly:

```javascript
// Fix implemented in PR #4557
// Sets community manager to use plugin-local-ai out of the box
export function checkApiKeyConfiguration() {
  // Now properly validates both OpenAI and Anthropic keys
  // Falls back to local-ai when external API keys aren't available
}
```

### Environment Variable Resolution

[PR #4806](https://github.com/elizaos/eliza/pull/4806) fixed a critical issue where server hosting environments were ignoring secrets:

```javascript
// Before: CLI created a new .env file and only loaded from that
// After: Merges process.env values into the .env file
const mergedEnv = {
  ...dotenv.parse(fs.readFileSync(envPath)),
  ...process.env
};
```

### SyntaxError in Beta Version

A technical error was reported in the new beta version showing a SyntaxError related to duplicate identifier 'pkg' declarations in @elizaos/core. This has been addressed in the final release.

## 4. API Changes

### Room and Agent Endpoints

Several API improvements have been implemented:

```typescript
// New API endpoint for creating rooms (PR #4647)
app.post('/api/agents/:agentId/rooms', async (req, res) => {
  const { agentId } = req.params;
  const { name, description } = req.body;
  // Creates a new room and returns the room ID
});

// Get rooms per agent (PR #4677)
app.get('/api/agents/:agentId/rooms', async (req, res) => {
  const { agentId } = req.params;
  // Returns all rooms where agent is a participant
});

// Fixed missing agentId in room creation (PR #4796)
// Now properly lists rooms in the UI
```

### Message API Enhancements

[PR #4637](https://github.com/elizaos/eliza/pull/4637) allows world selection in message API:

```typescript
// Added optional worldId query param
app.post('/api/agents/:agentId/message', async (req, res) => {
  const { agentId } = req.params;
  const { worldId } = req.query; // <-- New optional parameter
  const { message } = req.body;
  
  // Records worldId in created memories
});
```

## 5. Social Media Integrations

### Twitter Plugin Improvements

[PR #4429](https://github.com/elizaos/eliza/pull/4429) introduces Twitter timeline functionality:

```javascript
// Configuration for Twitter timeline interaction
// Environment variables to enable timeline monitoring
TWITTER_TIMELINE_ENABLED=true
TWITTER_TIMELINE_INTERVAL=900000  // Check every 15 minutes
TWITTER_TIMELINE_MAX_TWEETS=10    // Process 10 tweets per check
```

[PR #4706](https://github.com/elizaos/eliza/pull/4706) improves tweet text formatting with double newlines between sentences for better readability.

Users have reported issues with a Twitter agent filter that prevents replies to replies. The team is evaluating whether to remove this filter:

```javascript
// Current behavior
.filter((tweet) => tweet.username !== twitterUsername)
```

### Discord Service Improvements

[PR #4450](https://github.com/elizaos/eliza/pull/4450) fixed timeout issues during Discord agent unregistration:

```javascript
// Properly handles timeout cancellation when stopping Discord service
clearTimeout(this.pingTimerId);
this.pingTimerId = null;
```

Community members have requested reply functionality for the Discord plugin similar to the Slack implementation, which is being considered for future development.

## 6. Model Provider Updates

### OpenAI Plugin

[PR #4438](https://github.com/elizaos/eliza/pull/4438) enhances credit usage tracking:

```typescript
// Added model usage events for previously untracked models
emitModelUsageEvent({
  model: "text-embedding-ada-002",
  provider: "openai",
  tokens: {
    prompt: text.length / 4, // Approximation for embedding tokens
    completion: 0,
    total: text.length / 4
  }
});
```

[PR #4421](https://github.com/elizaos/eliza/pull/4421) adds support for custom embedding endpoints:

```bash
# New environment variable to specify separate endpoint for embedding requests
OPENAI_EMBEDDING_API_BASE_URL=https://custom-embedding-endpoint.example.com/v1
```

### Anthropic Integration

Anthropic prompt engineering best practices for Claude 4 were mentioned as a resource for implementation with ElizaOS. The system now better supports Claude 4's advanced capabilities.

### AI/ML API Provider

[PR #4828](https://github.com/elizaos/eliza/pull/4828) added support for a new AI/ML API model provider, expanding available model options.

## 7. Breaking Changes

### V1 to V2 Migration Issues

When migrating from V1 to V2, be aware of the following breaking changes:

1. **Plugin structure changes**: Many plugins have been moved out of the monorepo to dedicated repositories:
   - `plugin-twitter` → [github.com/elizaos-plugins/plugin-twitter](https://github.com/elizaos-plugins/plugin-twitter)
   - `plugin-discord` → [github.com/elizaos-plugins/plugin-discord](https://github.com/elizaos-plugins/plugin-discord)
   - `plugin-farcaster` → [github.com/elizaos-plugins/plugin-farcaster](https://github.com/elizaos-plugins/plugin-farcaster)

2. **Knowledge management**: Knowledge functionality has been moved from runtime to the dedicated plugin-knowledge:

```bash
# Install the knowledge plugin to maintain RAG functionality
npx elizaos plugins install @elizaos/plugin-knowledge
```

3. **Environment variables**: Global env support has been removed in favor of project-local .env files:

```bash
# Update your .env files to include all necessary configuration
# Use the new PGLITE_DATA_DIR configuration for database location
```

4. **API endpoints restructured**: Some API endpoints have changed, requiring updates to client code:

```javascript
// Old way to get agent rooms
fetch(`/api/agents?rooms=true`)

// New way to get agent rooms
fetch(`/api/agents/${agentId}/rooms`)
```

The team recommends thoroughly testing your agents with V2 before full migration, as some agent behavior may differ due to improvements in the message handling system.