Glossary
Key terms you will see in Xiajiao, grouped alphabetically.
A
Agent
An AI role with its own name, avatar, SOUL.md persona, model, and tools. Think of an agent as a specialized coworker.
@mention
In a group, @AgentName routes the message to that agent.
You: @Translator turn this paragraph into EnglishB
BM25
Classic lexical scoring. Xiajiao’s RAG combines BM25 (keyword) with vector (semantic) search, fused via RRF.
→ RAG
C
call_agent
Built-in tool: one agent can delegate a subtask to another (up to three nesting levels).
Code assistant → call_agent(translator, "translate these comments")Chunk
RAG splits documents into chunks—small (~200 characters) for precision, large (~800) for context.
→ RAG
Cron
Cron expressions schedule tasks (e.g. 0 9 * * * daily at 09:00). Exposed via manage_schedule.
D
Docker Compose
Optional orchestration (docker-compose.yml). Core idea remains: npm start is enough for many deployments.
E
Embedding
Text → dense vector. Used for semantic memory search and deduplication. Similar meanings yield high cosine similarity.
"likes Python" → [0.23, 0.87, …]
"prefers Python" → [0.21, 0.85, …]
similarity ≈ 0.97 → treated as duplicateF
FTS5
SQLite full-text search (version 5). Powers message search and BM25-style RAG retrieval without Elasticsearch.
G
Group
A shared channel for people and agents—members, leader, optional collaboration chain.
H
HTTP custom tool
A zero-code way to expose any REST API as an Agent tool. Configure URL, method, headers, body template with placeholders, and response extraction in Settings → HTTP Tools. Definitions stored in data/http-tools.json.
I
IM
Instant messaging—the primary UI metaphor in Xiajiao.
L
Leader
Default responder when no @mention is present.
LLM
Large language model (GPT-4o, Claude, Qwen, …). Xiajiao calls provider APIs on behalf of agents.
M
MCP
Model Context Protocol — standardized tool/schema negotiation. Xiajiao acts as an MCP client: connect external MCP servers (stdio or HTTP) in Settings, and their tools auto-register as mcp:{serverId}:{toolName}.
memory_write / memory_search
Persist and retrieve long-term memories per agent.
O
OWNER_KEY
Login password from the environment. Default admin must be changed in production.
OWNER_KEY="your-strong-password" npm start→ Security
P
Provider
LLM vendor (OpenAI, Anthropic, Alibaba Qwen, DeepSeek, …). Any OpenAI-compatible endpoint works.
PWA
Progressive Web App—installable UI with offline caching support.
R
RAG
Retrieval-augmented generation: fetch relevant chunks before answering to reduce hallucinations.
→ RAG
RBAC
Role-based access control—Owner, Admin, Member, Guest.
→ Security
RRF
Reciprocal Rank Fusion merges BM25 and vector rankings: score = Σ 1/(k + rank_i) with k = 60.
→ RAG
S
SOUL.md
Markdown persona file per agent—role, rules, tone. Structured alternative to a single blob system prompt; easy to version.
# Translator
You are a bilingual expert.
## Principles
- Faithful, fluent, elegantStream
Token-by-token generation pushed over WebSocket for a typing effect.
System prompt
What the LLM sees as instructions—assembled from SOUL.md, memory, and RAG context.
T
Tool calling
LLM-invoked functions. Seven built-in tools (web_search, rag_query, memory_write, memory_search, call_agent, manage_channel, manage_schedule) plus extensible custom tools via HTTP tools, JS auto-register, and MCP.
Tool registry
Centralized module (server/services/tool-registry.js) that manages global tool registration, per-agent allow/deny lists, and LLM schema conversion. Auto-scans server/services/tools/ and data/custom-tools/ directories on startup.
V
Vanilla JS
No React/Vue—plain browser JavaScript. Edit and refresh; no bundler required.
W
WAL
SQLite write-ahead logging—concurrent reads/writes and higher write throughput.
sqlite3 data/xiajiao.db "PRAGMA journal_mode;" # expect walweb_search
Built-in search across multiple engines with failover.
WebSocket
Full-duplex channel for pushes and streaming (ws package server-side).
Workspace
Per-agent folder data/workspace-{id}/ holding SOUL.md, memory.db, and RAG files—isolated from other agents.
X
Collaboration chain
Linear handoff order inside a group (e.g. novelist → editor → translator). One user message can walk the chain; the full collaboration UI also shows status and human overrides.
User message
→ novelist (~5s)
→ editor (~3s)
→ translator (~3s)
→ final answerXiajiao (虾饺)
Xiajiao (虾饺) is a Cantonese dim sum—har gow—with a thin wrapper and shrimp filling. The project name evokes something small and precise with a rich interior: minimal dependencies, full capability.
