Credentials. If you enable LAN access, set both KB_WEB_HOST and KB_WEB_TOKEN and set KB_SEARCH_TOKEN before using protected search endpoints remotely, since contracts are confidential.
Who it is forA legal, procurement, or operations person who needs quick answers about delivery, acceptance, or payment terms across many contract files.
The problemFinding the right clause across many PDFs and Word files is slow, and an agent without the files will invent terms.
The outcomeThe agent returns answers grounded in retrieved contract passages, with the source text available for review.
What you need first
- Linux, macOS with Docker Desktop, or Windows through WSL2 (native Windows is not supported)
- Python 3.12+ and Docker 25+ with Compose v2
- A text embedding endpoint and a vision-language endpoint, either local or hosted
- A chat model if you want knowledge graphs
- Optional: an NVIDIA GPU with NVIDIA Container Toolkit for the local model stack
Steps
- Run
./deploy.shfrom the cloned Carrel folder and wait for the first startup to finish downloading parser models. - Copy the contract files into
runtime/mirror/<contracts-folder>/and enable that folder in the console at http://127.0.0.1:9800. - Check service health and task progress in the console before your first query.
- Run
curl -sS http://127.0.0.1:9810/search -H 'Content-Type: application/json' -d '{"question": "What are the delivery and acceptance requirements?", "top_k": 8}'to test retrieval. (inferred, check the README)
Prompt for your agent
Use the Carrel search API in the FengZhenfei/carrel repo at http://127.0.0.1:9810/search to find the clauses about <contract term> across the enabled contract folder. Report each answer with the source passage it came from. Verify that every claim in the answer appears in a returned passage.
Caveat. Carrel does not state that its answers are legally reliable, so a person should check any clause before relying on it.
Use this in your AI agent
Ask your agent
Using the Deduped MCP, get the setup steps for FengZhenfei/carrel and "Answer contract questions with cited passages"
Add Deduped to Claude Code once
claude mcp add --transport http deduped https://dedupedai.com/mcp
Every Monday: the 5 hottest repos and exactly how to use them. Free, one email a week, unsubscribe anytime.
Get them freeShare: X LinkedIn Hacker News Email Copy link
Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer