# ElizaOS Developer Update - Week of June 1-7, 2025

## Core Framework

We've completed a major overhaul of ElizaOS architecture this week, with significant improvements to the message server, plugin system, and agent runtime.

### Message Server Refactoring
The message server has been completely separated from agents, creating a more modular and maintainable architecture:

```javascript
// Server now handles message routing independently from agents
const messageServer = new MessageServer({
  standalone: true,
  database: new StandaloneMessageDatabase()
});

// Agents connect to the message server as clients
agent.connectToMessageServer(messageServer);
```

This separation prevents cross-agent interference and resolves several long-standing issues with message routing.

### Plugin System Enhancements
We've added comprehensive plugin specifications to the core framework, improving standardization and forward compatibility:

```javascript
// Import from version-specific API for maximum compatibility
import { definePlugin } from '@elizaos/core/v2';

export default definePlugin({
  name: 'my-plugin',
  version: '1.0.0',
  actions: {
    myAction: {
      description: 'Performs a custom action',
      parameters: {
        // Parameter schema defined here
      },
      handler: async (runtime, params) => {
        // Implementation here
      }
    }
  }
});
```

Plugins now support environment variable prompting during installation for better user experience.

## New Features

### Responsive UI Enhancements
The UI has received major improvements with responsive design throughout the application:

```javascript
// New responsive component API
<ResponsivePanel
  mobileBehavior="collapse"
  desktopBehavior="expand"
  className="flex flex-col gap-4 p-4"
>
  {children}
</ResponsivePanel>
```

### Retry Button for User Messages
Users can now easily resend previous messages without manual retyping:

```javascript
// Retry button implementation in chat messages
function MessageControls({ message, onRetry }) {
  const isUserMessage = message.sender === 'user';
  
  return (
    <div className="message-controls">
      {isUserMessage && (
        <Button 
          variant="ghost" 
          size="sm" 
          onClick={() => onRetry(message.content)}
          aria-label="Retry message"
        >
          <RetryIcon className="h-4 w-4" />
        </Button>
      )}
    </div>
  );
}
```

### Agent Configuration Updates
Agent configuration is now updated automatically on restart, providing smoother agent lifecycle management:

```javascript
// Runtime now handles agent configuration updates automatically
await runtime.ensureAgentExists({
  id: agentId,
  name: character.name,
  plugins: character.plugins || [],
  settings: character.settings || {},
});
```

## Bug Fixes

### Agent Self-Response Loop
Fixed a critical bug causing infinite loops where agents would respond to their own messages:

```javascript
// Fixed shouldRespond logic in bootstrap plugin
function shouldRespond(message) {
  // Skip messages generated by agents
  if (message.metadata?.type === 'agent_response') {
    return false;
  }
  
  // Only respond to direct messages or mentions
  return message.isDirect || message.mentions.includes(agentId);
}
```

### Cross-Agent Interference
Resolved agent cross-interference in DM channels, preventing multiple agents from responding to messages intended for a single agent:

```javascript
// Preserve metadata type through message processing
async function processMessage(message) {
  const processedMessage = {
    ...message,
    content: processContent(message.content),
    metadata: {
      ...message.metadata  // Preserve original metadata
    }
  };
  
  return processedMessage;
}
```

### Plugin Starter Template Fixes
Fixed TypeScript declarations in plugin starter templates to ensure proper type safety in published plugins:

```typescript
// Fixed declarations export in tsconfig.json
{
  "compilerOptions": {
    "declaration": true,
    "declarationDir": "./dist/types",
    "emitDeclarationOnly": false
  }
}
```

## API Changes

### Knowledge API
The knowledge management APIs have been updated to provide more consistent endpoints:

```javascript
// Previous API (deprecated)
await runtime.addKnowledge(documentText);

// New API in plugin-knowledge
await runtime.plugins.knowledge.addDocument({
  content: documentText,
  metadata: { source: 'user-upload' }
});

// New room-specific knowledge query
await runtime.plugins.knowledge.query(question, { roomId });
```

### Message API
New endpoints are available for managing messages in the standalone message server:

```javascript
// Get messages for a specific room
GET /api/agents/:agentId/rooms/:roomId/messages

// Send a message to a specific room
POST /api/agents/:agentId/rooms/:roomId/messages
{
  "content": "Hello world",
  "metadata": { "type": "user" }
}
```

## Social Media Integrations

### Twitter Plugin Updates
We've released Twitter plugin v1.0.3 with improved functionality:

- Added support for targeting specific users with the `TWITTER_TARGET_USERS` environment variable
- Fixed issues with duplicate tweets
- Improved error handling for Twitter API rate limits

Usage example:
```
# .env file
TWITTER_API_KEY=your_api_key
TWITTER_API_SECRET=your_api_secret
TWITTER_ACCESS_TOKEN=your_access_token
TWITTER_ACCESS_SECRET=your_access_secret
TWITTER_TARGET_USERS=user1,user2,user3
```

### Discord Plugin
Fixed Discord plugin compatibility with ElizaOS v1.0.5, resolving connection issues and improving message handling.

## Model Provider Updates

### OpenRouter Integration
Improved OpenRouter integration, though it's important to note that OpenRouter still lacks embedding support. If you need embeddings, we recommend using the OpenAI plugin alongside OpenRouter:

```javascript
// In your character configuration
{
  "plugins": [
    "@elizaos/plugin-openrouter", // For chat generation
    "@elizaos/plugin-openai"      // For embeddings
  ],
  "settings": {
    "modelProvider": "openrouter",
    "embeddingProvider": "openai" 
  }
}
```

### ElevenLabs Integration
Added support for the new ElevenLabs v3 API in the voice system. The council/clank tank system is now configured to use this new API version by default.

## Breaking Changes

### Knowledge Plugin Changes
The knowledge plugin in v1.0.5 requires database migration. If you're upgrading from earlier versions, note these key changes:

1. The knowledge tab may not appear in UI until database migration completes
2. The `TEXT_PROVIDER` environment variable is now required when `CTX_KNOWLEDGE_ENABLED` is true
3. Migration from SQLite to Postgres may require database dumps/restores

Recommended PostgreSQL configuration:
```
# .env file
DATABASE_URL=postgres://username:password@localhost:5432/elizaos
DATABASE_SSL=false
```

### Bootstrap Plugin Requirement
The bootstrap plugin is now mandatory for agent functionality. Make sure to include it in your character configuration:

```javascript
// character.json
{
  "name": "Eliza",
  "plugins": [
    "@elizaos/plugin-bootstrap",
    // other plugins...
  ]
}
```

If you experience "No agents found in room" errors, check that bootstrap plugin is included in your configuration.

For complete details on all changes in this release, please refer to our [GitHub releases](https://github.com/elizaOS/eliza/releases) and [API documentation](https://eliza.how/docs/api).