# ElizaOS Developer Update - Week of November 11-17, 2025

## 1. Core Framework

The ElizaOS framework received significant stability and performance improvements this week with several critical PRs merged:

### Environment Variable Loading Fix
We've completely overhauled how environment variables are loaded in the framework. Instead of relying solely on `.env` files, the system now properly loads variables from `process.env`, ensuring agents can access their configuration settings regardless of how environment variables are defined.
```javascript
// Before (problematic):
// Variables defined with export VAR=value would return undefined
const apiKey = runtime.getSetting("API_KEY"); // undefined

// After (fixed):
// Variables work consistently whether from .env or export
const apiKey = runtime.getSetting("API_KEY"); // "your-key-value"
```
PR: [#6141](https://github.com/elizaOS/eliza/pull/6141)

### Row-Level Security (RLS) Validation Fix
A critical issue with Row-Level Security that was incorrectly blocking all users when RLS isolation was disabled has been resolved. This fix ensures proper access control behavior in multi-tenant environments.

```typescript
// Before: Validation would block all requests when RLS was disabled
function validateServerAccess(serverId: string, userId: string): boolean {
  // Always required server_id even when RLS was disabled
  return validateRlsServerAccess(serverId, userId);
}

// After: Validation is properly conditional on RLS being enabled
function validateServerAccess(serverId: string, userId: string): boolean {
  // Skip validation when RLS is disabled
  if (!getConfig().rlsEnabled) return true;
  return validateRlsServerAccess(serverId, userId);
}
```
PR: [#6139](https://github.com/elizaOS/eliza/pull/6139)

### ElizaOS Runtime Reference
A new feature has been added to provide an ElizaOS reference within the runtime environment, laying groundwork for the upcoming unified messaging API. This enables more consistent interaction patterns for plugins and extensions.

```typescript
// New capability
const elizaOS = runtime.getElizaOS();
await elizaOS.sendMessage({
  channel: "general",
  content: "Hello from the unified API!"
});
```
PR: [#6111](https://github.com/elizaOS/eliza/pull/6111)

## 2. New Features

### Dynamic Prompt Execution Framework
A new schema-based dynamic prompt execution system has been introduced to address context limitations in smaller models and prevent hallucinations. This framework provides:

- Schema-driven prompt execution with validation codes
- XML/JSON parsing with automatic retries
- Token estimation and optimization
- Performance metrics tracking

```typescript
// Example usage of the new dynamic prompt framework
const result = await runtime.dynamicPromptExecFromState({
  schema: {
    thought: { type: "string", required: true },
    actions: { type: "array", required: true }
  },
  prompt: `
    <task>Analyze the following data and provide your thoughts</task>
    <data>{{userQuery}}</data>
    
    Provide your response in this format:
    <thought>Your analysis</thought>
    <actions>
      <action>Step 1</action>
      <action>Step 2</action>
    </actions>
  `,
  state: { userQuery: "How can I improve system performance?" }
});

console.log(result.thought); // "To improve system performance we should examine..."
console.log(result.actions); // ["Check for memory leaks", "Optimize database queries"]
```

This approach replaces manual XML parsing throughout the framework, providing consistent validation and error handling.

## 3. Bug Fixes

### Entity Names Array Serialization
Fixed a critical issue in the SQL plugin where entity creation was failing due to improper serialization of the `names` field. The system now properly normalizes the field to ensure it's always stored as a string array.

```typescript
// Before: Set objects would cause database errors
const entity = {
  names: new Set(["user1", "user2"]),
  metadata: { role: "admin" }
};
// Error: "column \"names\" is of type character varying[] but expression is of type record"

// After: All iterable types properly normalized
const entity = {
  names: new Set(["user1", "user2"]),
  metadata: { role: "admin" }
};
// Success: Automatically converts to ["user1", "user2"]
```
PR: [#6133](https://github.com/elizaOS/eliza/pull/6133)

### Agent Settings Persistence
Fixed an issue where agent settings weren't persisting across restarts, causing runtime-generated configuration to be lost. Settings now properly merge and persist between sessions.

```typescript
// Before: Settings lost on restart
agent.updateSettings({ temperature: 0.7 });
// After restart: temperature reverted to default

// After: Settings properly persisted
agent.updateSettings({ temperature: 0.7 });
// After restart: temperature remains 0.7
```
PR: [#6106](https://github.com/elizaOS/eliza/pull/6106)

## 4. API Changes

### Runtime Initialization Options
Added a new `skipMigrations` option to `runtime.initialize()` for scenarios where plugin migrations should be skipped. This is particularly useful for serverless environments or when using read-only connections.

```typescript
// New initialization option
await runtime.initialize({
  skipMigrations: true,
  // other options...
});
```
PR: [#6132](https://github.com/elizaOS/eliza/pull/6132)

### Agent Memory Management
When initializing agents, we've improved how agent settings and memories are handled to ensure better persistence and retrieval. This provides more predictable behavior for long-running agents.

## 5. Social Media Integrations

Several users have reported issues with the X (Twitter) plugin where posts from agents using elizaOS are not working properly, while posts from custom Python agents are functioning correctly. The team is investigating this issue as a priority and will have a fix before the upcoming EFDevcon event.

A rebuilt X-like platform with AI agents for prediction markets is being developed, with a demo planned for the upcoming Devconnect event. This platform will leverage ElizaOS agents as a training ground for improving prediction capabilities.

## 6. Model Provider Updates

### Vector DB Enhancements
We've initiated a discussion on improving the transparency and verifiability of embeddings in Vector DBs for onchain data. The `agentmemory` plugin currently integrates with centralized solutions like ChromaDB, but we're exploring more transparent alternatives for blockchain applications.

### OpenRouter Integration
A new PR has been opened to add OpenRouter embedding options to the CLI, expanding the framework's model provider integrations:

```bash
# New CLI command for OpenRouter embeddings
eliza embed --provider openrouter --model "openrouter/jina-embed-v2-base-en" --text "Sample text for embedding"
```
PR: [#6142](https://github.com/elizaOS/eliza/pull/6142)

## 7. Breaking Changes

### Migration from AI16Z to ElizaOS Tokens
A token migration from AI16Z to ElizaOS is in progress, with several important details developers should be aware of:

- A snapshot was taken on November 11, 2023 at 11:40 UTC
- Migration ratio is 1:6 (1 AI16Z = 6 ElizaOS)
- Migration period will last 90 days
- Users with tokens in liquidity pools during the snapshot need special handling

For developers building applications with token integration, note that the whitelist system means wallet addresses eligible for migration are pre-determined based on the snapshot. Applications should not assume new AI16Z token purchases can be migrated.

### EventType.MESSAGE_RECEIVED Deprecation
The `EventType.MESSAGE_RECEIVED` event has been removed from bootstrap. Plugins previously using this event should be updated to use the service approach instead:

```typescript
// Old approach (no longer works)
runtime.events.on(EventType.MESSAGE_RECEIVED, (message) => {
  // Handle message
});

// New approach (current recommendation)
const messageService = runtime.services.get('message');
messageService.on('messageReceived', (message) => {
  // Handle message
});
```

---

This concludes our developer update for the week. As always, your feedback and contributions are welcome via GitHub issues and pull requests. For technical support, please use the appropriate Discord channels.