Synaplan
開源 AI 平台,供企業使用:自行託管的 AI 代理、符合 GDPR 的聊天機器人小工具、RAG 知識庫、WhatsApp 與 Outlook AI、MCP、多模型路由。Docker、Kubernetes 或託管於 Germ
AI 翻譯
尚未偵測到更新。GitHub 發布版本後會顯示在這裡。
個人 GitHub 帳號下公開儲存庫的擁有者可以登入並驗證所有權,自行管理介紹,無需管理員核准。
登入並產生驗證檔案,在 30 分鐘內將其提交至此儲存庫的預設分支。其他分支或分叉儲存庫中的檔案無效。然後在下方檢查檔案,即可無需管理員核准直接管理專案。請保留檔案以維持管理權限。
如需登入,將前往登入頁面。登入後請回到此處,再次點擊所選的驗證按鈕。
在專案資料夾中執行 /nomorevibe verify,即可驗證所有權並自行管理介紹。
一分鐘完成驗證Nexo Assist — conversational IT support agent (NestJS + Next.js)
翻譯準備中
取自儲存庫 README
正在載入完整 README。
檢視完整 README ↗Conversational IT service desk for the Beyond the Bytes technical challenge. Employees chat with an agent that proposes actions; a deterministic policy engine decides priority, SLA, duplicity and confirmation; ticket writes happen only after an exact draft version is confirmed.
Deeper engineering notes: docs/README.md.
>=20 (see engines in root package.json)11.12.0 (see packageManager in root package.json)pnpm install
docker compose up -d postgres
cp .env.example .env
# optional: set OPENROUTER_API_KEY (default) or OPENAI_API_KEY for a real model
pnpm db:migrate
pnpm db:seed
pnpm dev
pnpm db:migrate / pnpm db:seed are root shortcuts for the API package. Re-running seed when seed_meta already has nexo-assist-demo-v4 skips without duplicating users.
cp .env.example .env
docker compose up --build
API image runs migrate + idempotent seed on start.
postgres://nexo:nexo@localhost:5432/nexo.env.example)| Variable | Role |
|---|---|
DATABASE_URL | Postgres connection |
API_PORT / NEXT_PUBLIC_API_URL | API listen port and browser base URL |
SESSION_SECRET | Session cookie signing |
CORS_ORIGIN | Allowed web origin (default http://localhost:3000) |
LLM_PROVIDER | openrouter (default) | openai | scripted |
OPENROUTER_* / OPENAI_* | Keys and models for live providers |
TICKET_FAULT | off | unavailable | fail_once — ticket gateway fault injection |
LOG_LEVEL | Nest verbosity; agent business traces use context AgentTrace (grep AgentTrace) |
We run @mastra/core (Agent + createTool + generate) inside the Nest API process. The PRD prefers Mastra (or LangGraph.js); we picked Mastra because this product needs a short tool-calling loop, not a second orchestration graph — Nest already owns session, lease, HITL and persistence. LangGraph would duplicate that job for little gain here.
Provider default is OpenRouter + a free Nemotron model on purpose: the challenge allows any LLM, and this combo is the best cost/benefit for a public demo — evaluators get real multi-turn chat without us (or them) paying per token, while Mastra still routes a normal chat model. Paid OpenAI remains available if you prefer it; CI stays on scripted so proof does not depend on a vendor.
openrouter + free Nemotron: live agent UX at near-zero cost.openai: same Mastra path when you already have an OpenAI key/model.scripted: no network and no tokens — how CI proves the pipeline. Decision quality still comes from @nexo-assist/domain and integration tests, not from hoping the model is stable in CI.Two functional profiles are seeded for evaluators. There is no public signup and no admin panel.
| Profile | Purpose | |
|---|---|---|
[email protected] | employee | Chat, ticket consult, handoff to analyst |
[email protected] | analyst | Attendance console (claim / return / close) |
[email protected] | employee | Extra employee fixture (privacy / race) |
[email protected] | employee | Extra employee fixture (console queue) |
Demo password rule (evaluation only): any non-empty password is accepted for seeded emails (for example demo). Unknown email and empty password share one generic error. Passwords are not stored — the users table has no password column.
[email protected] and any non-empty password/chat — test conversation with the agent, ticket list/consulta, draft confirmation, and handoff phrases[email protected] and any non-empty password/console — test queue filters, claim, return to agent, close, and analyst messagesRole comes from the authenticated session on the API (EmployeeGuard / AnalystGuard). Hiding menus is not the security boundary.
UsageGuard enforces 30 employee messages / conversation, 4000 chars, one in-flight execution (atomic busyUntil claim), max 4 tool steps, last-10-message context, 20s provider timeout, 600 max output tokens. An open waiting_analyst / with_analyst conversation is reused — the API never opens a fresh with_agent thread to bypass pause or the message budget.@mastra/core. Model routing: openrouter/<OPENROUTER_MODEL> or openai/<OPENAI_MODEL>. Tools are only search_help, list_my_tickets, get_ticket, and prepare_draft. LLM_PROVIDER=scripted keeps a deterministic loop for CI without calling the model.@nexo-assist/domain applies Annex A: priority, business-hour SLA (America/Sao_Paulo), duplicity thresholds, reopen window (168h inclusive), and draft confirmation phrases.TicketGateway with operationId idempotency (create runs in a DB transaction). Create / update / reopen / transfer are never model tools.high / medium / low) and shown as expandable chips (intent, tool, rule, result, grau de segurança, justification).Logger lines under context AgentTrace (turn.started → turn.event rules/tools → turn.completed / turn.failed, plus draft.confirm). Filter API stdout with grep AgentTrace. Set LOG_LEVEL=debug for more Nest verbosity (default log).| Layer | Command | What it covers |
|---|---|---|
| Domain | pnpm --filter @nexo-assist/domain test | Priority, SLA, duplicity, transitions, confirmation, out-of-IT, confidence, draft completeness |
| API + Postgres | LLM_PROVIDER=scripted pnpm --filter @nexo-assist/api test | Owner privacy, HITL, out-of-IT, unsure offer, ticket fault retry, conversation reload |
| UI unit | pnpm --filter @nexo-assist/web test | Event labels + chat derivations |
| UI e2e | Install browsers once: pnpm --filter @nexo-assist/web exec playwright install — then with apps running: pnpm --filter @nexo-assist/web test:e2e | Login, chat, console claim, consulta |
| Types / build | pnpm typecheck / pnpm build | Strict TypeScript across packages |
Traceability: docs/TRACEABILITY.md.
apps/web Next.js employee chat + analyst console
apps/api NestJS session, UsageGuard, orchestrator, TicketGateway
packages/domain Pure Annex A rules (no framework, no LLM)
packages/contracts Shared Zod schemas
PostgreSQL is the source of truth for users, sessions, conversations, messages, drafts, tickets, history, help articles, operations and execution events. localStorage is not used as authority.
Agent module layout and decision ADRs: docs/agent.md, docs/architecture.md.
Security was part of the architecture from the start. An AI agent can interpret untrusted content and call tools that touch real operations, so we assume the model can be manipulated and keep critical controls in the application—not only in the prompt.
Main measures:
[untrusted_data] on the LLM boundary; policy lives in system instructions + server code.EmployeeGuard / AnalystGuard, owner checks on TicketGateway), independent of what the model suggests.search_help, list_my_tickets, get_ticket, prepare_draft). Create / update / reopen / transfer are not model tools.INC-20150).helmet, trust proxy, and @nestjs/throttler (tighter on login and message POST; health/SSE skipped).Central premise: do not rely on the LLM behaving. Contain blast radius in Nest + domain + HITL.
Threats and controls: docs/security/threat-model.md.
America/Sao_Paulo; business hours Mon–Fri 08:00–18:00 (10h/day). No holiday calendar.now <= resolvedAt + 168h. Does not create a new ticket.httpOnly + SameSite=Lax; TTL 15 minutes.| Surface | Where | URL |
|---|---|---|
Web (apps/web) | Vercel project nexo-assist | https://nexo-assist.connexto.com.br |
API (apps/api) | FlowDeploy (connexto-nexo-assist-api on the Outcoders VPS) | https://api-nexo-assist.connexto.com.br |
API health: GET https://api-nexo-assist.connexto.com.br/health/live. Production CORS allows the web origin above. LLM keys and SESSION_SECRET stay in the host env (not in the repo). Manifests: apps/api/paasdeploy.json + Traefik labels in apps/api/docker-compose.yml.
@nexo-assist/domain so priority/SLA/duplicity stay deterministic and unit-testable without calling a model. Ticket writes only go through TicketGateway after an exact draft version is confirmed.pnpm dev
pnpm test
pnpm lint
pnpm typecheck
pnpm build
pnpm db:migrate
pnpm db:seed