# ElizaOS Developer Update - May 11-17, 2025

## 1. Core Framework

This week marks significant progress in the ElizaOS framework architecture with enhancements to the plugin system, database management, and core functionality.

### AgentRuntime Improvements
The AgentRuntime has been refactored to support better model provider selection and priority settings ([PR #4507](https://github.com/elizaos/eliza/pull/4507)):

```typescript
// Updated ModelHandler type to include provider and priority
interface ModelHandler {
  provider: string;      // The model provider name
  priority?: number;     // Optional priority for model selection
  // ... other properties
}
```

### Message Processing Enhancements
- Complete rewrite of the message processing system to use an event-driven, asynchronous flow ([PR #4594](https://github.com/elizaos/eliza/pull/4594))
- Guaranteed execution of `onComplete` callbacks regardless of errors or timeouts in message handlers ([PR #4589](https://github.com/elizaos/eliza/pull/4589))

### Database Management
- Improved database directory management with per-project isolation ([PR #4497](https://github.com/elizaos/eliza/pull/4497))
- Fixed JSON serialization to handle invalid Unicode escape sequences in logs ([PR #4458](https://github.com/elizaos/eliza/pull/4458))
- Implemented proper Drizzle ORM for database operations ([PR #4500](https://github.com/elizaos/eliza/pull/4500))

## 2. New Features

### Third-Party Plugin Support
ElizaOS now officially supports installing plugins from third-party repositories ([PR #4568](https://github.com/elizaos/eliza/pull/4568)):

```bash
# Install a plugin from a GitHub repository
elizaos plugins install https://github.com/username/plugin-name

# Shorthand format is also supported
elizaos plugins install username/plugin-name
```

### Plugin Specification Submodule
Added a plugin specification submodule to standardize plugin development ([PR #4553](https://github.com/elizaos/eliza/pull/4553)), making it easier to create and maintain compatible plugins.

### Optimized Agent Loading
Performance improvements for applications with many agents, significantly reducing page load times ([PR #4519](https://github.com/elizaos/eliza/pull/4519)):

```typescript
// New option to skip loading unnecessary agent details
fetchAgents({ skipDetails: true })
```

## 3. Bug Fixes

### Hallucination Prevention in Reply Action
Fixed a critical issue where the reply action would hallucinate responses when using `OBJECT_SMALL` model type ([PR #4603](https://github.com/elizaos/eliza/pull/4603)):

```typescript
// Before: Using problematic model type that produces unreliable JSON
const model = 'OBJECT_SMALL';

// After: Using more reliable model type for this operation
const model = 'TEXT_LARGE';
```

### Agent Deletion with Database Constraints
Fixed foreign key constraint violation when deleting agents that have been in rooms ([PR #4510](https://github.com/elizaos/eliza/pull/4510)):

```typescript
// Added proper cascading delete operations to handle room associations
async function deleteAgent(tx, agentId) {
  await tx.delete(roomMembersTable).where(eq(roomMembersTable.entityId, agentId));
  await tx.delete(agentsTable).where(eq(agentsTable.id, agentId));
}
```

### LLM Response Parsing
Fixed issues with response parsing to support custom fields and clean up empty message headers ([PR #4580](https://github.com/elizaos/eliza/pull/4580)), improving the reliability of AI responses.

## 4. API Changes

### Plugin Routes API
Fixed plugin.routes to make them properly accessible via API endpoints ([PR #4415](https://github.com/elizaos/eliza/pull/4415)):

```
GET /api/agents/AGENT_UUID_OR_NAME/plugins/PLUGIN_NAME/ROUTE_FROM_PLUGIN
```

### Authentication Middleware
Added API key authentication middleware with dialog for unauthorized access ([PR #4420](https://github.com/elizaos/eliza/pull/4420)), enhancing security for your ElizaOS deployments.

### Knowledge Item Association
Improved knowledge item association with agents for correct scoping ([PR #4581](https://github.com/elizaos/eliza/pull/4581)), ensuring uploaded knowledge is now correctly associated with the right agents.

## 5. Social Media Integrations

### Twitter Timeline Functionality
Added comprehensive Twitter timeline functionality for bot interactions ([PR #4429](https://github.com/elizaos/eliza/pull/4429)):

```typescript
// Configure timeline interactions in your character.json
{
  "settings": {
    "twitter": {
      "enable_timeline_search": true,
      "enable_auto_retweet": true,
      "enable_replies": true,
      "enable_follow_thanks": true
    }
  }
}
```

### Twitter Error Handling
Enhanced the Twitter plugin with improved error handling and cleaner code ([PR #4506](https://github.com/elizaos/eliza/pull/4506)):

```typescript
// Now configurable via environment variable  
const maxRetries = process.env.TWITTER_MAX_RETRIES ? 
  parseInt(process.env.TWITTER_MAX_RETRIES) : 3;
```

### Telegram Integration
Improved Telegram message formatting with proper MarkdownV2 support ([PR #4570](https://github.com/elizaos/eliza/pull/4570)) and enhanced type safety with strict TypeScript checks ([PR #4559](https://github.com/elizaos/eliza/pull/4559)).

## 6. Model Provider Updates

### OpenAI Plugin Extensions
Extended the OpenAI plugin to support custom embedding endpoints ([PR #4421](https://github.com/elizaos/eliza/pull/4421)), allowing use of different API endpoints for embeddings:

```
OPENAI_EMBEDDING_API_URL=https://your-custom-embedding-api.example.com/v1
```

### Model Usage Tracking
Added model usage tracking for embeddings and image descriptions in the OpenAI plugin ([PR #4438](https://github.com/elizaos/eliza/pull/4438)), providing better visibility into API consumption.

### Smaller Models for Replies
Optimized the reply action to use small models for faster responses ([PR #4416](https://github.com/elizaos/eliza/pull/4416)), reducing latency and token usage for common interactions.

### Skip Redundant LLM Calls
The reply action now skips LLM calls when existing REPLY responses are found ([PR #4608](https://github.com/elizaos/eliza/pull/4608)), improving efficiency and reducing API costs.

## 7. Breaking Changes

### Plugin System Restructuring
ElizaOS is moving towards a more modular ecosystem by removing several plugins from the monorepo:

- OpenAI plugin ([PR #4511](https://github.com/elizaos/eliza/pull/4511))
- Anthropic plugin ([PR #4427](https://github.com/elizaos/eliza/pull/4427))
- Solana plugin ([PR #4513](https://github.com/elizaos/eliza/pull/4513))
- Browser plugin ([PR #4406](https://github.com/elizaos/eliza/pull/4406))
- Local AI plugin ([PR #4439](https://github.com/elizaos/eliza/pull/4439))
- Ollama plugin ([PR #4437](https://github.com/elizaos/eliza/pull/4437))

These plugins must now be installed separately:

```bash
elizaos plugins install @elizaos/plugin-openai
```

### CLI Command Consolidation
The `update-cli` command has been merged into a single `update` command ([PR #4592](https://github.com/elizaos/eliza/pull/4592)). Update your scripts to match:

```bash
# Old approach
elizaos update-cli

# New approach
elizaos update --cli
```

### Environment Variable Management
Enhanced environment variable management with improved listing and warning systems ([PR #4610](https://github.com/elizaos/eliza/pull/4610)). The CLI now warns when no local .env file exists and provides guidance to create one from .env.example if available.