# ElizaOS Developer Update - August 29, 2025

## Core Framework

The team has made significant progress on browser compatibility with the release of **Version 1.5.0**, which includes several architectural improvements:

- **Browser Core Compatibility**: The core runtime is now fully functional in browsers with zero polyfills. This was achieved by:
  - Implementing a custom SHA1 solution for browser compatibility to maintain existing agent IDs
  - Targeting pure JavaScript with universal libraries that work across Node.js, Deno, and browsers
  - Exploring PGLite via WebAssembly for in-memory database functionality in browsers

- **Runtime Improvements**:
  - Added `initPromise` property to runtime for improved initialization tracking
  - Updated event emissions to always include runtime in emitted events
  - Reverted `processActions` to use `cacheState` for retrieving action results, fixing a regression
  - Added `getServiceLoadPromise` interface to runtime for better service initialization management

- **Logging System Enhancements**:
  - Replaced Pino with Adze for improved logging with namespaces and colored output
  - Implemented cross-environment logger support for both browser and Node.js environments

```typescript
// Example of the new cross-environment logger
// packages/core/src/logger.ts
export const createLogger = (namespace: string): Logger => {
  if (typeof window !== 'undefined') {
    // Browser environment
    return new BrowserLogger(namespace);
  } else {
    // Node.js environment
    return new NodeLogger(namespace);
  }
};
```

## New Features

### Multi-Step Workflow Execution System

A powerful new multi-step workflow system has been implemented, allowing for complex action sequences with configurable strategy modes:

```typescript
// Example of using multi-step workflow in a plugin
const multiStepResult = await runtime.executeMultiStepWorkflow({
  steps: [
    {
      name: 'fetchData',
      action: 'data-service.fetchItems',
      params: { query: 'status:active' }
    },
    {
      name: 'processData',
      action: 'processor.transform',
      params: (values) => ({ 
        items: values.fetchData.items,
        format: 'summary'
      })
    }
  ],
  strategy: 'continue-on-error', // or 'halt-on-error'
  context: { userId: '123' }
});
```

Key features include:
- Proper value passing between action steps
- Configurable error handling strategies
- Templates moved to core layer with character-level override support
- Async embedding generation via queue service to improve message processing latency

### Sessions API

A comprehensive Sessions API has been introduced for enhanced conversation management:

- Advanced timeout configuration and lifecycle control
- Auto-renewal capabilities
- Session metadata propagation for plugin actions
- Robust error handling for timeout conditions

```typescript
// Creating a new session
const session = await sessionsService.createSession({
  agentId: 'agent-uuid',
  userId: 'user-uuid',
  metadata: { ethAddress: '0x123...' },
  timeoutSettings: {
    expiresIn: 3600,
    autoRenew: true
  }
});

// Metadata is propagated to plugin actions
const message = await sessionsService.sendMessage(session.id, {
  content: "Transfer 1 ETH to Bob",
  type: "text"
});
```

## Bug Fixes

Several critical bugs were addressed this week:

1. **SQL Parameter Mismatch**: Fixed a database error during entity creation that was causing failures:

```typescript
// Before: Incorrect parameter count
// packages/plugin-sql/src/base.ts
await this.query('insert into "entities" values ($1, $2, default, default, default)', [
  entity.id,
  entity.type
]);

// After: Correct parameter count with explicit columns
await this.query(
  'insert into "entities" (id, type, created_at, updated_at, deleted_at) values ($1, $2, default, default, default)',
  [entity.id, entity.type]
);
```

2. **Multi-Step Action Result Handling**: Fixed to properly pass values between steps:

```typescript
// Added values to MultiStepActionResult interface
interface MultiStepActionResult {
  success: boolean;
  message?: string;
  values?: Record<string, any>; // Now properly passed between steps
}
```

3. **XML Parser Safety**: Replaced unsafe XML fallback regex with linear scan to avoid ReDoS vulnerabilities

4. **Embedding Blocking Issue**: Implemented async embedding generation to prevent 500ms+ blocking during message processing

5. **Logger Parameter Order**: Fixed incorrect parameter order in `logger.error` calls throughout the codebase

