Agents
An AI chat UI kit, with the server behind it.
Put an agent behind a conversation in your own product. The kit ships the server that runs it and the chat for web, mobile and desktop. You keep your login, your API and your data.
Three files and you have a copilot.
A server with one of your tools, an agent that may use it, and a chat that signs in with your app’s session.
src/app.module.ts
import { Module } from '@nestjs/common';
import { PilotooModule } from '@pilotoo/server';
import { searchOrders } from './tools/search-orders';
@Module({
imports: [
PilotooModule.forRoot({
env: process.env,
tools: (registry) => registry.register(searchOrders),
}),
],
})
export class AppModule {}.pilotoo/agents/support.yaml
id: support
name: Support
description: Answers questions about orders.
status: active
runtime:
systemPrompt: You help customers with their orders.
profileId: default
tools: [search_orders]
builtinTools: []
skills: []
knowledge: []
presentation: {}Assistant.tsx
import { ChatPanel, ChatProvider } from '@pilotoo/ui/chat';
export function Assistant() {
return (
<ChatProvider baseUrl={import.meta.env.VITE_API_URL} getToken={() => session.accessToken}>
<ChatPanel />
</ChatProvider>
);
}Take the parts you need.
A mobile app needs only client packages. A desktop app adds a backend on the user’s machine.
- Agent server
A NestJS module: conversations, streaming, approvals and persistence on PostgreSQL.
@pilotoo/server - Runtime
Agents as definitions, with tool and skill registries and ports for identity, models and usage.
@pilotoo/agent-runtime - Web UI
React components and design tokens, or one call that mounts the chat on any page.
@pilotoo/ui - Mobile UI
React Native components for Expo, talking to the same server.
@pilotoo/chat-ui - Desktop backend
The same backend on SQLite, as a sidecar of a Tauri app on the user’s machine.
@pilotoo/local-server - Client core
Session, stores and transport, with no DOM: the base of every UI.
@pilotoo/chat-core
What a conversation can do.
- Approvals
A tool can stop the run until a person approves, edits or rejects the call.
- Browser tools
The page declares tools per run: ask the page, or draw a result as a card.
- Edit and regenerate
Change a past message or ask again, and the thread forks.
- Subagents and skills
Delegate to another agent, or load instructions only when they are needed.
- Schedules
Run an agent on a cron, as the user who scheduled it.
- Voice
Read replies aloud and dictate, in the browser or with native engines.
Give the agent the other blocks.
Turn on a block to see what the agent gets from it.