# ElizaOS Developer Update - July 31, 2025

## Core Framework

The ElizaOS team has made significant progress on core infrastructure components this week, with several critical improvements to the framework architecture:

### Database Integration Overhaul
- **Drizzle ORM Challenges**: The team is addressing several issues with Drizzle ORM integration, particularly with dynamic migrations for plugins
- **PGlite vs PostgreSQL**: There's an ongoing debate about whether to keep PGlite or standardize on PostgreSQL, with concerns about cross-platform compatibility and constraint naming conventions
  ```
  // Current issues with constraint naming in Drizzle
  [2025-07-30] INFO: [shaw] Identified a bug in Drizzle with constraint naming and cross-platform compatibility
  ```

### ElizaCloud Development
Shaw outlined a three-phase roadmap for ElizaCloud:
1. **Developer APIs**: Simplified agent building with unified API keys
2. **Cloud Containers**: Hosted agents with customization options
3. **Autocoder**: AI-assisted agent creation

### EventTarget Migration
Completed migration from Node.js `EventEmitter` to Bun's native `EventTarget` API ([PR #5609](https://github.com/elizaOS/eliza/pull/5609), [PR #5614](https://github.com/elizaOS/eliza/pull/5614)), which:
- Improves performance and runtime compatibility
- Maintains backward compatibility with existing code
- Fixed issues in `SimpleMigrationAgent` and `InternalMessageBus`

## New Features

### Action Chaining
Implemented a comprehensive action chaining system ([PR #5436](https://github.com/elizaOS/eliza/pull/5436)) that allows for more complex, sequential agent behaviors:

```typescript
// Example of chained action use with state persistence
const result = await runtime.runAction('firstAction', {
  param1: 'value1'
});

// Next action can access previous action's result
const finalResult = await runtime.runAction('secondAction', {
  previousResult: result.data
});
```

Key features include:
- Action state stored on the State object and passed down to actions
- Action return values stored in the state for the run
- "callback" function to send intermediate messages to the user
- State persistence across action chain

### Character-Specific Knowledge Paths
Enhanced the plugin-knowledge component ([PR #36](https://github.com/elizaOS/eliza/pull/36)) to support unique document folders for different agents:

```typescript
// How to configure different knowledge paths in character settings
{
  "name": "Crypto-Analyst",
  "settings": {
    "KNOWLEDGE_PATH": "/path/to/crypto/documents"
  }
}
```

### Image Generation Action
Added a new `generateImageAction` ([PR #5446](https://github.com/elizaOS/eliza/pull/5446)) to enable agents to generate images based on conversational context using `ModelType.IMAGE`.

## Bug Fixes

### Plugin Distribution Issue
Fixed critical bug where plugin actions weren't being received by the runtime when using the NPM deployed version of the ElizaOS CLI ([PR #5624](https://github.com/elizaOS/eliza/pull/5624)):

```
// Prior behavior: Plugin actions not loading in npm deployed version
// Solution: Updated plugin-utils.ts to handle path resolution correctly
```

This issue only occurred with the published NPM package and not when running from source.

### SQL Database Fixes
Addressed a critical advisory lock acquisition bug in the SQL plugin ([PR #5572](https://github.com/elizaOS/eliza/pull/5572)) that was causing transaction failures:

```typescript
// Fixed code now properly releases locks
// The bug was in acquireAdvisoryLock function that failed to properly release locks
```

### Windows Compatibility Improvements
Resolved several Windows-specific issues:
- Fixed plugin loading failures on Windows ([PR #5416](https://github.com/elizaOS/eliza/pull/5416))
- Improved path normalization and localhost resolution ([PR #5437](https://github.com/elizaOS/eliza/pull/5437))
- Addressed Windows directory path handling in agent creation

## API Changes

### Standardized Service Interfaces
Implemented a comprehensive service type system ([PR #5565](https://github.com/elizaOS/eliza/pull/5565)) with a new `getServicesByType()` method to enhance modularity:

```typescript
// New API to get all services of a specific type
const browserServices = runtime.getServicesByType<BrowserService>('browser');
const emailServices = runtime.getServicesByType<EmailService>('email');
```

This allows:
- Multiple services per type (e.g., different browser implementations)
- Framework-enforced consistent service interfaces
- Type safety with TypeScript generics

### Module Resolution Improvements
Enhanced the ModuleLoader system ([PR #5629](https://github.com/elizaOS/eliza/pull/5629)) to provide consistent local-first guarantees:

```typescript
// New enhanced module loading with better resolution
const server = await loadModule('@elizaos/server', {
  preferLocal: true,
  fallbackToGlobal: true
});
```

## Social Media Integrations

### Farcaster Plugin Upgrade
Plans to implement Farcaster support using Neynar webhooks instead of polling:
- Improves API credential management
- Eliminates rate-limiting issues from constant polling
- Borko provided Neynar login credentials to Odilitime for implementation

### Twitter Plugin Updates
- Team is working on resolving X (Twitter) account suspension with "a resolution in sight"
- Updated documentation available at [packages/docs/packages/plugins/twitter.md](https://github.com/elizaOS/eliza/blob/main/packages/docs/packages/plugins/twitter.md)
- Added post examples to default Eliza character to ensure Twitter posting works correctly

## Model Provider Updates

### Ollama Plugin Improvements
Made Ollama integration truly conditional ([PR #5594](https://github.com/elizaOS/eliza/pull/5594)):
- Plugin is now only included if `OLLAMA_API_ENDPOINT` is configured
- Eliminated unnecessary plugin inclusion
- Updated model selection logic and improved compatibility

### Prompt System Refactoring
Migrated all prompts from JSON to XML format ([PR #5623](https://github.com/elizaOS/eliza/pull/5623)) for better LLM response reliability:

```xml
<!-- Example of new XML prompt format -->
<response>
  <thought>User requested information about Bitcoin</thought>
  <actions>REPLY</actions>
  <providers>KNOWLEDGE</providers>
  <text>Bitcoin is a decentralized digital currency...</text>
</response>
```

This change improved LLM output consistency and reduced parsing errors.

## Breaking Changes

### PGlite Database Inheritance
Fixed issue where creating a new ElizaOS project from within an existing project directory caused the child project to incorrectly inherit the parent's `PGLITE_DATA_DIR` ([PR #5618](https://github.com/elizaOS/eliza/pull/5618)).

If you've created nested projects, each nested project now needs its own database configuration.

### V1 to V2 Character Migration
Implemented automatic character conversion when importing V1 JSON files ([PR #5536](https://github.com/elizaOS/eliza/pull/5536)):
- Automatically converts V1 characters to V2 format
- Migrates provider names to modern plugin references
- Handles mapping of deprecated providers to their modern equivalents

### Database Schema Updates
Users with custom plugins using database migrations should update their code to ensure compatibility with the latest Drizzle ORM changes, particularly regarding constraint naming conventions.