## API Changes

### Core Runtime Interface Updates

The `IAgentRuntime` interface has been extended with new methods and properties:

```typescript
interface IAgentRuntime {
  // New properties
  initPromise: Promise<void>;  // Tracks runtime initialization
  
  // New methods
  getServiceLoadPromise(serviceId: string): Promise<void>;
  executeMultiStepWorkflow(config: MultiStepWorkflowConfig): Promise<MultiStepResult>;
  
  // Changed behavior
  processActions(actions: Action[]): Promise<Record<string, ActionResult>>;
  // Now correctly uses cacheState for retrieving action results
}
```

### Sessions API Changes

The new Sessions API introduces several new endpoints and types:

```typescript
// New API endpoints
POST /api/v1/sessions                  // Create a new session
GET /api/v1/sessions/:id               // Get session details
DELETE /api/v1/sessions/:id            // End a session
POST /api/v1/sessions/:id/messages     // Send a message in session
GET /api/v1/sessions/:id/messages      // Get messages in session
POST /api/v1/sessions/:id/renew        // Renew session timeout
```

## Social Media Integrations

### Twitter/X Plugin Issues

The team has addressed several issues with the Twitter/X plugin:

- ElizaOS has filed an antitrust lawsuit against Elon Musk's X for allegedly suspending ElizaOS accounts and blocking sharing of ElizaOS GitHub links and website URLs
- Users reported compatibility problems with newer versions of the Twitter plugin which require paid API access:
  - Older versions (1.0.7/1.0.9) still support user/pass/email authentication
  - Newer versions require paid API credentials

### Farcaster Plugin Improvements

Farcaster is being recommended as an alternative to Twitter, with planned enhancements:

```typescript
// Upcoming feature for Farcaster plugin
// Add webhook support to reduce neynar compute units
await plugin.registerAction({
  name: 'SETUP_FARCASTER_WEBHOOK',
  description: 'Set up a webhook to receive Farcaster events',
  parameters: {
    callbackUrl: {
      type: 'string',
      description: 'URL to receive webhook events'
    }
  },
  handler: async (params, context) => {
    // Implementation
  }
});
```

## Model Provider Updates

### LLM Performance Testing

Performance testing between different LLM models revealed significant differences:

- **GPT-4o** significantly outperforms **Opus-3** for ElizaOS tasks:
  - GPT-4o: 2-3 minutes completion time
  - Opus-3: 8-10 minutes completion time

### OpenRouter Updates

- OpenRouter announced a 49-minute outage due to their database provider (Supabase) going down
- They're implementing improved redundancy and removing single points of failure
- Added Gemini 2.5 Image Preview as their first image generation model with 32k context length

### Local LLM Support

- Confirmation that Ollama is being used for Local LLM integration
- Teams observed issues with GPT-5-nano parameter naming, requiring the use of `max_completion_tokens` instead of `max_tokens`

## Breaking Changes

When migrating from V1 to V2, be aware of these critical changes:

1. **Parameter Naming in GPT-5-nano**: Update code to use `max_completion_tokens` instead of `max_tokens`:

```typescript
// Old (will fail)
const response = await llm.complete({
  messages,
  max_tokens: 1000 // Error: Unsupported parameter
});

// New (correct)
const response = await llm.complete({
  messages,
  max_completion_tokens: 1000
});
```

2. **Build System Migration**: The project has moved from tsup to Bun for builds:

```bash
# Old build command
npx tsup

# New build command
bun run build
```

3. **Plugin Dependencies**: Update to use `workspace:*` for all internal dependencies:

```json
// Old package.json
{
  "dependencies": {
    "@elizaos/core": "^1.2.0"
  }
}

// New package.json
{
  "dependencies": {
    "@elizaos/core": "workspace:*"
  }
}
```

4. **Logger API Changes**: Object-first structured logging is now required:

```typescript
// Old (no longer works)
logger.info('Loading plugin', pluginName);

// New (correct)
logger.info({ msg: 'Loading plugin', plugin: pluginName });
```

For any questions, join the ElizaOS Discord or refer to the updated documentation at [docs.elizaos.com](https://docs.elizaos.com).