OpenContracts: Build Collaborative Knowledge Bases with AI Agents
A comprehensive guide to OpenContracts, the MIT-licensed, self-hosted document intelligence platform. Learn about its features including AI agents, MCP integration, document annotation, data extraction, and collaborative workflows.
What Is OpenContracts?
OpenContracts is an MIT-licensed, self-hosted document intelligence platform that turns your documents into collaborative knowledge bases. Built for teams who need to manage, annotate, analyze, and search through large collections of PDFs, DOCX files, and plain text β all while keeping data fully on-premises.
Unlike traditional document management systems, OpenContracts is designed for the agentic AI era. It ships with an MCP (Model Context Protocol) server that exposes your entire corpus to AI tools like Claude and Cursor, plus a built-in AI agent framework powered by PydanticAI. Your documents don't just sit in folders β they become actionable intelligence that both humans and AI can work with together.
π Want to deploy OpenContracts yourself?
Docker configs, system requirements, and installation guides β all on one page.
View OpenContracts Tool Page βKey Features
π Document Collections (Corpuses)
Organize documents into corpuses with folder hierarchies, fine-grained permissions, full version history, and forking. Each corpus is a self-contained knowledge space that teams can curate collaboratively.
π Multi-Format Ingestion
Ingest PDF (layout-faithful via Docling), DOCX (via Docxodus), and plain text. A pluggable parser pipeline lets you register custom parsers, embedders, and thumbnail generators in Python.
π·οΈ Human Annotation Interfaces
Annotate PDFs with bounding boxes and labels, annotate text documents with span-based labels, create document-level type labels, define relationships between annotations, and add notes. The annotation system supports structural annotations auto-extracted by the parser.
π€ AI Agents
Configure AI agents built on PydanticAI that search documents, query annotations, participate in discussions, and perform actions. Each agent can be configured with custom prompts, tools, and approval workflows.
π MCP Server
Expose your document corpus to any MCP-compatible AI tool via streamable HTTP. Claude, Cursor, and other AI assistants can query your documents directly β no data ever leaves your infrastructure.
π Data Extraction
Ask multiple structured questions across hundreds of documents. Use Fieldsets, Columns, and Extract records to turn unstructured documents into structured data. Results are displayed in interactive grids with approval workflows.
π¬ Collaborative Discussions
Global, per-corpus, and per-document forum-style discussion threads with voting, moderation, @-mentions of documents, corpuses, agents, and badge-based reputation systems.
Why Self-Host OpenContracts?
| β‘ Full Data Control | Documents never leave your infrastructure |
| π Open Source | MIT-licensed, inspectable and forkable |
| π AI-Ready | Built-in MCP server + AI agents |
| π Extensible | Pluggable parsers, embedders, and analyzers |
| π₯ Collaboration | Permissions, discussions, and approval workflows |
π Ready to try OpenContracts?
Get the Docker setup, system requirements, and deployment guide.
View OpenContracts Tool Page β