# ElizaOS Developer Update: May 18-24, 2025

## 1. Core Framework

The ElizaOS framework has undergone significant architectural changes this week as the team prepares for the official v2 release (currently in beta phase .68 through .75). Key developments include:

### Knowledge System Refactoring
- **Knowledge Plugin Extraction**: Knowledge functionality has been factored out from the core runtime into a dedicated plugin-knowledge ([PR #4701](https://github.com/elizaOS/eliza/pull/4701)), providing better modularity and extensibility.
- **RAG Improvements**: Added support for PDF processing ([PR #4611](https://github.com/elizaOS/eliza/pull/4611)) and implemented a dedicated RAG plugin ([PR #4614](https://github.com/elizaOS/eliza/pull/4614)) for enhanced document ingestion.
- **Fixed Embedding Issues**: Resolved the critical "No handler found for delegate type: TEXT_EMBEDDING" error ([Issue #4418](https://github.com/elizaOS/eliza/issues/4418)) that was breaking agent functionality.

### Environment & Configuration Management
- **Unified Environment Handling**: Implemented `findNearestEnvFile()` utility ([PR #4686](https://github.com/elizaOS/eliza/pull/4686)) to standardize environment file lookup across the CLI.
- **Project Isolation**: Database directories are now created per-project with `pglite` targeted to keep files with the project rather than in global space ([PR #4695](https://github.com/elizaOS/eliza/pull/4695)).
- **Enhanced Configuration**: Added support for writing `.env.example` with sensible defaults to help new developers ([PR #4721](https://github.com/elizaOS/eliza/pull/4721)).

### Service Architecture
- **Service Registry Pattern**: Added service registry types ([PR #4719](https://github.com/elizaOS/eliza/pull/4719)) enabling typed services to be referenced across plugins.
- **Runtime Performance**: Fixed double initialization of server and improved agent loading performance for projects with many agents ([PR #4741](https://github.com/elizaOS/eliza/pull/4741), [PR #4519](https://github.com/elizaOS/eliza/pull/4519)).
- **Sentry Integration**: Added error logging through Sentry for improved debugging capabilities ([PR #4650](https://github.com/elizaOS/eliza/pull/4650)).

## 2. New Features

### Auto.fun Platform
```javascript
// Example of creating an agent on the Auto.fun platform
const agent = await AutoFun.createAgent({
  name: "MarketAnalyst",
  description: "AI agent that analyzes market trends and provides insights",
  permissions: {
    read: ["marketData", "userPortfolio"],
    write: ["reports", "notifications"],
    communicate: ["userAgent", "newsAgent"]
  },
  safety: {
    contentFiltering: true,
    actionRestrictions: ["financial_transactions"],
    rateLimiting: { maxRequests: 100, timeWindow: "1h" }
  }
});
```

- Auto.fun now functions as a "GitHub for autonomous systems," enabling secure agent-to-agent communication with defined scopes and permissions.
- Zero-knowledge proofs and a package manager for sharing agent components have been implemented.
- Agent communication protocols have been enhanced with better security protections.

### API Enhancements
```javascript
// Creating a new room with API
const response = await fetch('http://localhost:3000/api/rooms', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({
    name: 'Strategy Planning',
    description: 'Room for discussing market strategies',
    worldId: 'default-world'
  })
});
const { roomId } = await response.json();
```

- New API endpoints for world and room management ([PR #4647](https://github.com/elizaOS/eliza/pull/4647), [PR #4667](https://github.com/elizaOS/eliza/pull/4667), [PR #4677](https://github.com/elizaOS/eliza/pull/4677)).
- Agent creation API now returns the agent ID directly, eliminating the need for additional lookup calls ([PR #4634](https://github.com/elizaOS/eliza/pull/4634)).
- Added support for world selection in message API with proper memory tracking ([PR #4637](https://github.com/elizaOS/eliza/pull/4637)).

### Message Management
```javascript
// Clearing all chat messages
const clearChat = async (agentId, groupId) => {
  await deleteAllMemories(agentId, groupId);
  refetch(); // Reload the UI
};
```

- Implemented chat management features including message deletion and clearing ([PR #4659](https://github.com/elizaOS/eliza/pull/4659)).
- Enhanced agent response handling with better retry mechanisms and error recovery ([PR #4728](https://github.com/elizaOS/eliza/pull/4728)).
- Added optimized action formatting functions that improve message processing ([PR #4633](https://github.com/elizaOS/eliza/pull/4633)).

## 3. Bug Fixes

### UI and Interaction Issues
- **Agents Not Appearing**: Fixed critical issue where agents weren't appearing in the UI after updating to beta versions .68/.69 ([Discord discussion](https://discord.gg/elizaOS)).
- **Agent Start Button**: Fixed the agent start button to properly refetch agent status, ensuring UI updates in real-time ([PR #4642](https://github.com/elizaOS/eliza/pull/4642)).
- **Client Scrollbars**: Fixed doubled scrollbars in task list and improved fullscreen experience ([PR #4465](https://github.com/elizaOS/eliza/pull/4465)).

### Database Related Fixes
```sql
-- The issue with agent deletion was fixed by properly cascading related records
ALTER TABLE room_participants 
DROP CONSTRAINT room_participants_entity_id_fkey,
ADD CONSTRAINT room_participants_entity_id_fkey 
FOREIGN KEY (entity_id) 
REFERENCES entities (id) 
ON DELETE CASCADE;
```

- **Agent Deletion**: Fixed foreign key constraint violation when attempting to delete an agent that had been in a room ([PR #4510](https://github.com/elizaOS/eliza/pull/4510)).
- **PGLite Path Issues**: Fixed problems with PGLite migrations and simplified the database path handling ([PR #4532](https://github.com/elizaOS/eliza/pull/4532), [PR #4531](https://github.com/elizaOS/eliza/pull/4531)).
- **JSON Serialization**: Enhanced JSON serialization to handle invalid Unicode escape sequences when logging ([PR #4458](https://github.com/elizaOS/eliza/pull/4458)).

### Plugin System Fixes
- **Knowledge Plugin**: Fixed UUID syntax error and resolved "runtime.addKnowledge is not a function" error ([Discord discussion](https://discord.gg/elizaOS)).
- **Discord Plugin**: Fixed compatibility issues with newer versions and added CHANNEL_IDS configuration to limit responses to specific channels ([PR #4665](https://github.com/elizaOS/eliza/pull/4665)).
- **Twitter Plugin**: Fixed cloud authentication issues and improved text formatting with proper newline handling ([PR #4706](https://github.com/elizaOS/eliza/pull/4706)).

## 4. API Changes

### Breaking Changes
```typescript
// Old approach (no longer works)
const knowledge = runtime.addKnowledge(content);

// New approach with Knowledge Plugin
import { KnowledgeService } from '@elizaos/plugin-knowledge';
const knowledgeService = runtime.getService(KnowledgeService);
const knowledge = await knowledgeService.addKnowledge(content);
```

- Knowledge functionality moved from core to plugin-knowledge, requiring updates to code that directly uses knowledge features ([PR #4701](https://github.com/elizaOS/eliza/pull/4701)).
- Opus dependencies removed from Discord plugin, affecting audio functionality ([PR #4693](https://github.com/elizaOS/eliza/pull/4693)).
- getEntityById and getRoom methods renamed to getEntitiesByIds and getRoomsByIds with backward-compatible wrappers ([PR #4556](https://github.com/elizaOS/eliza/pull/4556)).

### Enhanced API Methods
```typescript
// Using the improved database batch operations
const entities = await database.getEntitiesByIds(['id1', 'id2', 'id3']);
const rooms = await database.getRoomsByIds(['room1', 'room2']);
```

- Database API enhanced with batch operations for better performance ([PR #4556](https://github.com/elizaOS/eliza/pull/4556)).
- Improved environment variable management with better lookup and resolution ([PR #4445](https://github.com/elizaOS/eliza/pull/4445), [PR #4705](https://github.com/elizaOS/eliza/pull/4705)).
- Added timeout functionality to CLI tests to address flakiness in CI environments ([PR #4687](https://github.com/elizaOS/eliza/pull/4687)).

## 5. Social Media Integrations

### Twitter Plugin Enhancements
```javascript
// Configure Twitter plugin with cookies to bypass Cloudflare
process.env.TWITTER_COOKIES_AUTH_TOKEN = 'your-auth-token';
process.env.TWITTER_COOKIES_CT0 = 'your-ct0';
process.env.TWITTER_COOKIES_GUEST_ID = 'your-guest-id';
```

- Added timeline functionality to the Twitter plugin ([PR #4429](https://github.com/elizaOS/eliza/pull/4429)).
- Improved error handling and tweet text formatting ([PR #4706](https://github.com/elizaOS/eliza/pull/4706)).
- Twitter plugin now moved to separate repository: https://github.com/elizaos-plugins/plugin-twitter.

### Discord Integration
```javascript
// Limit Discord responses to specific channels
process.env.CHANNEL_IDS = '1234567890,0987654321';
```

- Added CHANNEL_IDS environment variable to limit responses to specific channels ([PR #4665](https://github.com/elizaOS/eliza/pull/4665)).
- Fixed timeout during Discord agent unregistration ([PR #4450](https://github.com/elizaOS/eliza/pull/4450)).
- Discord plugin moved to separate repository: https://github.com/elizaos-plugins/plugin-discord.

### Other Social Platforms
- Fixed response handling for Telegram with improved error messaging ([PR #4548](https://github.com/elizaOS/eliza/pull/4548)).
- Telegram plugin moved to separate repository: https://github.com/elizaos-plugins/plugin-telegram.
- Farcaster plugin also relocated to dedicated repository: https://github.com/elizaos-plugins/plugin-farcaster.

## 6. Model Provider Updates

### OpenAI Integration
```javascript
// Configure custom embedding endpoint
process.env.OPENAI_EMBEDDING_API_BASE = 'https://your-custom-endpoint.com/v1';
```

- Added support for custom embedding endpoint in OpenAI plugin ([PR #4421](https://github.com/elizaOS/eliza/pull/4421)).
- Improved model usage tracking for embeddings and image generation ([PR #4438](https://github.com/elizaOS/eliza/pull/4438)).

### Plugin Management Changes
- Multiple provider plugins extracted from the monorepo to standalone repositories:
  - OpenAI, Anthropic, Groq, Venice, Ollama, and ElevenLabs plugins are now available as separate packages.
- Local AI integration is now the default for the community manager (Eli5) in dev build ([PR #4557](https://github.com/elizaOS/eliza/pull/4557)).
- Added support for third-party plugin installation with improved GitHub URL handling ([PR #4568](https://github.com/elizaOS/eliza/pull/4568)).

### Model Selection & Handling
```typescript
// Enhanced model handling with provider and priority
runtime.registerModel('gpt-4', {
  provider: 'openai',
  priority: 10,
  handler: async (modelInput) => {
    // Model implementation
  }
});
```

- Refactored model handling in AgentRuntime to support provider and priority for better model selection ([PR #4507](https://github.com/elizaOS/eliza/pull/4507)).
- Improved reply action to only shortcut when no dynamic provider is present ([PR #4670](https://github.com/elizaOS/eliza/pull/4670)).

## 7. Breaking Changes for V1 to V2 Migration

### Package Structure Changes
```bash
# Before (v1)
elizaos update-cli
npm install @elizaos/core

# After (v2)
elizaos update
npm install @elizaos/cli
```

- Monorepo significantly restructured with many plugins moved to separate repositories.
- Update command consolidated (update-cli merged into update) with improved semantics ([PR #4592](https://github.com/elizaOS/eliza/pull/4592)).

### Plugin System Changes
```javascript
// V1: Knowledge in runtime
const docs = await runtime.addKnowledge(text);

// V2: Knowledge as a plugin service
import { KnowledgeService } from '@elizaos/plugin-knowledge';
const knowledgeService = runtime.getService(KnowledgeService);
const docs = await knowledgeService.addKnowledge(text);
```

- Knowledge functionality moved from runtime to plugin-knowledge.
- Plugin and project publishing workflow unified with correct tags/topics ([PR #4424](https://github.com/elizaOS/eliza/pull/4424)).
- Plugin prefix validation enforces "plugin-alphanumeric" naming convention ([PR #4727](https://github.com/elizaOS/eliza/pull/4727)).

### Database Layer Changes
```typescript
// V1: SQLite as default
// No configuration needed

// V2: Configure PostgreSQL
// Add to .env
POSTGRES_URL=postgresql://username:password@hostname:5432/database?sslmode=require
```

- Fixed issues with migrating from SQLite to PostgreSQL ([Issue #4697](https://github.com/elizaOS/eliza/issues/4697)).
- Project database directories now created with PGLite in the project folder instead of global space ([PR #4695](https://github.com/elizaOS/eliza/pull/4695)).
- Added proper ORM integration for database operations with Drizzle ([PR #4500](https://github.com/elizaOS/eliza/pull/4500)).

To successfully migrate from v1 to v2, ensure you:
1. Update the CLI using `elizaos update`
2. Replace any direct knowledge operations with the KnowledgeService pattern
3. Update plugin imports to their new repositories
4. Consider migrating to PostgreSQL for production environments
5. Review your environment settings to align with the new configuration approach

The team recommends testing your agents thoroughly during migration as the architecture changes are substantial.