Copilot Studio Gallery
ContributorsShare a solution
← Back to gallery

Agents

Contract Compliance Reviewer

An agent that reviews a contract for internal inconsistencies and for conflicts with current law or your organisation's policies, then returns a new Word copy with colour-coded highlights and margin comments for human legal review.

ATby Adriana TrujilloVersion 1.0.0.1Updated 2026-10-15

This community example is provided as-is and is not covered by Microsoft Support. The underlying Copilot Studio and Power Platform products retain their standard support. Importing can create or modify resources and use your connections and permissions. Support details

Download ZIP
What’s in the solution
  • 1 agent
  • 2 skills
AgentSkills

Contract Compliance Reviewer

Agent

  • internal-consistency-review
  • legal-compliance-review
Legal & compliancelegalcontract-reviewcomplianceskillssharepointhuman-in-the-loop

Contract Compliance Reviewer is a Copilot Studio agent that gives a contract a first-pass review and returns a new, annotated copy for a legal professional to check. It never changes the original file.

AI-assisted review, not legal advice. The agent can miss issues, misread clauses, or rely on law that has since changed. Every finding must be checked by a qualified legal professional before anyone relies on it.

What it does

Upload or paste a contract and choose one or both reviews:

  • Internal Consistency Review checks the contract against itself: conflicting clauses, inconsistent defined terms, broken cross-references, and gaps such as unfilled placeholders or missing schedules.
  • Legal Compliance Review checks the contract against current law, using only official sources such as government, legislature, and regulator websites. If organisational guidance is connected as knowledge, it also checks the contract against your own policies and reports those findings separately from the legal ones.

The agent returns a Word document with the affected text highlighted and the explanation in a Word margin comment, plus a summary table in chat. If you ask for a PDF, it builds one with the same highlights, numbered markers, and a Review Comments section at the end.

FindingHighlightComment reviewerBased on
CONSISTENCY ISSUEYellowInternal Consistency ReviewThe contract itself
LEGAL CONFLICTRedLegal Compliance ReviewLaw, cited with an official source link
ORG POLICY CONFLICTGreenOrg Policy ReviewYour organisation’s own guidance

What’s inside

  • Contract Compliance Reviewer agent with web search enabled and instructions that restrict legal research to official sources.
  • internal-consistency-review skill and legal-compliance-review skill. Each bundles a small scripts/add_comments.py helper that adds the highlights and margin comments, so the agent doesn’t write its own Word code.
  • Legal Documents (Test) knowledge source, a SharePoint placeholder for your organisation’s legal guidance. Replace its URL after import.

Tailor it to your organisation

The agent is a starting point. Adapt the sources to your jurisdiction, sector, and subject area.

Official legal sources

The agent instructions and step 3 of the legal-compliance-review skill list examples of official sources: EUR-Lex for EU law, legislation.gov.uk for UK law, congress.gov and govinfo.gov for US federal law, and sector bodies’ own sites. Replace or extend that list with the institutions relevant to your work, for example:

  • your country’s official legislation portal or gazette;
  • regulators for your subject area, such as data protection, financial services, employment, housing, or competition authorities;
  • courts or tribunals whose published decisions you want to consider.

Keep the rule that only official sources may be cited. You can also add the most important official sites as public website knowledge sources so the agent checks them first.

Organisational guidance

Point the Legal Documents (Test) knowledge source at the SharePoint library that holds your contracting policies, playbooks, standard positions, or approved clause libraries, or replace it with your own knowledge source. Any conflict with that guidance is reported as ORG POLICY CONFLICT in green, so reviewers can see at a glance what comes from internal rules and what comes from the law or the consistency check.

You can add more knowledge sources, such as other SharePoint sites or uploaded documents. If you don’t have organisational guidance, delete the placeholder and the agent runs the legal and consistency checks only.

Review output

The highlight colours and comment reviewer names live in add_comments.py inside each skill. To change them, edit the script in both skills.

