@openui-xio/agent-interface
v0.0.1
Published
Agent communication protocol for connecting the OpenUI toolbar to IDE agents.
Readme
@openui-xio/agent-interface
Agent communication protocol for connecting the OpenUI toolbar to IDE agents.
Features
- Availability Management: Control agent availability with error handling
- State Management: Track agent state (idle, processing, etc.)
- Messaging: Handle user messages and stream agent responses
- Chat Capability: Full chat history support with multi-chat management
Installation
npm install @openui-xio/agent-interfaceUsage
import { createAgentServer } from '@openui-xio/agent-interface';
const { agent } = await createAgentServer({ port: 3000 });
agent.chat.setChatSupport(true);
const chatId = await agent.chat.createChat('My Chat');
agent.chat.addChatUpdateListener((update) => {
console.log('Chat update:', update);
});
agent.messaging.addUserMessageListener(async (msg) => {
agent.chat.streamMessagePart('msg-1', 0, {
content: { type: 'text', text: 'Hello!' },
updateType: 'create',
});
});See the developer guide for full documentation.
License
AGPL-3.0-only
