OpenContracts Document Intelligence Platform
Open-source document intelligence you can build on — turn document repositories into programmable citation graphs.
- Source repo
- Open-Source-Legal/OpenContracts
- Stars
- ★ 1.6k
- Last updated
- 1d ago v3.1.1
- FARS reviewed
- Nov 08, 2026
- License
- MIT
- Primary language
- Python
- FA score
- 66/100 · Some gaps
At a glance
- How it runs
- Works with
- Portable with changesClaude Code · Claude.aiChatGPT (Partial support)
- Cost
- Free software; you pay for model usage
- Setup effort
- Medium · a few setup steps
- You'll need
- Typical use
- A legal team ingests SEC filings and automatically links them to the Delaware General Corporation Law, creating a navigable governance graph.
- Not a fit if
- Individuals who want upload-and-go without running a Docker stack
- Deployers without a GPU who need high embedding throughput
- Website
- open-source-legal.github.io ↗ set on GitHub
- Maintenance
- Commits in the last 30 dayslast commit 2026-12-02latest release v3.1.1 (2026-09-10)+2.1 ★/day over 7 days
- Source review
- 66/100 · Some gaps
What does this agent do, and when should you use it?
OpenContracts is a self-hosted, open-source document intelligence platform designed for builders and hackers. It exposes a GraphQL and REST API for applications, a Model Context Protocol (MCP) server for AI agents, and a React UI for teams, all sharing the same citation graph. The platform treats human annotation as ground truth, enabling precise, layout-faithful annotations on PDFs and text. It supports a wide range of formats, including PDF, DOCX, plain text, and 126 additional formats via Gotenberg conversion. Key features include corpus management with versioning, structured extraction with LLM-powered queries, collaborative discussions, multimodal search, and a pluggable pipeline for parsers, embedders, and thumbnailers. MIT-licensed and deployable via Docker Compose, it provides an MCP endpoint for agent discovery and interaction.
OpenContracts ingests documents into corpora, runs an intelligence bundle that describes and summarizes each document, and constructs a citation graph linking documents to cited statutes or regulations. It provides a Python API to create document- or corpus-scoped agents that stream grounded answers using annotations and citations. The MCP server exposes tools like search_corpus, list_documents, get_document_text, list_annotations, list_relationships, and create_thread_message for external agents. Structured extraction defines fieldsets (natural-language queries) that run across corpora via Celery workers, outputting results in a spreadsheet-style grid for human approve/reject. All operations are accessible via a typed GraphQL API, with REST for uploads and health checks.
- A legal team ingests SEC filings and automatically links them to the Delaware General Corporation Law, creating a navigable governance graph.
- A developer builds a custom document intelligence app, querying annotations and citations via the GraphQL API.
- An AI agent (e.g., Claude or Cursor) searches a contract corpus and retrieves grounded, cited answers via the MCP server.
- A researcher extracts indemnification clauses from hundreds of contracts into a spreadsheet for review.
- A team collaboratively annotates documents with discussions, @mentions, and voting, building a shared knowledge base.
Key setup facts
Pulled from the install and usage notes below. The project README has the current values.
- Ports
3000- Config files
local.ymlproduction.yml- Install notes cover
- Docker
How do you install or deploy this agent?
Install via Docker: clone the repository, copy environment files (from docs/sample_env_files/), then run docker compose -f local.yml --profile fullstack up for development or docker compose -f production.yml up -d for production. Access http://localhost:3000 and log in with admin / Openc0ntracts_def@ult.
How do you use this agent?
For Python agents, use the agents module: call agents.for_document(123, corpus=45) and stream responses with agent.stream('Summarize the indemnification clauses'). Alternatively, connect agent clients to the MCP endpoint (/mcp/ or /mcp/me/) and use the listed tools. For structured extraction, define a fieldset and run it; extraction jobs are queued on Celery and results displayed in a grid for human review.
Safety boundaries, hardening & integrations
Operational blast radius, source-verified safety controls, and first-run hardening steps before connecting this agent to real workspaces.
Declared capability surface (blast radius)
Can run terminal commands; pair with approval gates or container/OS sandboxing.
Modifies local files; work on a clean Git branch or dedicated worktree.
Makes outbound requests; verify telemetry settings and model data routing on private repos.
Inherits capabilities of connected MCP servers; audit third-party servers before enabling.
What are this agent's strengths and limitations?
- Provides a complete citation graph substrate with traversable document and statute nodes, unlike static file storage.
- Exposes a built-in MCP server for direct agent integration, with standardized discovery and tools.
- Human annotations serve as ground truth, grounding AI-generated annotations and extractions.
- Complex architecture requiring Docker and multiple microservices (parser, embedder, etc.).
- Initial setup involves environment configuration and potential GPU optimization for performance.
- Some components like PDF parsing and embedding may depend on external services (Gotenberg) or hardware-accelerated images.
How does this agent compare with similar options?
Key facts side by side with the most closely related agents.
| Agent | Source review | Form / cost | Stars | Updated | Language | Full support on |
|---|---|---|---|---|---|---|
| OpenContracts Document Intelligence Platform This agent | 66 · Some gaps | Self-hosted serviceFree + model costs | ★ 1.6k | 1d ago | Python | Claude Code · Claude.ai |
| Dokploy MCP Server | 62 · Some gaps | MCP serverFree | ★ 450 | 3d ago | TypeScript | Claude Code · Claude.ai |
| OpenSandbox Runtime | 74 · Some gaps | Library / SDKFree | ★ 18k | today | Go | Codex · Claude Code |
| Agency Orchestrator: One Sentence to Orchestrate an AI Expert Team | 71 · Some gaps | CLIFree + model costs | ★ 2.5k | 1d ago | TypeScript | Codex · Claude Code · OpenAI API · Claude API |
How does FollowAgents rate this agent?
Why each dimension lost points
The materials describe public read-only and authenticated MCP entry points, user permission checks, and separate approval and write-permission controls. The permission guides also describe IDOR protections, scoped authorization, and version history, supporting useful but incomplete scores for least privilege, confirmation, external effects, and rollback. The README discloses telemetry categories and opt-out settings, but the supplied implementation does not corroborate those claims, so sensitive-data handling earns partial credit. The packet gives no dependency pinning or vulnerability-response evidence; the embedder code defaults its API key to abc123 while requiring a header check, so operators must override that default and dependency security is weak. PAWLS and nlm-ingestor are acknowledged, but author attribution and maintenance/update responsibility are unclear.
The README, permission guides, and query patterns document service-layer checks, permission controls, CI, and coverage. However, the supplied permission-testing examples say corpus permissions can override document permissions, which conflicts with the guide's most-restrictive-permission rule; some supplied material is explicitly a plan or draft and does not establish implementation. Docker setup and a multi-service architecture are documented, but dependency availability and version pinning are not sufficiently established in this sample. The embedder returns clear status codes and messages for unauthorized requests, invalid inputs, and processing failures.
The materials address developers and teams working with legal, research, and other document collections, and describe Python agents, MCP, GraphQL/REST, React, pluggable processing, and multiple deployment and file-format scenarios. Capability boundaries include public read-only versus authenticated MCP, optional conversion, and the distinction between core and convertible formats. The sample does not systematically specify agent triggers, the full bounds of automation, or resource requirements across environments.
The README has clear sections for features, setup, architecture, formats, telemetry, documentation, and licensing. It gives usable setup steps and examples, though production instructions are brief. Terminology is mostly stable and examples are extensive; some limitations are described, including optional Gotenberg and supported-format distinctions, but there is no comprehensive limitations section. The MIT license is explicit and earns full marks. The README links to release notes, but the sample does not provide a complete changelog. CLAUDE.md is contributor guidance about commands and architecture, not product instructions; maintenance responsibility and update paths remain unclear, and publisher identity is unknown as specified.
The materials describe a document citation graph, human annotation, structured extraction, retrieval and question answering, and MCP tools. Outputs can be used through the API, UI, and MCP, with answers tied to annotations and citations, supporting strong usability and marginal value. Self-hosting, pluggable components, and batch processing support the cost-benefit case, while multiple containers, databases, queues, model services, and operational needs add cost. The sample lacks enough total-cost or resource comparisons for full credit.
Many README claims correspond to the supplied MCP, embedder, and permission materials, and the permission documents name specific services, checks, and test paths. The sample is incomplete, and conflicts between a plan, a draft, and permission examples weaken cross-source corroboration. Documents usually distinguish instructions, examples, and plans, but marketing claims and described demo outcomes are not independently substantiated in the packet, so high scores are not justified.
- The embedder defaults its API key to abc123; configure a unique key and ensure the service is exposed only to intended networks.
- Permission-testing examples conflict with the permission guide on document versus corpus permission priority; verify the actual implementation before relying on that behavior.
- Telemetry handling, maintenance responsibility, and some performance and demo claims are not supported by implementation or independent evidence in the supplied sample.
Recent releases
Latest entries from the project's GitHub Releases. Notes are quoted from upstream as written, not rewritten or tested by FollowAgents.
-
v3.1.1 OpenContracts v3.1.1
Release notes excerpt
OpenContracts v3.1.1 improves remote-ingest reliability and fixes label creation and corpus label-set selection. Highlights - Remote parsing: shared adapters support Docling or Warp for PDFs, Docxodus for DOCX, and TXT chunking, with validated local settings, MIME routing, and preserved annotations and relationships. - Large imports and recovery: bounded discovery and scheduling, cancellation-aware admission, and durable parse/enrichment/embedding checkpoints make interrupted imports resumable. Changed sources and uncertain upload outcomes retain receipts for reconciliation. …View on GitHub ↗ -
v3.1.0 OpenContracts v3.1.0
Release notes excerpt
OpenContracts v3.1.0 adds domain-pack installation and authority ingestion, improves agent configuration and authentication, and completes the removal of the legacy Graphene runtime. Highlights - Domain and authority packs: install coordinated packs with corpus groups, orchestrator agents, consumer-agent configuration, and cross-pack equivalences. Operators can disable Python providers shipped inside packs and preview their code surface before installation. …View on GitHub ↗ -
v3.0.0 v3.0.0 — Corpus Intelligence, Authority Linking & Deep Research
Release notes excerpt
[cite] / OpenContracts v3.0.0 The first stable release of the v3 line. v3 began with v3.0.0.a1 in January 2025 and ran through four betas. Since v3.0.0.b4 alone: ~1,400 merged pull requests, 3,541 files changed, 122 new migrations, ~97 security fixes. The through-line of v3 is that a corpus is no longer a bucket of documents. It is a queryable, self-describing, cross-linked body of work. …View on GitHub ↗
FAQ
Is OpenContracts free to use?
Can I use OpenContracts with Claude or Cursor?
What file formats are supported?
How do I contribute to OpenContracts?
Thanks — we use this to improve the page.
Subscribe to the FollowAgents RSS feed, or save this agent to your browser shortlist to compare on your next visit.