# ElizaOS Developer Update - May 12 to May 16, 2025

## Core Framework

The ElizaOS team has made significant progress on the framework this week with key architectural improvements and stability enhancements. The v2 development is currently in beta testing, described by one team member as "looking at a pizza before it goes into the oven" with GPT-4o image generation being the final step.

We've made substantial changes to knowledge item associations with agents by improving the scoping of `worldId` and `entityId` to ensure uploaded knowledge is correctly linked ([PR #4581](https://github.com/elizaos/eliza/pull/4581)). 

A major focus has been enhancing the plugin system with the addition of a plugin-specification submodule ([PR #4553](https://github.com/elizaos/eliza/pull/4553)) and improving support for installing plugins directly from GitHub repositories ([PR #4577](https://github.com/elizaos/eliza/pull/4577)):

```bash
# Install a plugin from GitHub using the new shorthand format
eliza plugins install github:username/plugin-name

# Or using the full HTTPS URL
eliza plugins install https://github.com/username/plugin-name.git
```

Additionally, we've implemented agent state tracking and debug views to catch edge cases in decision trees, as suggested by our DAG viewer tool development team. This tool uses react-flow to visualize and design agent workflows with support for custom node types and conditional flows.

## New Features

### Faster Agent Loading

We've significantly improved agent data fetching performance when dealing with multiple agents ([PR #4519](https://github.com/elizaos/eliza/pull/4519)), reducing the load time by implementing more efficient queries:

```javascript
// New approach with optimized loading
const agentData = await getAgentsData({
  includeSettings: false, // Skip settings for faster listing
  includeCharacter: false // Skip character data for faster listing
});
```

### Third-Party Plugin Installation Support

ElizaOS now supports installing plugins from any third-party repository ([PR #4568](https://github.com/elizaos/eliza/pull/4568)), greatly extending the ecosystem:

```bash
# Install a third-party plugin
eliza plugins install github:thirdparty/custom-plugin
```

### CLI Command Enhancements

The CLI agent command has received significant upgrades ([PR #4560](https://github.com/elizaos/eliza/pull/4560)) with improved JSON output and file saving options:

```bash
# Get agent details in JSON format
eliza agent get my-agent --json

# Save agent details to a file
eliza agent get my-agent --output=agent-details.json
```

### Memory Management Improvements

We've added API and client React hooks to wipe all memories in a single request ([PR #4467](https://github.com/elizaos/eliza/pull/4467)), enabling the "clear chat" functionality that users have been requesting.

## Bug Fixes

Several critical bugs were fixed this week:

1. **LLM Response Parsing** - Fixed response parsing to properly handle custom fields and clean up empty message headers ([PR #4580](https://github.com/elizaos/eliza/pull/4580)). This was particularly important for customized templates that return additional data beyond the standard fields.

2. **Community Manager Configuration** - Set the community manager (Eli5) to use plugin-local-ai by default in development builds ([PR #4557](https://github.com/elizaos/eliza/pull/4557)), addressing initialization issues reported in [Issue #4336](https://github.com/elizaos/eliza/issues/4336).

3. **Discord Plugin Stability** - Fixed critical issues in the Discord plugin service that were causing messages to disappear and timing out during agent unregistration ([PR #4552](https://github.com/elizaos/eliza/pull/4552)).

4. **Database Operation Fixes** - Resolved a foreign key constraint violation on agent deletion ([PR #4510](https://github.com/elizaos/eliza/pull/4510)) that prevented removing agents that had been part of a room.

5. **Migration Cleanup** - Removed unnecessary migrations files ([PR #4531](https://github.com/elizaos/eliza/pull/4531)) and fixed PGLite migration paths ([PR #4532](https://github.com/elizaos/eliza/pull/4532)).

## API Changes

We've made several important API changes that developers should be aware of:

1. **Model Handling Refactoring** - The AgentRuntime model handling has been refactored to support provider selection and priority settings ([PR #4507](https://github.com/elizaos/eliza/pull/4507)). The updated ModelHandler type now includes:

```typescript
type ModelHandler = {
  provider: string;        // The provider name (e.g., "openai", "anthropic")
  priority?: number;       // Optional priority setting for model selection
  handler: (request: ModelRequest) => Promise<ModelResponse>;
};
```

2. **Plugin Routes Fix** - We've fixed the plugin.routes functionality to make plugin routes available at `/api/agents/AGENT_UUID_OR_NAME/plugins/PLUGIN_NAME/ROUTE_FROM_PLUGIN` ([PR #4415](https://github.com/elizaos/eliza/pull/4415)).

3. **Environment Variable Handling** - Environment variable handling has been refactored for better consistency ([PR #4445](https://github.com/elizaos/eliza/pull/4445)), with unified environment information system providing detailed system, CLI, and package manager details.

4. **Authentication Middleware** - Added authentication middleware and API key dialog for unauthorized access ([PR #4420](https://github.com/elizaos/eliza/pull/4420)).

## Social Media Integrations

### Twitter/X Plugin Improvements

The Twitter plugin has received significant updates:

1. **Timeline Functionality** - Added Twitter timeline interaction capability ([PR #4429](https://github.com/elizaos/eliza/pull/4429)). This feature is optional and can be enabled with environment variables:

```
TWITTER_ENABLE_TIMELINE=true
TWITTER_TIMELINE_INTERVAL=300000  # Check timeline every 5 minutes
```

2. **Error Handling and Retry Settings** - Improved the Twitter plugin with better error handling and configurable retry settings ([PR #4506](https://github.com/elizaos/eliza/pull/4506)). The maximum retry attempts can now be set through:

```
TWITTER_MAX_RETRIES=5  # Default is 3
```

3. **Reply Improvement** - Reply functionality now uses small models for faster responses ([PR #4416](https://github.com/elizaos/eliza/pull/4416)).

4. **Twitter Setup Guide** - Added a comprehensive blog tutorial for Twitter agent setup ([PR #4425](https://github.com/elizaos/eliza/pull/4425)).

### Discord Plugin Extension

The proper approach for extending Discord plugin functionality has been clarified. Developers should extend the DiscordPlugin class directly rather than modifying the service:

```javascript
import { DiscordPlugin } from "@elizaos/plugin-discord";

export class MyCustomDiscordPlugin extends DiscordPlugin {
  constructor(options) {
    super(options);
  }

  // Override methods to add custom functionality
  async sendMessage(channel, content, options = {}) {
    // Custom implementation
    return super.sendMessage(channel, content, options);
  }
}
```

## Model Provider Updates

We've made significant updates to our AI provider integrations:

1. **OpenAI Embedding Endpoint** - Added support for a custom embedding endpoint in the OpenAI plugin ([PR #4421](https://github.com/elizaos/eliza/pull/4421)), allowing users to specify a separate endpoint for embedding requests.

2. **Model Usage Tracking** - Enhanced model usage events for embeddings and image description in the OpenAI plugin ([PR #4438](https://github.com/elizaos/eliza/pull/4438)).

3. **Anthropic Integration** - Fixed an issue with Anthropic integration where agents would hang after core initialization and REST API binding ([Issue #4486](https://github.com/elizaos/eliza/issues/4486)). The team has made progress on this issue, although it's still being addressed.

4. **Provider-Based Model Selection** - Enhanced the AgentRuntime to better support model provider selection and priority settings ([PR #4507](https://github.com/elizaos/eliza/pull/4507)).

5. **TEXT_EMBEDDING Error Resolution** - Fixed the error "No handler found for delegate type: TEXT_EMBEDDING" with OpenAI ([PR #4537](https://github.com/elizaos/eliza/pull/4537)).

## Breaking Changes

As we continue to move from v1 to v2, there are several breaking changes developers should be aware of:

1. **Plugin Structure** - The plugin structure has changed significantly between v0.x and v1.x. There's a distinction between `plugin-twitter` (for v2/v1.x) and `client-twitter` (for v0.x) ([Discord discussion](https://discord.com/channels/1320246527268098048/1320246527268098048)).

2. **Monorepo Cleanup** - Several plugins have been removed from the monorepo to streamline maintenance, including:
   - plugin-browser ([PR #4406](https://github.com/elizaos/eliza/pull/4406))
   - plugin-storage-s3 ([PR #4402](https://github.com/elizaos/eliza/pull/4402))
   - plugin-local-ai ([PR #4439](https://github.com/elizaos/eliza/pull/4439))
   - plugin-ollama ([PR #4437](https://github.com/elizaos/eliza/pull/4437))
   - plugin-groq ([PR #4436](https://github.com/elizaos/eliza/pull/4436))
   - plugin-venice ([PR #4434](https://github.com/elizaos/eliza/pull/4434))

   All plugins are now in a separate repository: [https://github.com/elizaos-plugins](https://github.com/elizaos-plugins)

3. **CLI Command Changes** - The CLI publish command has been refactored, with the platform option removed and 'node' set as the default platform for all packages ([PR #4492](https://github.com/elizaos/eliza/pull/4492)).

4. **Knowledge Handling** - The approach to knowledge file referencing has changed, with paths now relative to the characters/knowledge directory, and the requirement to set `ragknowledge: true` in character settings ([Discord discussion](https://discord.com/channels/1320246527268098048/1320246527268098048)).

Please ensure your projects are updated accordingly to maintain compatibility with the latest version of ElizaOS.