Import notes

  1. Download the solution ZIP from this gallery page and import it into your Power Platform environment.
  2. Open Contract Compliance Reviewer in Copilot Studio and update or remove the Legal Documents (Test) knowledge source. Its URL is a contoso placeholder.
  3. Adjust the official legal sources in the instructions and in the legal-compliance-review skill for your jurisdiction.
  4. Test with a sample contract, then publish and share the agent with your legal and compliance reviewers.

The skills run their helper scripts in the agent’s code environment, so no connections are needed for the core review. Before uploading contracts, check that this fits your organisation’s data-handling and confidentiality rules.

Responsible use

  • This is an AI-assisted review. It supports qualified reviewers; it does not replace them, and it is not legal advice.
  • Laws, regulations, and guidance change. Always confirm a cited provision against the official source before relying on it.
  • A qualified legal professional must review every finding, and anything the agent may have missed, before the contract is signed, changed, or relied on.

Author

Adriana Trujillo.

Agents and their components

The MCP servers, tools, and skills each agent uses, and which agents hand off to others. Hover a component for its description.

AgentSkills

Contract Compliance Reviewer

Agent

  • internal-consistency-review
  • legal-compliance-review

Exploded solution manifest

The download rebuilds these submitted files at the ZIP root. Gallery metadata and the human-facing README are excluded.

Solution
ContractComplianceReviewer
Publisher
AdrianaTrujillo
Version
1.0.0.1
Files
19
component: 14bot: 2solution: 2other: 1
PathTypeSize
[Content_Types].xmlother879 B
botcomponents/Default_Contract_Compliance_Reviewer_8c0b11.file.addcommentspy_CVgsX/botcomponent.xmlcomponent621 B
botcomponents/Default_Contract_Compliance_Reviewer_8c0b11.file.addcommentspy_CVgsX/filedata/add_comments.pycomponent4,850 B
botcomponents/Default_Contract_Compliance_Reviewer_8c0b11.file.addcommentspy_MBSfM/botcomponent.xmlcomponent625 B
botcomponents/Default_Contract_Compliance_Reviewer_8c0b11.file.addcommentspy_MBSfM/filedata/add_comments.pycomponent4,850 B
botcomponents/Default_Contract_Compliance_Reviewer_8c0b11.file.skillmd_Dkufm/botcomponent.xmlcomponent593 B
botcomponents/Default_Contract_Compliance_Reviewer_8c0b11.file.skillmd_Dkufm/filedata/SKILL.mdcomponent4,646 B
botcomponents/Default_Contract_Compliance_Reviewer_8c0b11.file.skillmd_maMHB/botcomponent.xmlcomponent597 B
botcomponents/Default_Contract_Compliance_Reviewer_8c0b11.file.skillmd_maMHB/filedata/SKILL.mdcomponent3,425 B
botcomponents/Default_Contract_Compliance_Reviewer_8c0b11.LegalDocumentsTest_RXDsoHpWlm9HjIoNKAx2j/botcomponent.xmlcomponent524 B
botcomponents/Default_Contract_Compliance_Reviewer_8c0b11.LegalDocumentsTest_RXDsoHpWlm9HjIoNKAx2j/datacomponent179 B
botcomponents/Default_Contract_Compliance_Reviewer_8c0b11.skill.internal-consistency-review_HjC/botcomponent.xmlcomponent735 B
botcomponents/Default_Contract_Compliance_Reviewer_8c0b11.skill.internal-consistency-review_HjC/datacomponent159 B
botcomponents/Default_Contract_Compliance_Reviewer_8c0b11.skill.legal-compliance-review_2pp/botcomponent.xmlcomponent719 B
botcomponents/Default_Contract_Compliance_Reviewer_8c0b11.skill.legal-compliance-review_2pp/datacomponent155 B
bots/Default_Contract_Compliance_Reviewer_8c0b11/bot.xmlbot410 B
bots/Default_Contract_Compliance_Reviewer_8c0b11/configuration.jsonbot2,614 B
customizations.xmlsolution536 B
solution.xmlsolution3,933 B

This community example is provided as-is and is not covered by Microsoft Support. The underlying Copilot Studio and Power Platform products retain their standard support. Importing can create or modify resources and use your connections and permissions. Support details

Download ZIP

Preview community-built Copilot Studio solutions before you import them.

View on GitHub