# ElizaOS Developer Update: June 12-18, 2025

## Core Framework

The ElizaOS framework underwent significant architectural improvements this week with the successful separation of the server functionality into a dedicated `@elizaos/server` package. This major refactoring, led by wtfsayo and continued from Shaw's earlier work, maintains full backward compatibility with existing CLI integrations while enabling independent usage of server components ([#5122](https://github.com/elizaos/eliza/pull/5122)).

Key architectural changes include:
- Core runtime initialization flow has been optimized to properly synchronize agent IDs and handle database adapters ([#5092](https://github.com/elizaos/eliza/pull/5092))
- Utility functions have been moved to `@elizaos/core` for better reusability ([#5138](https://github.com/elizaos/eliza/pull/5138))
- Extensive test coverage has been added across multiple packages including core, server, CLI, and plugins ([#5125](https://github.com/elizaos/eliza/pull/5125), [#5136](https://github.com/elizaos/eliza/pull/5136))
- Message filtering now properly scopes messages to the current chat/channel ([#5149](https://github.com/elizaos/eliza/pull/5149))

This restructuring improves modularity and simplifies the integration of ElizaOS components into custom applications.

## New Features

### Enhanced Chat UI

A major update to the chat interface improves the user experience with better styling and components:

```typescript
// New markdown rendering component with improved syntax highlighting
export const AnimatedMarkdown: React.FC<MarkdownProps> = ({ 
  children, 
  isAgentMessage = false,
  onLinkClick,
  ...props 
}) => {
  const { colorMode } = useColorMode();
  const bgColor = colorMode === 'dark' ? '#1e1e1e' : '#f5f5f5';
  
  return (
    <ReactMarkdown
      remarkPlugins={[remarkGfm, remarkMath]}
      rehypePlugins={[rehypeRaw, rehypeKatex]}
      components={{
        code({ node, inline, className, children, ...props }) {
          // Improved code block handling
        },
        // Additional component overrides
      }}
      {...props}
    >
      {children}
    </ReactMarkdown>
  );
};
```

Other UI/UX improvements include:
- Responsive design and improved container layout ([#5111](https://github.com/elizaos/eliza/pull/5111))
- New retry button for user messages ([#5141](https://github.com/elizaos/eliza/pull/5141))
- Support for all media types including enhanced file uploading ([#5137](https://github.com/elizaos/eliza/pull/5137), [#5115](https://github.com/elizaos/eliza/pull/5115))

### Channel Management APIs

New API endpoints enable more sophisticated management of channels and multi-agent interactions:

```javascript
// Example of using the new channel management API
const addAgentToChannel = async (channelId, agentId) => {
  const response = await fetch(`/api/channels/${channelId}/agents/${agentId}`, {
    method: 'POST',
    headers: { 'Content-Type': 'application/json' }
  });
  return response.json();
};
```

These endpoints facilitate building more complex agent interactions and group chat scenarios ([#5113](https://github.com/elizaos/eliza/pull/5113)).

### Action Logging & Prompting

New functionality for tracking prompts during runtime actions has been added, allowing developers to:
- See the exact prompt used for action selection
- Track action metadata and performance
- Debug action selection issues more easily ([#5099](https://github.com/elizaos/eliza/pull/5099))

## Bug Fixes

Several critical bugs have been resolved this week:

1. **UI "Stuck" Issue**: Fixed a problem where the chat UI would get stuck showing "agent is thinking" when agents ignored user messages or sent empty responses ([#5151](https://github.com/elizaos/eliza/pull/5151))

2. **Circular Reference Handling**: Implemented detection of circular references in JSON sanitizer to prevent infinite recursion:

```typescript
// New implementation with circular reference detection
export function sanitizeJson(obj: any, path: WeakMap<object, boolean> = new WeakMap()): any {
  if (obj === null || obj === undefined) {
    return obj;
  }
  
  if (typeof obj === "object") {
    // Check for circular references
    if (path.has(obj)) {
      return "[Circular Reference]";
    }
    path.set(obj, true);
    
    // Process arrays and objects
    if (Array.isArray(obj)) {
      return obj.map(item => sanitizeJson(item, path));
    } else {
      const result: Record<string, any> = {};
      for (const [key, value] of Object.entries(obj)) {
        result[key] = sanitizeJson(value, path);
      }
      return result;
    }
  }
  
  return obj;
}
```

3. **Knowledge Management (RAG)**: Fixed knowledge management functionality that was not working in version 1.0.6 ([#5004](https://github.com/elizaos/eliza/issues/5004))

4. **Agent ID Synchronization**: Resolved issues with agent ID synchronization in runtime initialization to prevent cross-talk between agents ([#5092](https://github.com/elizaos/eliza/pull/5092))

5. **Message Deletion**: Implemented real-time message deletion via SocketIO to provide immediate feedback to users ([#4968](https://github.com/elizaos/eliza/pull/4968))

## API Changes

The API landscape has seen significant updates:

1. **Reorganized API Endpoints**: API routes have been restructured into a logical domain-based organization:
   - `/api/agents/` - Agent management
   - `/api/channels/` - Channel operations
   - `/api/messages/` - Message handling
   - `/api/rooms/` - Room management

2. **Enhanced Documentation**: A comprehensive Postman collection with 90+ REST API endpoints has been added ([#5047](https://github.com/elizaos/eliza/pull/5047), [#5120](https://github.com/elizaos/eliza/pull/5120))

3. **Content Security Policy**: CSP settings have been updated to resolve compatibility issues with Safari and iframes, and to support cross-origin requests ([#5085](https://github.com/elizaos/eliza/pull/5085))

## Social Media Integrations

The Twitter plugin is currently undergoing maintenance, with users reporting several issues:

1. **403 Errors**: The `fetchHomeTimeline` function is failing with 403 errors, primarily due to API permission issues. A paid Twitter API subscription is required for certain functionality ([Discord discussion, 2025-06-15](https://discord.gg/ai16z))

2. **Auth Parameter Issues**: The auth parameter isn't being correctly utilized in the `requestApi` function, leading to authentication failures (Discord discussion)

3. **Limited Tweet Length Support**: Users have reported problems with fetching tweets over 280 characters, indicating limitations in the current implementation ([Discord discussion, 2025-06-15](https://discord.gg/ai16z))

A comparison between Twitter plugins in Eliza v1 and v2 was shared in the Discord, highlighting that v1 had superior implementation including better image analysis and topic integration.

## Model Provider Updates

Continued efforts to enhance and standardize model provider integrations:

1. **Anthropic Selection Fixed**: Resolved an issue where the Anthropic selection was not being properly recognized when creating custom AI agents using `elizaos create` (Discord discussion)

2. **Environment Variables**: New environment variable prompting support has been added to improve setup experience with model providers ([#4945](https://github.com/elizaos/eliza/pull/4945))

3. **Model Loading Optimization**: Improved model loading performance to reduce startup times

## Breaking Changes

As we continue transitioning to V2, developers should be aware of these breaking changes:

1. **Custom Characters Loading**: After upgrading to v1.0.7, some users reported issues with custom characters no longer registering as agents. This has been fixed in v1.0.9, but requires proper initialization ([#5039](https://github.com/elizaos/eliza/issues/5039)):

```typescript
// Correct way to initialize a custom character in v1+
const herbertAgent: ProjectAgent = {
  character: herbert,
  init: async (runtime: IAgentRuntime) => initCharacter({ runtime }),
};
const project: Project = {
  agents: [herbertAgent],
};
```

2. **Plugin Callback Changes**: Callbacks from plugin actions were not reaching end-user responses in chat. This issue affects developers using plugins with async operations like EVM transfers ([#5017](https://github.com/elizaos/eliza/issues/5017))

3. **Plugin Environment Variables**: Twitter plugin now requires different environment variables, moving from username/password authentication to API-based authentication using Twitter API keys and tokens ([#5055](https://github.com/elizaos/eliza/pull/5055))

4. **Agent Room API Changes**: Developers working with the agent rooms API should update their code as the endpoints have changed, and some issues with room creation exist ([#4955](https://github.com/elizaos/eliza/issues/4955))

For a complete migration guide and detailed documentation, refer to the newly added [CLAUDE.md](https://github.com/elizaOS/eliza/pull/5158) file which provides comprehensive guidance for developers working with the ElizaOS codebase.