# ElizaOS Developer Update
**Week of November 11-18, 2025**

## 1. Core Framework

The ElizaOS runtime has received significant enhancements this week to improve its architecture and reliability:

- **Browser Compatibility**: The ElizaOS core and runtime now fully work in browser environments, with only some plugins not yet migrated for browser compatibility.
  ```javascript
  // Browser-compatible runtime initialization
  const runtime = await ElizaOS.initialize({
    browserMode: true,
    skipMigrations: true, // New option
    plugins: [pluginWasmPGLite]
  });
  ```

- **Runtime Initialization**: Added a new `initPromise` to `IAgentRuntime` interface to better handle async initialization, along with an optional `skipMigrations` parameter for `runtime.initialize()`.
  ```typescript
  // New runtime interface enhancement
  interface IAgentRuntime {
    // Existing methods...
    initPromise: Promise<void>;
    initialize(config?: RuntimeConfig, skipMigrations?: boolean): Promise<void>;
    // ...
  }
  ```

- **ElizaOS Reference**: Added an ElizaOS reference within the runtime, a key step toward creating a unified messaging API.

- **Configuration Fix**: Resolved a critical issue where environment variables weren't loading correctly, preventing agents from accessing settings. The system now properly loads variables from `process.env` instead of relying solely on `.env` files.

## 2. New Features

### Distributed Browser Runtime
A new concept for a distributed runtime that can operate across browsers is in development:

```javascript
// Conceptual implementation of distributed browser runtime
class DistributedRuntime {
  constructor() {
    this.runtimeInstances = new Set();
    this.keepAlive = new DistributedObject('runtime_registry');
  }
  
  async register() {
    // Register this runtime instance with the network
    await this.keepAlive.add(this.instanceId, {
      lastSeen: Date.now(),
      capabilities: this.capabilities
    });
  }
  
  async findAvailableRuntime(requirement) {
    // Find an available runtime that meets requirements
    const instances = await this.keepAlive.getAll();
    return instances.find(i => i.capabilities.meets(requirement));
  }
}
```

### Zero-Knowledge Primitives
Work has begun on implementing ZK (zero-knowledge) primitives for game-oriented features in ElizaOS:

```javascript
// Example of ZK commit-reveal scheme for games
class ZKGameVerifier {
  async createCommitment(choice, secret) {
    const commitment = await crypto.subtle.digest(
      'SHA-256', 
      new TextEncoder().encode(`${choice}-${secret}`)
    );
    return Array.from(new Uint8Array(commitment))
      .map(b => b.toString(16).padStart(2, '0'))
      .join('');
  }
  
  async verify(commitment, revealed, secret) {
    const newCommitment = await this.createCommitment(revealed, secret);
    return commitment === newCommitment;
  }
}
```

### Self-Propagating Agent System
A proposal for creating a "consensual worm" agent that can play games like rock-paper-scissors while maintaining itself across a distributed network:

```javascript
// Conceptual implementation of self-propagating agent
class SelfPropagatingAgent {
  constructor(runtime) {
    this.runtime = runtime;
    this.genome = this.getSelfCode();
  }
  
  async findNewHost() {
    const hosts = await this.runtime.network.discoverHosts();
    if (hosts.length > 0) {
      await this.migrate(hosts[0]);
    }
  }
  
  async migrate(host) {
    await host.runtime.eval(this.genome);
  }
  
  getSelfCode() {
    return this.constructor.toString();
  }
}
```

## 3. Bug Fixes

### Row-Level Security (RLS) Validation
Fixed a critical issue with Row-Level Security (RLS) that prevented proper user access when isolation is disabled:

```javascript
// Before: Incorrect RLS validation
function validateServerAccess(req, server_id) {
  if (!req.user) return false;
  return req.user.server_id === server_id;
}

// After: Fixed RLS validation with isolation check
function validateServerAccess(req, server_id) {
  if (!req.user) return false;
  if (!isRLSIsolationEnabled()) return true;
  return req.user.server_id === server_id;
}
```

### Entity Names Serialization
Fixed entity creation failures by normalizing the names field to ensure it's always a proper array before database operations:

```javascript
// Normalizes entity names to always be a string array
private normalizeEntityNames(names: any): string[] {
  if (names === undefined || names === null) {
    return [];
  }
  
  // Handle single string (without splitting it into chars)
  if (typeof names === 'string') {
    return [names];
  }
  
  // Handle Set objects
  if (names instanceof Set) {
    return Array.from(names).map(String);
  }
  
  // Handle arrays and array-likes
  if (Array.isArray(names) || typeof names[Symbol.iterator] === 'function') {
    return Array.from(names).map(String);
  }
  
  // Handle non-iterables by returning them as a single-item array
  return [String(names)];
}
```

