Knowledge Base updated: 2026-11-22
Nao knowledge base
Orientation
Nao is a monorepo for an AI-assisted analytics product. The backend coordinates agents, data access, story delivery, identity, integrations, and MCP; the frontend provides the chat, story, settings, onboarding, and repository-context experiences.
Critical durable state is managed through backend services and queries for organizations, projects, conversations, stories, credentials, and repository context. The frontend is route-driven and consumes backend APIs to render and update that state.
Agent execution connects conversational requests to model providers, tools, semantic and SQL data operations, and persisted artifacts. Stories turn analysis into shareable, embeddable visual experiences.
flowchart LR
U[User or AI client] --> FE[Frontend application]
U --> MCP[MCP server]
FE --> API[Backend routes and services]
MCP --> API
API --> AG[Agent runtime]
AG --> MP[Model providers]
AG --> TOOLS[Agent tools and skills]
TOOLS --> DATA[Warehouse and semantic layer]
API --> DB[Application persistence]
API --> ST[Story services]
ST --> FE
API --> AUTH[Authentication and governance]
API --> CTX[Context explorer]
CTX --> REPO[Connected repositories]
API --> INT[Automation and messaging integrations]
Glossary
- Story — a persisted analytical presentation composed of visual and content blocks that can be edited, delivered, shared, or embedded.
- Context hub — the repository-backed workspace for browsing, editing, reviewing, and applying context changes.
- Skill — reusable agent instruction or capability loaded into an agent run or exposed through external interfaces.
- MCP — Model Context Protocol surface used by external AI clients to discover and invoke Nao capabilities.
- Semantic layer — governed definitions and query behavior used to turn analytical requests into warehouse results.
Codebase-wide invariants
- Backend product behavior is organized behind services, queries, and route handlers under
apps/backend/src/services/**,apps/backend/src/queries/**, andapps/backend/src/trpc/**. - Frontend product views are route-driven; route composition lives under
apps/frontend/src/routes/**and reusable UI behavior underapps/frontend/src/components/**. - Agent capabilities are explicitly assembled from profiles, providers, tools, and policy files under
apps/backend/src/agents/**. - Project-scoped access decisions must flow through project queries and sharing services, evidenced by apps/…/project.queries.ts and apps/…/project-sharing.service.ts.
- Repository-backed context operations are mediated by apps/…/context-explorer.service.ts rather than direct frontend repository access.
Routing table
apps/backend/src/agents/**-> docs/agent-and-chat.md- apps/…/agent.ts -> docs/agent-runtime.md
apps/backend/src/agents/tools/**-> docs/agent-tools-memory-and-prompts.md- apps/…/user-rules.ts -> docs/agent-tools-memory-and-prompts.md
- apps/…/story.routes.ts -> docs/stories-and-visualization.md
apps/frontend/src/components/custom-story/**-> docs/story-authoring-and-library.md- apps/…/story-embeds.tsx -> docs/story-delivery-and-sharing.md
apps/backend/src/warehouse/**-> docs/data-and-semantic-queries.mdapps/backend/src/services/sql/**-> docs/sql-and-warehouse-execution.mdapps/backend/src/semantic/**-> docs/semantic-layer-workflows.md- apps/…/project.queries.ts -> docs/access-and-governance.md
- apps/…/session-rotation-auth.service.ts -> docs/authentication-and-sso.md
- apps/…/oidc-access-token.service.ts -> docs/authentication-and-sso.md
- apps/…/project-sharing.service.ts -> docs/organizations-projects-and-entitlements.md
apps/backend/src/automations/**-> docs/automations-and-integrations.mdapps/backend/src/services/automation/**-> docs/automation-workflows.mdapps/backend/src/integrations/**-> docs/messaging-channel-integrations.md- apps/…/server.ts -> docs/mcp-and-external-api.md
apps/backend/src/mcp/tools/**-> docs/mcp-server-and-tools.mdapps/frontend/src/routes/**-> docs/web-application.mdapps/backend/tests/agents/**-> docs/testing-and-evaluation.mdapps/backend/src/evaluation/**-> docs/test-runs-and-results.md- apps/…/context-explorer.service.ts -> docs/context-hub-and-repository-workflows.md
apps/frontend/src/components/context-hub/**-> docs/context-editing-and-recommendations.md