# ElizaOS Developer Update - May 19-26, 2025

## Core Framework
This week marks a significant milestone as the ElizaOS v2 release approaches, with final preparations underway for a possible launch next week. The development team has refined the architecture, notably transitioning from pnpm (used in v0/v1) to bun as the primary package manager.

Notable changes to the core framework include:

- The environment management system has been enhanced with improved path resolution for `.env` files. Users should now point to `registry.elizaos.com` as the primary registry endpoint.
- Cross-platform memory persistence is being considered as a feature to enable agents to maintain conversation context across different platforms (Discord/Twitter/Telegram).
- Daily contributor summaries are now available at `elizaos.github.io` to track development progress.

```typescript
// Example of using the improved environment variable resolution
// Through the unified findNearestEnvFile utility
import { findNearestEnvFile } from '../utils';

const envPath = findNearestEnvFile(projectPath);
// Now properly handles project-specific configurations
```

## New Features

### Full Media Support
Comprehensive image and video chat support has been implemented with PR #4750, allowing users to share media content that gets properly displayed and processed by AI models. This represents a significant enhancement to the user experience.

### Improved Agent Components
The agent-related components in the client package have been significantly enhanced with PR #4764, improving both functionality and user experience. The changes include component restructuring, renaming and enhancing components for better reusability.

### Memory UI Enhancements
PR #4761 brings substantial improvements to the memory management interface with enhanced UI components, better user experience, and cleaner visual design across the memory viewer and edit overlay.

### WebSocket-based Log Streaming
Real-time WebSocket-based log streaming has been added to the log viewer (PR #4765) with intelligent fallback to API polling. When the live mode toggle is enabled, the system automatically uses WebSocket streaming for instant log updates, with a seamless fallback to traditional polling when WebSockets aren't available.

### TEE Starter Project
A new Trusted Execution Environment (TEE) Starter Project has been introduced, helping developers launch ElizaOS agents running in a TEE on Phala Network, including an example of writing a TEE plugin using the Dstack SDK with Docker support.

## Bug Fixes

### Undelegate Action Fix (PR #4771)
A critical bug in the Polygon plugin's Undelegate Action has been fixed:

```typescript
// Before: Incorrect handling of delegation parameters
async function undelegateAction(runtime: AgentRuntime, params: any) {
  // Missing validation and proper parameter extraction
  return await sendTransaction(params);
}

// After: Proper parameter validation and extraction
async function undelegateAction(runtime: AgentRuntime, params: UndelegateParams) {
  validateRequiredParams(params, ['validatorAddress', 'amount']);
  const { validatorAddress, amount } = params;
  
  const result = await sendTransaction({
    type: 'undelegate',
    validatorAddress,
    amount: normalizeAmount(amount)
  });
  
  return {
    success: result.status === 'success',
    txHash: result.txHash,
    message: result.message || 'Undelegation successful'
  };
}
```

### LOG_LEVEL Environmental Variable
The `LOG_LEVEL` environment variable stopped working since beta57 of the CLI/core. The current workaround is to use:

```bash
LOG_LEVEL=debug elizaos start
```

A proper fix is being worked on to restore functionality in upcoming releases.

### Twitter Integration Issues
Multiple users reported problems with Twitter integration:
- Cloudflare errors during login requiring manual cookie setup
- Duplicate actions (both replying and quoting the same tweet)

The recommended workaround for the Cloudflare issue is to set up cookies via:

```bash
export TWITTER_COOKIES_AUTH_TOKEN=your_auth_token
export TWITTER_COOKIES_CT0=your_ct0
export TWITTER_COOKIES_GUEST_ID=your_guest_id
```

## API Changes

### World and Room Management APIs
New API endpoints have been added for managing worlds and rooms:

1. World creation and management:
```bash
# Create a new world
curl -X POST http://localhost:3000/api/worlds -H "Content-Type: application/json" -d '{"name":"MyWorld"}'

# Get rooms in a world
curl -X GET http://localhost:3000/api/worlds/{worldId}/rooms
```

2. Room creation and management:
```bash
# Create a new room
curl -X POST http://localhost:3000/api/rooms -H "Content-Type: application/json" -d '{"name":"MyRoom"}'

# Get rooms for an agent
curl -X GET http://localhost:3000/api/agents/{agentId}/rooms
```

3. Agent creation now returns the agent ID in the response, simplifying automation workflows.

## Social Media Integrations

### Twitter Plugin Enhancements
- PR #4429 introduced a new timeline.ts module to handle bot interactions with the Twitter timeline
- Tweet text formatting has been improved with double newlines between sentences (PR #4706)
- Improved error handling for Twitter authentication issues

### Discord Plugin
- The Discord plugin now supports channel filtering via the `CHANNEL_IDS` environment variable, allowing you to limit bot responses to specific channels:

```bash
# Limit Discord bot responses to specific channels
CHANNEL_IDS=123456789012345678,987654321098765432
```

- Fixed a timeout issue in the Discord service unregistration process (PR #4450)

### Plugin Migration
Several social plugins have been moved to dedicated repositories for better maintenance:
- Twitter: https://github.com/elizaos-plugins/plugin-twitter
- Discord: https://github.com/elizaos-plugins/plugin-discord
- Telegram: https://github.com/elizaos-plugins/plugin-telegram
- Farcaster: https://github.com/elizaos-plugins/plugin-farcaster

## Model Provider Updates

### OpenAI Plugin Enhancements
PR #4438 added model usage tracking for previously untracked models, including embeddings and image description:

```typescript
// Now tracked with usage events
const embeddingResponse = await openaiApiCall({
  model: embeddingModel,
  input: texts,
  encoding_format: "float"
});

// Usage metrics emitted after completion
runtime.emit('model.usage', {
  type: "TEXT_EMBEDDING",
  provider: "openai",
  modelId: embeddingModel,
  promptTokens: inputTokenCount,
  completionTokens: 0,
  totalTokens: inputTokenCount
});
```

### Local AI Configuration
Community manager (Eli5) has been configured to use plugin-local-ai out of the box, making it easier for users to run agents locally without external API dependencies (PR #4557).

## Breaking Changes

### V1 to V2 Migration Issues
As ElizaOS transitions from V1 to V2, several breaking changes have emerged:

1. **Package Manager Change**: V2 uses bun instead of pnpm (previously used in V0/V1). Projects need to update their package management approach accordingly.

2. **Plugin Ecosystem Restructuring**: Several plugins have been moved out of the monorepo to dedicated repositories, requiring updates to import paths:
   ```typescript
   // V1
   import { TwitterPlugin } from '@elizaos/plugin-twitter';
   
   // V2
   import { TwitterPlugin } from '@elizaos-plugins/plugin-twitter';
   ```

3. **Environmental Variable Handling**: Global environment support has been dropped. Update your projects to only manage local environment files.

4. **World Management**: There's ongoing work to implement single world per runtime by default, which will change how context is maintained across different messaging platforms.

5. **Registry Endpoint**: Users need to explicitly point to `registry.elizaos.com` instead of the default registry.

For a smooth transition to V2, make sure to review all plugin dependencies, update your environment configuration approach, and test your agent in the new architecture before deploying to production.