### Runtime Function Duplication
Identified redundancy between `runtime::generateText` and `runtime::useModel` functions. The team determined that `generateText` serves a specific purpose for one-off prompts that include agent personality which `useModel` doesn't handle.

## 4. API Changes

### ElizaOS Core Types Update
New types have been added to support the unified messaging API and runtime enhancements:

```typescript
// New and updated types
export interface IElizaOS {
  // Core ElizaOS methods
  hasPlugin(pluginName: string): boolean;
  getPlugin<T>(pluginName: string): T | null;
  hasFeature(featureName: string): boolean;
}

export interface IAgentRuntime {
  // New method to check ElizaOS availability
  hasElizaOS(): this is RuntimeWithElizaOS;
  // ...existing methods
}

// Type predicate helper
export interface RuntimeWithElizaOS extends IAgentRuntime {
  elizaOS: IElizaOS;
}
```

### LangChain Migration
Migrated from LangChain v0.3 to @langchain/textsplitters v1.0:

```typescript
// Before: Old LangChain import
import { RecursiveCharacterTextSplitter } from "langchain/text_splitter";

// After: Updated import
import { RecursiveCharacterTextSplitter } from "@langchain/textsplitters";
```

## 5. Social Media Integrations

### Twitter Plugin
An issue with the Twitter plugin returning 429 errors was reported and is currently being addressed. This affects agent interactions with Twitter and limits the ability to post content automatically.

### Farcaster Integration
There's ongoing discussion about implementing a feature to enable agents to post commentary to Farcaster about game winnings, enhancing social engagement through AI agents.

```typescript
// Conceptual implementation of agent social posting
async function postGameResults(agent, game, result) {
  if (agent.hasPlugin('plugin-farcaster')) {
    const farcaster = agent.getPlugin('plugin-farcaster');
    await farcaster.cast(`I just ${result.won ? 'won' : 'lost'} a game of ${game.name}! ${result.commentary}`);
  }
}
```

## 6. Model Provider Updates

### DeepSeek API Support
A new issue was opened inquiring about DeepSeek API integration, indicating user interest in additional model providers beyond the current offerings. The team is evaluating this request for future implementation.

### Current Model Provider Status
The `useModel` function is now preferred over `generateText` for most use cases, providing better integration with different model providers:

```javascript
// Recommended pattern for model interaction
const response = await runtime.useModel('completion', {
  messages: [
    { role: 'system', content: 'You are a helpful assistant.' },
    { role: 'user', content: userQuery }
  ],
  provider: 'openai',  // or 'anthropic', 'deepseek', etc.
  model: 'gpt-4o-mini'
});
```

## 7. Breaking Changes

### Token Migration Deadline
The migration from AI16Z to ElizaOS tokens has a February deadline, with a 1:6 conversion ratio (4 tokens to developers). Manual migrations will be possible after the deadline for those with valid reasons. Unclaimed tokens after the deadline will add value to ELIZAOS.

### Browser Compatibility Requirements
As ElizaOS moves to support browser environments fully, developers should be aware that:
- Core and runtime now fully work in browsers
- Some plugins are not yet migrated for browser compatibility
- When developing browser-based applications using ElizaOS, use the new `browserMode: true` option

### Upcoming Eliza Cloud Service
A new Eliza Cloud service is in development, with revenue planned to buy back ELIZAOS tokens. This service will require developers to adapt their applications to work with the cloud environment:

```javascript
// Example of initializing with cloud support
const runtime = await ElizaOS.initialize({
  cloudEnabled: true,
  cloudApiKey: "your-api-key-here",
  fallbackToLocal: true // For graceful degradation
});
```

---

**Next Steps for Developers:**
1. Test your agents in browser environments with the latest runtime
2. Review your usage of `generateText` vs `useModel` functions
3. Ensure proper handling of environment variables in your applications
4. Prepare for Eliza Cloud integration by updating your token usage patterns

For more details, see the related PRs: [#6111](https://github.com/elizaOS/eliza/pull/6111), [#6139](https://github.com/elizaOS/eliza/pull/6139), [#6141](https://github.com/elizaOS/eliza/pull/6141), [#6146](https://github.com/elizaOS/eliza/pull/6146), [#6152](https://github.com/elizaOS/eliza/pull/6152)