@ariaflowagents/studio
v1.0.0
Published
Development tools for AriaFlow agents - CLI clients, debugging, and testing utilities
Maintainers
Readme
AriaFlow Studio
Development tools for AriaFlow agents - CLI clients, debugging, and testing utilities.
Installation
npm install -g ariaflow-studioOr use locally:
npx ariaflow-studioCLI Tools
ariaflow-chat - Universal Chat Client
Auto-detects protocol based on URL:
ws://orwss://→ WebSocket (CF AIChatAgent or Hono WS)http://orhttps://→ HTTP/SSE (Hono server)
Automatically appends /api/chat/sse for Hono servers if not specified.
# Interactive mode
ariaflow-chat ws://localhost:5173/agents/my-agent
ariaflow-chat http://localhost:3333
# One-shot message (non-interactive)
ariaflow-chat http://localhost:3333 -m "hello"
ariaflow-chat https://hospital-demo.up.railway.app -m "hello"
# With custom session
ariaflow-chat http://localhost:3333 -s my-session -m "hi"Options:
-m, --message <text>- Send a single message (non-interactive)-s, --session <id>- Set session ID-h, --help- Show help
ariaflow-chat-ws - WebSocket Client
Specialized for Cloudflare AIChatAgent connections.
ariaflow-chat-ws ws://localhost:5173/agents/support
ariaflow-chat-ws wss://my-agent.workers.devFeatures:
- Real-time bidirectional streaming
- Automatic reconnection (3 attempts)
- Tool call display
- Handoff notifications
- Flow node tracking
ariaflow-chat-http - HTTP/SSE Client
For Hono server or other HTTP-based agents.
ariaflow-chat-http http://localhost:3333/api/chat/sse
ariaflow-chat-http https://api.example.com/agents/chatFeatures:
- SSE streaming support
- Session management
- Suggested questions display
- Flow transition tracking
ariaflow-ui - Studio Web UI Launcher
Launches the Studio web app from packages/web-ui.
# Start local development UI
ariaflow-ui
# Build UI bundle
ariaflow-ui build
# Preview built bundle
ariaflow-ui previewCommands
All CLI tools support:
/clear- Clear conversation history/quitor/exit- Exit the clientCtrl+C- Graceful shutdown
Programmatic API
WebSocket Client
import { WebSocketClient } from 'ariaflow-studio/clients/ws';
const client = new WebSocketClient({
url: 'ws://localhost:5173/agents/my-agent',
onMessage: (text) => console.log(text),
onToolCall: (tool) => console.log('Tool:', tool.toolName, tool.input),
onHandoff: (handoff) => console.log('Handoff:', handoff.from, '→', handoff.to),
onFlowEvent: (event) => console.log('Flow:', event.type, event.node),
onConnect: () => console.log('Connected!'),
onDisconnect: () => console.log('Disconnected'),
onError: (err) => console.error('Error:', err),
});
await client.connect();
client.sendMessage('Hello!');HTTP Client
import { HttpClient } from 'ariaflow-studio/clients/http';
const client = new HttpClient({
url: 'http://localhost:3333/api/chat/sse',
sessionId: 'my-session',
onMessage: (text) => console.log(text),
onToolCall: (tool) => console.log('Tool:', tool.toolName),
onFlowTransition: (from, to) => console.log('Flow:', from, '→', to),
onSuggestions: (suggestions) => console.log('Suggestions:', suggestions),
onError: (err) => console.error('Error:', err),
});
await client.sendMessage('Hello!');Requirements
- Node.js >= 20
- For WebSocket client:
wspackage (included)
License
MIT
