AI & Agents
Bosca includes a comprehensive AI layer that goes beyond simple model access. You can register LLMs, manage reusable prompts, build intelligent agents with tools, and expose your platform to AI clients via the Model Context Protocol (MCP).
What you get:
- Central model registry with API keys and defaults
- Reusable prompts with input variables and versioning
- Intelligent agents that can search, query data, manage content, generate images, and write documents
- AI-powered chat with specialized agents (Bible, Search, SQL, Script, Image, Document Writer)
- File attachments in chat sessions for contextual conversations
- Model Context Protocol (MCP) server for external AI clients like Claude
- MCP client support for connecting agents to external MCP servers and tools
Model Registry & Prompts
Bosca provides a unified service layer for interacting with LLMs (OpenAI, Gemini, Vertex AI, and more). Instead of hardcoding prompts in your code, you can manage them centrally.
- Model Registry: Configure providers and parameters (temperature, tokens) in one place.
- Prompt Management: Store prompts as versioned templates with input variables.
- Unified API: Switch models or update prompts without changing your application code.
Agents
Bosca includes a database-driven agent system. Agents are defined in the database rather than code, enabling dynamic composition and reconfiguration.
Agents have access to a rich set of tools:
- Content Tools: Browse collections, retrieve metadata, create and edit content, manage categories, and transition workflow states.
- Search Tools: Full-text and semantic search across content.
- SQL Tools: Query analytics data through Trino with read-only access to catalogs, schemas, and tables.
- Image Tools: Generate new images and edit existing images using AI models.
- Document Tools: Convert content into structured Bosca documents.
- Script Tools: Execute and manage platform scripts through natural language.
- External Tools: Connect to external MCP servers to access third-party tools and services.
Agents can delegate to sub-agents, enabling multi-step reasoning and tool orchestration for complex tasks.
Agent tools can be backed by scripts (via the Scripting engine) or by external MCP servers, allowing flexible extension without modifying agent code.
Chat AI
The chat system includes AI-powered assistants that stream responses in real time:
- Kit (Assistant Agent): The primary orchestrator that routes conversations to specialized agents based on context.
- Bible Agent: Searches Bible translations, lists books and chapters, and retrieves specific passages.
- Search Agent: Finds relevant content across the platform using full-text and semantic search.
- SQL Agent: Queries analytics data using natural language, translating questions into SQL against Trino.
- Script Agent: Manages platform scripts through conversational commands—create, edit, delete, enable, disable, execute, and validate.
- Image Agent: Generates new images and edits existing images using AI models.
- Document Writer Agent: Converts content (such as HTML) into structured Bosca documents.
Chat sessions preserve conversation history so users can pick up where they left off. Sessions support file attachments, allowing users to reference documents during conversations. Responses stream in real time via Server-Sent Events.
AI chat is accessible via SSE streaming at /api/v1/ai/chat.
Model Context Protocol (MCP)
Bosca includes both an MCP server and MCP client capabilities.
MCP Server
The MCP server allows AI clients like Claude to explore and interact with your data through GraphQL:
- Schema Discovery: List root fields, get type definitions, and search the schema.
- Query Execution: Run arbitrary GraphQL queries with variables.
- Schema Versioning: Detect schema changes via version hashing.
MCP access requires group-based authentication and is configurable per environment.
MCP Client
Bosca agents can also connect to external MCP servers as clients. This allows agents to use tools provided by third-party services, extending their capabilities beyond the built-in tool set. MCP servers are registered in the database and their tools become available to agents.
Typical uses
- Draft Assistance: Generate summaries, tags, or titles automatically during Workflows.
- Semantic Search: Create embeddings that help users find content by meaning, not just keywords.
- Chat Experiences: Power chatbots and assistants in your applications using shared, versioned prompts.
- Data Exploration: Let AI clients query analytics and content data through MCP or natural language SQL.
- Content Automation: Agents can create, edit, and transition content through workflow states.
- Image Creation: Generate and edit images through conversational commands.
- Script Automation: Manage and execute platform scripts through natural language.
For developers
Related modules:
- Model registry and prompts:
backend/framework/core-ai,backend/framework/ai - Agent system:
backend/framework/ai - MCP server:
backend/framework/mcp
Related:
- Kit: Agent orchestration
- Architecture: AI/ML overview
- Search: Semantic search