# ElizaOS Developer Update - May 27, 2025

## Core Framework

The ElizaOS v2 release is imminent, scheduled for release within the week after being in development since November 2024. This represents a significant architectural improvement over v1, which is now considered merely a "proof of concept." The v2 release (also known as "eliza 1.0.0") will position ElizaOS to compete with other AI agent frameworks.

Recent PRs have focused on enhancing the framework architecture:
- **Knowledge Plugin**: Knowledge tab has been migrated to a dedicated plugin-knowledge module, adding graph view functionality for memories ([#4766](https://github.com/elizaos/eliza/pull/4766))
- **Service Registry**: Implemented a service registry pattern allowing external plugins to have typed services referenced elsewhere ([#4719](https://github.com/elizaos/eliza/pull/4719))
- **Environment Handling**: Unified environment resolution with `findNearestEnvFile` utility and improved database directory management ([#4686](https://github.com/elizaos/eliza/pull/4686), [#4497](https://github.com/elizaos/eliza/pull/4497))
- **Memory Management**: Enhanced APIs for world and room management to enable persistence across interfaces ([#4647](https://github.com/elizaos/eliza/pull/4647), [#4667](https://github.com/elizaos/eliza/pull/4667))
- **Message Handling**: Improved message processing flow with enhanced error handling and response formatting ([#4594](https://github.com/elizaos/eliza/pull/4594))

```typescript
// Example of new knowledge API integration
import { useKnowledge } from '@elizaos/plugin-knowledge';

// Access graph view of agent memories
const { getMemoryGraph } = useKnowledge();
const memoryNetwork = await getMemoryGraph(agentId);
```

## New Features

### Multi-Agent Systems & 3D Worlds
V2 will enable memory capture across multiple client interfaces, allowing multi-agents to interact in custom worlds with specific memory loading. This functionality was confirmed by a core team member:

```javascript
// Setting up multi-agents in a custom world
const customWorld = await createWorld({
  name: "Custom Environment",
  description: "A shared environment for multiple agents"
});

// Load agents with specific memories
await loadAgentsIntoWorld([agent1, agent2, agent3], customWorld.id, {
  loadSpecificMemories: true
});
```

### Comprehensive Media Support
Added complete image and video handling capabilities ([#4750](https://github.com/elizaos/eliza/pull/4750)):
- Support for image description generation with detailed analysis
- PDF RAG (Retrieval-Augmented Generation) support ([#4611](https://github.com/elizaos/eliza/pull/4611))
- Enhanced media handling in social media integrations

### UI/UX Improvements
- Added "agent is thinking..." animation UX in client chat ([#4778](https://github.com/elizaos/eliza/pull/4778))
- WebSocket-based log streaming with live mode toggle ([#4765](https://github.com/elizaos/eliza/pull/4765))
- Memory UI enhancements with improved visualization and editing ([#4761](https://github.com/elizaos/eliza/pull/4761))

### Official AI Agents
ElizaOS v2 will feature two official AI agents out of the box:
- **Eli5**: An agent designed for general assistance and explanation
- **Eddy**: A complementary agent with specific capabilities

Users will be able to interact with these directly in the terminal:
```bash
elizaos chat --agent eli5 --question "Explain the concept of agents in AI"
```

## Bug Fixes

Several critical bugs have been resolved in recent updates:

1. **Memory Persistence Issues**: Fixed issue with agent rooms API endpoint not returning data ([#4762](https://github.com/elizaos/eliza/issues/4762))

2. **Environment Variables**: Resolved LOG_LEVEL functionality issues across different settings ([#4772](https://github.com/elizaos/eliza/issues/4772))

3. **Plugin Loading**: Fixed critical errors in plugin initialization that prevented proper functionality:
   ```javascript
   // Previous error-prone loading:
   const loadPlugin = (name) => require(name);
   
   // New robust loading with error handling:
   const loadPlugin = async (name) => {
     try {
       const plugin = await import(name);
       logger.success(`Loaded plugin: ${name}`);
       return plugin;
     } catch (error) {
       logger.error(`Failed to load plugin ${name}: ${error.message}`);
       throw new PluginLoadError(name, error);
     }
   };
   ```

4. **Twitter Integration Issues**: Fixed client initialization problems that prevented tweet publishing ([#4777](https://github.com/elizaos/eliza/issues/4777))

5. **JSON Parsing**: Fixed issues with nested objects in JSON responses ([#4198](https://github.com/elizaos/eliza/pull/4198))

## API Changes

Significant changes have been made to several core APIs:

### Database API Improvements
```typescript
// Before: Single entity retrieval
const entity = await getEntityById(entityId);

// Now: Batch retrieval for better performance
const entities = await getEntitiesByIds([entityId1, entityId2]);
// Runtime still provides wrapper: getEntityById(id) => getEntitiesByIds([id])[0]
```

### World and Room Management
New API endpoints for managing worlds and rooms:
```typescript
// Create a new world
POST /api/worlds
{
  "name": "My Custom World",
  "description": "A world for my agents"
}

// Add rooms to a world
POST /api/worlds/:worldId/rooms
{
  "name": "Discussion Room"
}

// Get all rooms in a world
GET /api/worlds/:worldId/rooms
```

### Message Processing
Enhanced message API with world selection:
```typescript
// Send a message to an agent in a specific world
POST /api/agents/:agentId/message?worldId=world-123
{
  "message": "Hello, agent!"
}
```

## Social Media Integrations

### Twitter Plugin Enhancements
- Timeline interaction is now optional and configurable via environment variables 
- Improved tweet formatting with better text handling ([#4706](https://github.com/elizaos/eliza/pull/4706))
- Fixed issues with plugin-twitter versions where v.53 works while v.55 doesn't ([#4429](https://github.com/elizaos/eliza/pull/4429))

Sample configuration for Twitter timeline processing:
```text
# Enable timeline processing (optional, defaults to false)
TWITTER_PROCESS_TIMELINE=true

# Maximum tweets to process from timeline (optional, defaults to 10)
TWITTER_TIMELINE_MAX_TWEETS=20

# Timeline check interval in seconds (optional, defaults to 60)
TWITTER_TIMELINE_CHECK_INTERVAL=120
```

### New Structure for Social Plugins
Plugin structure has been refactored for better maintainability:
- Discord plugin: Moved to https://github.com/elizaos-plugins/plugin-discord
- Twitter plugin: Moved to https://github.com/elizaos-plugins/plugin-twitter
- Farcaster plugin: Moved to https://github.com/elizaos-plugins/plugin-farcaster
- Telegram plugin: Moved to https://github.com/elizaos-plugins/plugin-telegram

## Model Provider Updates

### Improved Multi-Provider Support
The agent runtime has been refactored to better support multiple providers and prioritization:
```typescript
// Updated ModelHandler type to include provider and priority
type ModelHandler = {
  id: string;
  provider: string;  // Added provider field
  priority?: number; // Optional priority for selection
  // ...other fields
};
```

### Plugin Architecture Changes
- **Local AI Support**: Community manager now defaults to using plugin-local-ai out of the box
- **OpenAI Plugin**: Extended to support custom embedding endpoint configuration
- **Model Usage Tracking**: Added events for embeddings and image description to track credit usage

```javascript
// Specify a separate endpoint for embedding requests
OPENAI_EMBEDDING_BASE_URL=https://custom-embeddings-endpoint.com/v1
```

## Breaking Changes

As ElizaOS moves from v1 to v2, several breaking changes have been introduced:

1. **Package Manager Switch**: ElizaOS has shifted from pnpm (used in v0/v1) to bun as the primary package manager

2. **Plugin Structure**: Many plugins have been moved from the monorepo to standalone repositories:
   ```
   // Old structure (in monorepo)
   @elizaos/plugin-twitter
   
   // New structure (standalone repositories)
   npm install @elizaos-plugins/plugin-twitter
   ```

3. **Multi-World Architecture**: Single world per runtime is now the default to enable cross-platform memory persistence

4. **Registry Endpoint Configuration**: Users need to point to registry.elizaos.com instead of the default

5. **Database Management**: Data directories are now created on a per-project basis:
   ```
   # Configure custom data directory (optional)
   PGLITE_DATA_DIR=./my-custom-data
   ```

When migrating from v1 to v2, be sure to update your dependencies, adjust environment configurations, and test integrations with the new plugin structure to ensure compatibility.