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