BuildingAI Documentation

website·Indexed 33 days ago

https://doc.buildingai.cc

Documentation for BuildingAI, a platform for deploying AI agents, workflows, and knowledge bases. It includes guides on model and API key configuration, payment integration (WeChat, Alipay), user management via membership subscriptions and credits, and the integration of MCP tools. The docs also cover the installation of specific AI applications like Nano banana, Wan漫剧, and Jimeng AI, as well as deployment via Docker and pnpm.

Tokens
106.3K
Snippets
488
Records
740
Agent score
57%

What's inside BuildingAI

  1. Overview of Model Context Protocol (MCP) in BuildingAI

    The Model Context Protocol (MCP), released by Anthropic in November 2024, standardizes communication between AI models and external systems. BuildingAI supports MCP servers using SSE (Server-Sent Events) and HTTP streamable communication protocols.
  2. Overview of BuildingAI Knowledge Base

    The Knowledge Base allows users to import business knowledge into the system. Once configured, AI agents can use this knowledge to provide direct, grounded answers to user queries based on the imported content.
  3. Overview of BuildingAI Platform

    BuildingAI is an open-source enterprise-grade agent building platform designed for AI developers, entrepreneurs, and organizations. It enables the creation of native AI applications in minutes via a zero-code visual configuration interface (DIY).

    Key native AI capabilities include:

    • Agents and MCP (Model Context Protocol)
    • Knowledge bases and Workflows
    • LLM aggregation, Intent recognition, and Context engineering

    Key commercial closed-loop features include:

    • User registration and Member subscriptions
    • Compute power recharging and Payment billing
  4. Overview of BuildingAI Plugin Backend Imports

    BuildingAI provides a set of specialized packages for plugin development to handle common backend tasks such as logging, CRUD operations, authentication, and database management.
  5. Retrieve knowledge base segment details

    Retrieve detailed information about a specific segment within a knowledge base dataset. The API returns metadata including the segment content, its index, embedding vector, and associated document and dataset IDs. Access requires a Bearer token in the Authorization header.
    curl --request GET \
      --url http://prod-cn.your-api-server.com/consoleapi/datasets/documents/segments/{segment_id} \
      --header 'Authorization: Bearer {{token}}'
  6. Retrieve AI provider details by ID

    Retrieve detailed information about a specific AI provider using its unique identifier. The endpoint returns provider metadata including base URL, authentication configuration, supported features, and a list of available models.
    # Example request
    curl -X GET "http://prod-cn.your-api-server.com/consoleapi/ai-providers/{provider_id}" \
         -H "Authorization: Bearer {{token}}"

    Request Parameters:

    • Authorization (Header, Required): Bearer token for authentication.

    Response Body (JSON):

    • code (integer): Response status code.
    • message (string): Response message.
    • timestamp (integer): Server timestamp.
    • data (object): The provider details containing:
      • id (string): Unique identifier of the provider.
      • provider (string): Provider identifier.
      • name (string): Display name of the provider.
      • baseUrl (string): API base URL.
      • iconUrl (string): URL to the provider's icon.
      • websiteUrl (string): Official website URL.
      • authConfig (object): Provider-specific authentication settings.
      • globalConfig (object): Global configuration settings.
      • supportedFeatures (array of strings): List of features supported by this provider.
      • isActive (boolean): Whether the provider is currently active.
      • connectionStatus (string): Current connectivity status.
      • description (string): Description of the provider.
      • sortOrder (integer): Display order.
      • createdAt / updatedAt (string): ISO timestamps for record lifecycle.
      • models (array of strings): List of models supported by this provider.
  7. Distinguish between BuildingAI Community and Enterprise Editions

    BuildingAI offers two distinct versions with different licensing models:

    • Community Edition: Based on Apache License 2.0 with supplementary terms. It is free for commercial use but restricts the open-sourcing of derivatives and direct competition.
    • Enterprise Edition: A separate, proprietary commercial product. It is not subject to the Apache License 2.0. It provides full commercial source code, enterprise-grade advanced features, dedicated technical support, and custom development for paying users.
  8. Build AI chat interfaces with AI Element primitives

    For purely presentational AI components (not tied to specific app session APIs), use the primitives in @buildingai/ui/components/ai-elements. These are categorized into:

    • Conversation: Conversation, ConversationContent, ConversationScrollButton, ConversationDownload
    • Messages: Message, MessageContent, MessageActions
    • Input: PromptInput, PromptInputTextarea, PromptInputSubmit, PromptInputAttachments
    • Reasoning: Reasoning, ReasoningTrigger, ReasoningContent, ChainOfThought
    • Tool Calls: Tool, ToolHeader, ToolInput, ToolOutput, Confirmation
    • Code/Terminal: CodeBlock, CodeBlockCopyButton, Terminal, TerminalCopyButton
    • Citations: InlineCitation, Sources, Source
    • Agent Process: FileTree, Queue, Task, TestResults, StackTrace
    • Media: Image, AudioPlayer, WebPreview, JSXPreview
    • Selectors: ModelSelector, VoiceSelector, MicSelector
  9. Extend BuildingAI functionality using plugins

    BuildingAI features a hot-swappable application extension mechanism. Users can expand the capabilities of their BuildingAI deployment through two primary methods: purchasing pre-made plugins from the official Application Market or developing custom plugins locally.
  10. Retrieve key template details via Console API

    Use the GET /consoleapi/key-templates/{id} endpoint to retrieve detailed information about a specific key template. The request requires a template ID in the path and a Bearer token for authorization in the header. The response returns a JSON object containing the template's configuration, including its name, icon, type, field configurations, and status.
    curl --request GET \
      --url http://prod-cn.your-api-server.com/consoleapi/key-templates/61addba4-9ccb-4d28-9a1b-74447fe9e92a \
      --header 'Authorization: Bearer {{token}}'
  11. Implement the mandatory directory structure for BuildingAI plugins

    To ensure BuildingAI can recognize and load a plugin, developers must adhere to a specific directory structure. The architecture separates the frontend (React/Vite) and backend (NestJS/TypeORM), with dedicated directories for data, storage, and build artifacts.
    参考拓展应用模板/
    ├── .gitignore                 git ignore config
    ├── README.md                  Plugin description
    ├── SEEDS.md                   Database seed instructions
    ├── LICENSE                    Open source license
    ├── package.json               Package config (dependencies/scripts/entry)
    ├── tsconfig.json              General TS config
    ├── tsconfig.api.json          Backend API TS config
    ├── tsconfig.web.json          Frontend Web TS config
    ├── tsup.config.ts             API build config (tsup)
    ├── vite.config.ts             Web build/dev config (Vite)
    ├── eslint.config.mjs          ESLint config
    ├── index.html                 Web entry HTML
    ├── manifest.json              Plugin manifest (metadata/entry/config)
    ├── data/                      Runtime data directory
    ├── storage/                   File storage directory (uploads/generated files)
    ├── src/
    │   ├── web/                   Frontend (React)
    │   │   ├── main.tsx           Frontend entry
    │   │   ├── routes.tsx         Route configuration
    │   │   ├── locales/           i18n resources
    │   │   ├── styles/            Styles
    │   │   ├── pages/             Pages (index.tsx for home, console/ for admin)
    │   │   ├── components/        Common components
    │   │   ├── stores/            Global state management
    │   │   ├── assets/            Static assets
    │   │   └── services/          API request wrappers
    │   └── api/                   Backend (NestJS + TypeORM)
    │       ├── index.ts           API entry file
    │       ├── upgrade/           Versioned upgrade scripts
    │       ├── static/            API-provided static resources
    │       ├── db/
    │       │   ├── entities/      TypeORM entities
    │       │   ├── migrations/    Migration files
    │       │   └── seeds/         Seed data and seeders
    │       └── modules/           Business modules (e.g., article, category)
    │           ├── app.module.ts  Unified module entry
    │           └── [module-name]/
    │               ├── [name].module.ts
    │               ├── dto/       DTO definitions
    │               ├── controllers/
    │               │   ├── web/    Public-facing controllers
    │               │   └── console/ Admin-facing controllers
    │               └── services/   Business logic
    ├── build/                     Build artifacts (JS entities loaded at runtime)
    │   ├── index.js
    │   ├── db/                    Compiled entities and seeds
    │   ├── modules/               Compiled modules
    │   └── upgrade/               Compiled upgrade scripts
    └── .output/                   Packaged output directory
  12. Retrieve a list of data records from the AI Knowledge Base

    Use the GET /consoleapi/datasets/data-records/all endpoint to retrieve a paginated list of data records. This API returns detailed information about files, including their processing status, chunk count, and embedding model used. Authentication is required via a Bearer token in the request header.
    curl -X GET "http://prod-cn.your-api-server.com/consoleapi/datasets/data-records/all" \
         -H "Authorization: Bearer {{token}}"