MA

matiaspautasso/ai-bussiness

Developer tools

Эта страница переведена автоматически. Технические детали смотрите в оригинале. Открыть оригинал

0 stars 0 forks Качество 58 Тренд 14

Enterprise AI assistant: RAG, AI agent with tool calling, Model Context Protocol (MCP) server, and evaluations. TypeScript monorepo — NestJS, React, PostgreSQL + pgvector, Vercel AI SDK.

Обзор

An enterprise-style that answers questions over a company's . It demonstrates a production-shaped implementation of , an with , a server, and an — built on a monorepo with . Portfolio project. The AI provider sits behind an interface (a seam), so the whole system runs today against a and swaps in by setting a single environment variable. See PENDING.md. - — document ingestion (PDF, Markdown, plain text), recursive text chunking, vector embeddings, and on with an index. - — a multi-step agent (max 5 steps) that chooses between four read-only and a tool using the . - — exposes the same business tools over the official , reusing the exact same domain logic as the HTTP API (one source of truth). - — a 22-case dataset scoring , and , runnable in CI. - — framework-agnostic business logic behind ports and adapters, making the code , and provider-agnostic. - — (unit + integration) and an end-to-end stack verified against real PostgreSQL. The repository is a .

README

Показан фрагмент оригинального README. Открыть оригинал.

AI Business Assistant

An enterprise-style AI assistant that answers questions over a company’s internal documentation and business data. It demonstrates a production-shaped implementation of Retrieval-Augmented Generation (RAG), an AI agent with tool calling, a Model Context Protocol (MCP) server, and an evaluation suite — built on a TypeScript monorepo with hexagonal architecture.

Portfolio project. The AI provider sits behind an interface (a seam), so the whole system runs today against a deterministic mock and swaps in OpenAI by setting a single environment variable. See PENDING.md.

Highlights

  • RAG pipeline — document ingestion (PDF, Markdown, plain text), recursive text chunking, vector embeddings, and cosine-similarity semantic search on PostgreSQL + pgvector with an HNSW index.
  • AI agent with tool calling — a multi-step agent (max 5 steps) that chooses between four read-only business-data tools and a documentation search tool using the Vercel AI SDK.
  • Model Context Protocol (MCP) server — exposes the same business tools over the official MCP TypeScript SDK, reusing the exact same domain logic as the HTTP API (one source of truth).
  • Evaluation suite — a 22-case dataset scoring retrieval hit rate, tool-selection accuracy and answer accuracy, runnable in CI.
  • Hexagonal architecture — framework-agnostic business logic behind ports and adapters, making the code testable, AI-navigable and provider-agnostic.
  • Fully typed, fully tested — 51 automated tests (unit + integration) and an end-to-end Docker Compose stack verified against real PostgreSQL.

Tech stack

Area Technologies
Language TypeScript (strict), Node.js 20
Frontend React 19, Vite, @ai-sdk/react (streaming chat UI)
Backend NestJS, Vercel AI SDK (ai, @ai-sdk/openai)
RAG LangChain text splitters, OpenAI embeddings (mocked for now)
Database PostgreSQL, pgvector, Prisma ORM, raw SQL for vector search
Protocol Model Context Protocol (@modelcontextprotocol/* SDK)
Testing Jest, Supertest (HTTP + MCP integration)
Tooling pnpm workspaces, SWC, Docker Compose, GitHub Actions CI

Architecture

The repository is a pnpm monorepo. Business logic is written once and reused by both the HTTP API and the MCP server.

┌────────────┐     HTTP/stream      ┌─────────────────────────────┐
│  React UI  │ ───────────────────▶ │  NestJS API (apps/api)      │
│ (apps/web) │   /api proxy (nginx) │  ┌───────────────────────┐  │
└────────────┘                      │  │ AI agent + tool calling│  │
                                    │  │ RAG retrieval + ingest │  │
┌────────────┐     stdio / MCP      │  │ business use-cases     │  │
Открыть полный README на GitHub

Установка

This server does not publish a one-line install command.

Open the repository installation guide Новичок в MCP? Начните с руководства на mcpskill.org →