# ElizaOS Developer Update for Week of August 4-5, 2025

## 1. Core Framework

The ElizaOS core framework has undergone significant changes this week with the integration of the Sessions API. This new system provides a simplified interface for messaging between users and agents, abstracting away the complexity of servers, channels, and participants.

```typescript
// Example of using the Sessions API
const session = await sessionsService.createSession({
  agentId: "agent-uuid",
  userId: "user-uuid",
  metadata: { context: "support" }
});

// Send a message in the session
await sessionsService.sendMessage({
  sessionId: session.id,
  content: "Hello, how can I help you today?",
  senderId: "agent-uuid"
});
```

A major PR (#316 files) for Eliza Cloud has been submitted, which will fundamentally transform the platform architecture. After merging, the team plans to onboard internal core members to the cloud platform.

We've also fixed a duplicate message bus issue and released version 1.3.2, improving system stability.

## 2. New Features

### Sessions API
The new Sessions API is now available in the platform and will soon be exposed in the api-client package. This API simplifies agent-user interactions and provides a more consistent interface for developers.

Key capabilities:
- Session creation with metadata
- Simplified message sending
- Session retrieval and management
- Automatic handling of channels and participants

### Scenarios Functionality
The scenarios feature has been fully implemented with comprehensive documentation. This allows for scripted agent interactions and workflows.

```yaml
# Example scenario.yaml
name: "Customer Support Workflow"
description: "Handles initial customer inquiries and routes to specialists"
agents:
  - id: "support-coordinator"
    config: { ... }
  - id: "technical-specialist" 
    config: { ... }
steps:
  - trigger: "user-message"
    action: "support-coordinator.analyze"
    next: "route-inquiry"
  - id: "route-inquiry"
    condition: "{{ result.category === 'technical' }}"
    true: "technical-specialist.respond"
    false: "support-coordinator.respond"
```

## 3. Bug Fixes

We've addressed several critical bugs this week:

### WebSocket Disconnections
Multiple users reported WebSocket disconnection issues with Ollama after approximately 5 minutes of streaming. Our investigation found that this was caused by an underlying idle timeout in the connection handling. The fix involved:

1. Implementing heartbeat packets to maintain connection state
2. Adjusting timeout parameters in the streaming protocol
3. Adding automatic reconnection logic with exponential backoff

### Memory Management
Fixed an issue where the `clearAgentMemories` command displayed incorrect counts when clearing agent memories:

```typescript
// Before:
console.log(`Successfully cleared ${result?.deleted} memories`); // Always showed 0

// After:
console.log(`Successfully cleared ${result?.deletedCount} memories`); // Correctly shows count
```

### Agent UUID Handling
Added robust error handling for UUID conversion in multiple agent commands:

```typescript
try {
  const uuid = asUUID(resolvedAgentId);
  // proceed with operation
} catch (error) {
  logger.error(`Invalid agent ID format: ${resolvedAgentId}`);
  throw new Error(`Invalid agent ID format: ${resolvedAgentId}. Please provide a valid UUID, agent name, or index.`);
}
```

## 4. API Changes

### Authentication Improvements
We've standardized authentication across the SDK with comprehensive support for API tokens:

- Added `--auth-token <token>` option to all agent commands
- Added support for the `ELIZA_SERVER_AUTH_TOKEN` environment variable
- Implemented consistent `X-API-KEY` header format across all requests

```bash
# Using auth token via CLI option
elizaos agent list --auth-token sk-abc123

# Using environment variable
export ELIZA_SERVER_AUTH_TOKEN=sk-abc123
elizaos agent get --name my-agent
```

### Dependency Standardization
All ElizaOS packages now use `workspace:*` for dependencies, improving consistency and development experience. This change affects:

- plugin-bootstrap
- test-utils
- project-tee-starter
- server
- api-client
- plugin-sql
- plugin-dummy-services
- cli

## 5. Social Media Integrations

### Twitter/X Issues
Several users reported that ElizaOS's Twitter/X accounts were suspended. We're actively working with Twitter support to restore access. In the meantime:

1. Fixed media upload to X/Twitter by switching from Bearer tokens to OAuth 1.0a
2. Added workarounds for taking screenshots of token charts while avoiding anti-bot measures using Playwright/Puppeteer with sleep timers and user agent scrambling

```javascript
// Example of anti-bot avoidance for chart screenshots
const browser = await playwright.chromium.launch();
const page = await browser.newPage();
await page.goto('https://chart-site.com');
await page.waitForTimeout(2000); // Random delay to appear human-like
await page.setUserAgent('Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36');

// Find and click past anti-bot barriers
const skipButton = await page.locator('button:has-text("Skip")').first();
if (await skipButton.isVisible()) {
  await skipButton.click();
  await page.waitForTimeout(1200); // Another random delay
}

await page.screenshot({ path: 'chart.png' });
```

## 6. Model Provider Updates

### Ollama Integration Issues
Users reported WebSocket disconnection problems with Ollama after approximately 5 minutes of streaming. We're investigating this issue and have implemented temporary workarounds for maintaining connections.

### Bootstrap Default LLM Setting
Added a new configuration option `BOOTSTRAP_DEFLLMOFF` that automatically turns off LLM responses when the bootstrap plugin initializes:

```typescript
// Disable default LLM responses in bootstrap plugin
process.env.BOOTSTRAP_DEFLLMOFF = "true";
```

## 7. Breaking Changes

### Workspace Dependencies
We've moved to `workspace:*` dependency references for all internal packages, which may cause issues for projects using the development version of the CLI. If you encounter problems:

```bash
# In your project root
bun add @elizaos/cli

# Or if you're having CLI issues
bun add @elizaos/api-client @elizaos/core
```

### VPS Deployment Fix
When deploying to VPS environments, you may encounter a "Could not find wrtc binary" error. To resolve this:

```bash
bun add @roamhq/wrtc-linux-x64
```

For detailed migration guides and documentation on the V1 to V2 transition, please refer to our [documentation portal](https://docs.elizaos.com/migration/v1-to-v2).

Remember to use the `clear-memories` command after re-ingesting RAG files to ensure optimal agent performance.