# Developer Update - 2025-09-07

## Core Framework

The past week has brought significant architectural improvements to ElizaOS's core framework. A major refactoring effort is underway to centralize business logic in a new `@eliza/server` package (PR #5864), moving away from duplicated code in the CLI. This change creates a cleaner separation of concerns with the new `ElizaOS` orchestration class and dedicated managers for Agent, Plugin, and Config functionality.

The CLI has been simplified to act as a thin orchestration layer, with 870+ lines of business logic moved to the server package. This will ultimately lead to a more maintainable codebase while maintaining backward compatibility.

Additionally, our versioning system has been improved to better handle development cycles:
```bash
# Develop branch uses alpha versions
1.5.8-alpha.0 

# Main branch uses beta versions
1.5.8-beta.0
```

This ensures proper synchronization between branches and more reliable releases.

## New Features

### Dynamic Prompting for Scenarios

A comprehensive implementation of multi-turn conversations in ElizaOS scenarios (PR #5824) enables sophisticated testing of agent behavior through extended conversations where an LLM simulates realistic user responses.

```yaml
# Example configuration for a multi-turn conversation scenario
run:
  - input: "I need help with something"
    conversation:
      max_turns: 4
      user_simulator:
        persona: "polite customer with a billing question"
        objective: "find out why charged twice this month"
        temperature: 0.6
      final_evaluations:
        - type: "llm_judge"
          prompt: "Did the agent successfully help resolve the billing issue?"
          expected: "yes"
```

This feature maintains 100% backward compatibility with existing scenarios while adding powerful new capabilities for testing complex interactions.

### Real-time Action Execution UI

The chat UI now displays real-time action calls (PR #5865), providing transparency into what agents are doing. Users can see actions as they happen with detailed input/output data, status tracking, and error handling:

```tsx
// Core tool visualization component with state-based styling
<ActionTool
  action="SEND_MESSAGE"
  input={{ text: "Hello world" }}
  output={{ result: "Message sent successfully" }}
  status="completed"
/>
```

This significantly improves developer experience by making agent behavior more observable and debuggable.

### Standalone CLI Chat Interface

A new standalone CLI chat interface (PR #5879) provides an enhanced interactive experience:

```bash
# Run the standalone chat with environment variables
LOG_LEVEL=debug OPENAI_API_KEY=sk-xxx bun run examples/standalone-cli-chat.ts
```

This implementation is similar to AI SDK's streamText but uses ElizaOS runtime and plugins, making it easier to test and debug agents in terminal environments.

## Bug Fixes

Several critical bugs were fixed this week:

1. **Image Generation in Discord**: Fixed a bug where generated images would appear in the web UI but not in Discord channels (PR #5861). This was resolved by properly handling the attachment URLs in the Discord plugin.

2. **Port Conflict Resolution**: Improved the CLI to automatically find a new port if the default is occupied (PR #5876), preventing crashes during startup:

   ```typescript
   // New port handling logic
   export async function findAvailablePort(startPort: number): Promise<number> {
     let port = startPort;
     while (!(await isPortAvailable(port))) {
       port++;
     }
     return port;
   }
   ```

3. **Admin GUI Loading Issue**: Fixed a bug in ElizaOS core 1.5.7 where the admin GUI wouldn't load due to "watcher watching test files." A temporary solution is to use the `start` command instead of `dev`.

4. **Plugin Registry Entries**: Fixed a bug in the NPM package field construction for registry entries (PR #5882), which was causing malformed additions to the registry when users published plugins.

5. **Logging Improvements**: Enhanced the logger to properly respect the debug level setting and improved terminal readability (PR #5849). Also fixed an issue with `LOG_JSON_FORMAT` not working correctly (PR #5885).

## API Changes

The ElizaOS API has been enhanced with several new endpoints and message handling capabilities:

1. **Action Message Endpoints**:
   ```typescript
   // Create new action messages
   POST /api/messaging/action
   
   // Update existing action messages
   PATCH /api/messaging/action/:id
   ```

2. **Enhanced Message Service**:
   ```typescript
   // New methods in the message service
   getMessageById(id: string): Promise<Message>
   updateMessage(id: string, data: Partial<Message>): Promise<Message>
   ```

3. **Event System Enhancements**:
   ```typescript
   // Enhanced action lifecycle events with detailed payloads
   interface ActionStartedEvent {
     type: 'ACTION_STARTED';
     messageId: string;
     action: string;
     params: Record<string, any>;
   }
   
   interface ActionCompletedEvent {
     type: 'ACTION_COMPLETED';
     messageId: string;
     action: string;
     result: any;
     error?: string;
   }
   ```

These changes enable better tracking and visualization of agent actions throughout the system.

## Social Media Integrations

This week saw several improvements to social media integrations:

1. **Twitter Integration**: A new implementation of a Twitter client for agents was shared by community member Trixi, who noted they had to write a custom plugin to make it work. The team is investigating how to make this process smoother.

2. **Farcaster Integration**: The Spartan agent for Farcaster is operational but needs tuning as it's producing repetitive responses. Some users reported issues with the Farcaster app getting stuck during account creation.

3. **Privacy Flow for Transactions**: A proposal was shared for a privacy-focused transaction flow for x402 transactions using protocols like Railgun (EVM) or PrivacyCash (Solana).

## Model Provider Updates

Several model provider integrations were updated this week:

1. **OpenRouter Updates**: New Sonoma AI models with 2M context windows are now available through OpenRouter. A PR was created for OpenRouter image generation model integration.

2. **Anthropic API Credits**: Community members reported that Anthropic API credits have been depleted, affecting service availability. The team is working to resolve this issue.

3. **Model Announcements**:
   - **Kimi K2 Upgrade**: New model with improved coding capabilities and 256k context length
   - **Qwen3-Max Release**: Enhanced performance across math, coding, and multilingual tasks

## Breaking Changes

While most changes maintain backward compatibility, developers should be aware of these potential issues when migrating from V1 to V2:

1. **Plugin Development**: The refactored architecture centralizes plugin loading and dependency resolution in the server package. Plugin developers should review the new `PluginLoader` class in `packages/server/src/managers/PluginLoader.ts` to understand how dependencies are now resolved.

2. **CLI Command Structure**: Although the public API remains the same, the underlying implementation of CLI commands has changed significantly. If you've built custom scripts that rely on internal CLI implementation details, you may need to update them.

3. **Action Handling**: The enhanced action tracking system requires updated event handlers. If you've implemented custom action handling, ensure you're properly handling the updated `ACTION_STARTED` and `ACTION_COMPLETED` events with their new payload structure.

For a smooth migration, we recommend testing your plugins and custom implementations with the latest alpha versions before upgrading to beta or stable releases.

[GitHub Issues](https://github.com/elizaOS/eliza/issues)
[PR #5864: Refactor CLI](https://github.com/elizaOS/eliza/pull/5864)
[PR #5824: Dynamic Prompting](https://github.com/elizaOS/eliza/pull/5824)
[Documentation](https://docs.elizaos.com)