# Legal Analyzer

> Local-first contract intelligence for risk scoring, obligation extraction, and grounded Q&A.

Legal Analyzer is a paid AI agent skill on Agensi by Reyan Das, in Legal & Compliance. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: $9.99 (one-time purchase)
- Creator: [Reyan Das](https://www.agensi.io/creators/reyan-das)
- Category: [Legal & Compliance](https://www.agensi.io/skills/legal-compliance)
- Version: 1.0
- Last updated: 2026-11-30
- Security: scan passed (2026-11-30); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/legal-analyzer
- Tags: legal, research, ai-agents, legal-compliance, python, contract-analysis, nlp, pdf-parsing

## About this skill

Reviewing contracts manually is slow and prone to oversight. This skill automates the extraction of obligations, risk scoring, and amendment drafting directly from your local environment.

### What it does
- **Clause Analysis**: Identifies risky, one-sided, or ambiguous clauses using heuristic scoring across ten categories.
- **Obligation Extraction**: Pulls key party duties, notice periods, payment terms, and deadlines into structured lists.
- **Grounded Q&A**: Answers specific questions about contract terms using exact supporting quotations and clause references.
- **Amendment Drafting**: Generates suggested replacement wording and negotiation talking points for unfavorable terms.
- **Multi-format Export**: Produces structured reports in Markdown, JSON, and PDF formats for integration or review.

### How it works
1. **Environment Check**: Run `check_environment.py` to verify Python 3.10+ and optional dependencies like `pypdf` or `reportlab`.
2. **Document Ingestion**: Provide a `.pdf`, `.txt`, or `.md` file to the `analyze_contract.py` script.
3. **Analysis Execution**: Specify the jurisdiction and role to customize the risk assessment and amendment logic.
4. **Result Export**: Retrieve the final report from the output directory in your preferred schema.

### Frameworks & tools
Built with Python 3.10. It uses `pypdf` or `PyMuPDF` for text extraction and `reportlab` for PDF generation. Optional neural analysis utilizes `torch`, `transformers`, and `faiss-cpu` to run `InLegalBERT` and `RoBERTa` models locally.

### Why this beats prompting it yourself
Generic prompts often hallucinate terms or miss subtle one-sided obligations in long documents. This tool uses a structured heuristic methodology and local embeddings to ensure every claim is grounded in the actual document text.

### Use cases
- Audit vendor agreements to find hidden notice periods or automatic renewals.
- Generate a risk profile for employment contracts from the employee perspective.
- Rapidly answer "What are my termination rights?" with direct quotes from a 50-page PDF.
- Create a JSON export of all contract deadlines for integration into a calendar or CRM.

### Known limitations
Does not support image-only scanned PDFs without extractable text layers. Highly complex formatting may impact clause boundary detection. Risk scores are heuristic aids and require professional review.

## Requires

- Python
- Optional: Internet connection (only for optional model downloads)

The default analysis mode runs locally using Python. Optional ML-powered question answering may require an internet connection for initial model downloads. Supported inputs include text-based PDF, TXT and Markdown files. Scanned PDFs and DOCX files are not currently supported. This tool provides…

## How to use this skill

1. Connect your AI agent to Agensi once: add the MCP server https://mcp.agensi.io/mcp/auth and sign in with your Agensi account (OAuth, no API key). Steps for Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and other agents: https://www.agensi.io/docs/mcp-setup
2. Ask your agent: "Use the Legal Analyzer skill from Agensi" and describe your task.
3. Buy it on the listing or let your agent ask you first; your agent then loads it from Agensi when it needs it. Every paid skill has a money-back guarantee: https://www.agensi.io/docs/money-back-guarantee

## Frequently asked questions

### What file formats can the Miniproject Legal Analyzer process?

The skill supports .pdf, .txt, and .md files. For PDFs, the file must have a text layer; scanned images without OCR are not currently supported for analysis.

### Does my contract data get sent to a third-party cloud or external API?

This tool runs entirely in your local environment using Python 3.10, ensuring your sensitive legal documents never leave your infrastructure. It uses local embeddings and models like InLegalBERT to prevent the data leakage risks associated with cloud-based LLMs.

### What is included in the skill purchase?

You receive the core Python analysis scripts, a local environment verification tool, and all necessary heuristic configuration files. The package also includes templates for Markdown, JSON, and PDF report generation.

### How is this more accurate than just pasting a contract into a standard AI chatbot?

Unlike generic AI prompts, this skill uses a structured heuristic methodology and local vector embeddings to ground every answer in the actual text. This significantly reduces hallucinations and ensures that risk scores are based on specific, detectable clause patterns.

### Can I customize the risk assessment based on which side of the contract I am on?

Yes, when executing the analysis, you can specify the jurisdiction and your specific role (e.g., Service Provider vs. Client). The tool then adjusts its risk scoring logic and amendment suggestions to favor your specific legal position.

### Does this skill require a GPU to run the analysis?

While the base analyzer uses heuristic scoring, you can enable optional neural analysis by installing `torch` and `transformers`. This allows the skill to utilize specialized legal models for deeper semantic understanding of complex clauses.

---

Source: [Agensi](https://www.agensi.io), the marketplace of skills for AI agents. Any MCP-compatible agent (Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and more) connects at https://mcp.agensi.io/mcp/auth and signs in with an Agensi account; setup for every agent: https://www.agensi.io/docs/mcp-setup. Append .md to any skill, guide or docs address on agensi.io for its markdown version.
