How souravberaakaspeed/xiryn works
Xiryn is a self-hosted personal-agent app: users create agents or squads, configure models, then send durable chat turns and follow work in each agent’s isolated Docker desktop. The runtime combines provider-backed reasoning with workstation, web, memory, and approval-gated vault tools; SQLite stores local state. Telegram offers optional remote control. README documents additional behavior such as desktop takeover, speech input, and notifications; those are represented where the tree supports a component, while unsampled wiring is not inferred.
Main entry points: runtime.ts Turn runtime · tools.ts Agent tools · index.ts SQLite database · page.tsx Workspace pages
Components 28
Workspace experience
- Workspace pages
app/(workspace)/page.tsx - Thread interface
components/thread/thread-view.tsx - Start thread
components/thread/start-thread.tsx - Settings
components/settings/settings-form.tsx - Workbench
components/workbench/screen.tsx
Agent execution
- Turn endpoint
app/api/threads/[threadId]/turn/route.ts - Turn runtime
lib/agent/runtime.ts - Agent tools
lib/agent/tools.ts - Agent instructions
lib/agent/instructions.ts - Model providers
lib/providers/registry.ts - Model catalog
lib/providers/catalog.ts
Local operations
- Agent workstation
lib/workstation.ts - Docker control
lib/docker.ts - Web research
lib/web.ts - Encrypted vault
lib/vault.ts - Vault approvals
lib/vault-requests.ts
Remote integrations
- Telegram bridge
lib/telegram/bridge.ts - Telegram API
lib/telegram/api.ts - Live events
lib/events.ts
Local state
- SQLite database
db/index.ts - Data schema
db/schema.ts - Settings service
lib/config.ts - Workspace queries
queries/workspace.ts
Other components
- User
- Web search service
- Model provider
- Docker engine
- Telegram user
Connections 31
- User → Workspace pages: opens
README.md - Workspace pages → Workspace queries: loads data
app/(workspace)/page.tsx - Workspace queries → SQLite database: queries
queries/workspace.ts - Workspace pages → Start thread: starts chat
- Start thread → Thread interface: opens thread
components/thread/start-thread.tsx - User → Thread interface: sends message
README.md - Thread interface → Turn endpoint: submits turn
- Turn endpoint → Turn runtime: starts turn
app/api/threads/[threadId]/turn/route.ts - Turn runtime → Agent tools: executes tools
lib/agent/runtime.ts - Turn runtime → Agent instructions: loads instructions
lib/agent/runtime.ts - Turn runtime → Model providers: resolves model
lib/agent/runtime.ts - Model providers → Model provider: calls provider
- Agent tools → Agent workstation: controls desktop
lib/agent/tools.ts - Agent workstation → Docker control: manages containers
lib/workstation.ts - Docker control → Docker engine: controls
- Agent tools → Web research: searches web
lib/agent/tools.ts - Web research → Web search service: requests research
- Agent tools → Encrypted vault: uses approved secrets
lib/agent/tools.ts - Agent tools → Vault approvals: checks approval
- Settings → Settings service: updates settings
components/settings/settings-form.tsx - Settings → Model catalog: selects models
- Model catalog → Model providers: lists providers
- Workbench → Agent workstation: controls workstation
components/workbench/screen.tsx - Turn runtime → SQLite database: persists turns
lib/agent/runtime.ts - SQLite database → Data schema: uses schema
db/index.ts - Settings service → SQLite database: reads and writes
lib/config.ts - Turn runtime → Live events: publishes progress
lib/agent/runtime.ts - Telegram user → Telegram bridge: messages bot
README.md - Telegram bridge → Turn runtime: starts turns
lib/telegram/bridge.ts - Telegram bridge → Telegram API: sends and polls
lib/telegram/bridge.ts - Telegram API → Telegram user: delivers replies