Skip to main content
Glama

Agenda Intelligence MD

Catch broken citations, altered quotes, and unsupported numbers in AI output.

PyPI Python CI License: MIT

A deterministic evidence-packet linter for claim-backed AI output. Supply claims, source IDs, original source text, and optional quotations. Get structured findings and next steps for a human reviewer.

Core checks run locally. No model API key, account, or network needed after installation.

Try in your browser · First run · RAG integration · MCP · Documentation

See the problem it catches

A real citation can still carry an altered quote or an unsupported number:

Supplied source

Submitted claim or quotation

Finding

"The report lists three warehouses."

Claim declares the quotation "five warehouses" from that source.

quote_absent:report: the declared quote is not in the source.

"The synthetic review covers 120 documents."

Claim says the review covers 900 documents.

unmatched_numbers: 900 is not supported by the supplied source.

A packet contains only source report.

Claim cites source missing-report.

missing_source:missing-report: the reference does not resolve.

These are fictional examples. The first is a quote-presence check, not a general promise to understand number words or meaning. The checker also reports lexical-support gaps and negation cues for review; these are heuristics, not proof of contradiction.

A clean packet still returns factuality_status=not_assessed and requires human review. It does not establish truth, authenticate a source, or authorize an action.

Related MCP server: Brave Search MCP Server

First run

Requires Python 3.9+. Install the published package:

python -m pip install "agenda-intelligence-md==1.26.0"
agenda-intelligence --version

Copy this self-contained example into Python:

from agenda_intelligence.services import check_evidence_packet

packet = {
    "claims": [{
        "claim_id": "demo-claim",
        "text": "The synthetic review covers 900 documents.",
        "source_ids": ["demo-source"],
    }],
    "sources": [{
        "source_id": "demo-source",
        "text": "The synthetic review covers 120 documents.",
    }],
}

result = check_evidence_packet(packet)["response"]
print(result["packet_status"])
print(result["claims"][0]["lexical_support"]["unmatched_numbers"])
print(result["factuality_status"])

# Correct the claim, keeping the original source unchanged, then recheck.
packet["claims"][0]["text"] = "The synthetic review covers 120 documents."
print(check_evidence_packet(packet)["response"]["packet_status"])

Expected output:

source_review_required
['900']
not_assessed
packet_complete

Next: replace the fictional claim and excerpt with your own. Keep the original source text; rewriting it to agree with the answer defeats the check.

Where it fits

  • Think: Global Think Tank Analyst guides an AI agent in preparing a strategic-risk memo.

  • Check: Agenda Intelligence MD checks the claims and evidence supplied with an answer or memo.

  • Authorize: Vizier evaluates proposed actions against delegation and policy. It does not execute them; enforcement needs an authenticated integration.

AI drafts. Humans decide.

What this is

An inspectable check between generated output and the evidence supplied with it:

Claims + source excerpts → deterministic checks → findings → revise → recheck → human review
  • For RAG developers: check inline citations against the actual retrieved chunks.

  • For agent builders: return structured findings to a bounded repair loop.

  • For CI maintainers: fail a check when a supplied evidence packet needs review.

  • For document reviewers: identify missing evidence and prepare reviewer handoffs.

The evidence-packet contract

What you supply

What gets checked

Claims and source IDs

Whether references resolve within the packet

Declared quotations

Whether quoted text occurs in the supplied source

Claim wording and numbers

Lexical support heuristics, unmatched numbers, and negation checks

The assembled packet

Evidence gaps, per-claim findings, packet status, and reviewer actions

The checker returns packet_complete, source_review_required, or packet_incomplete. See the request schema, response schema, and evaluation notes.

What this is not

This is an evidence-integrity check, not a factuality verifier or source authenticator. It does not retrieve missing sources or establish semantic entailment. Lexical checks can miss correct paraphrases and accept misleadingly similar wording; a stale or false source can still pass.

A clean result does not certify trustworthiness, grant permission to act, or replace human review. Use semantic evaluation and domain review alongside it when your workflow needs them.

Review a RAG answer

Already have an answer and retrieved chunks? Use the adapter directly:

from agenda_intelligence import review_rag_answer

report = review_rag_answer(
    answer="The synthetic review covers 900 documents. [review-1]",
    sources=[{
        "source_id": "review-1",
        "text": "The synthetic review covers 120 documents.",
    }],
)
print(report["route"])  # revise
print(report["owner_actions"])

Use one claim per line and retain stable chunk IDs. Correct the answer and rerun the check; the clean route is human_review. Treat source text, tool output, and report contents as untrusted data, never as instructions to the agent.

For CLI input, save {"answer": "...", "sources": [...]} as answer.json, then run:

agenda-intelligence review-answer answer.json --strict --format json

--strict exits nonzero when revision is required. See the input contract and limitations and the runnable LangGraph repair loop.

Small, hand-labelled diagnostics report misses and false positives as well as catches. Exact source offsets, explicit opt-in arithmetic, named table cells, and PR summaries are available in the local package. No factuality or general hallucination-detection claim.

Use the CLI and CI

Save a packet with the same shape as the first Python example to packet.json:

  • agenda-intelligence check packet.json — print a readable report.

  • agenda-intelligence check packet.json --format json --strict — return JSON and enforce the packet status.

The second command exits nonzero unless the packet is packet_complete, so it can be used in a CI job after installing the package. --format sarif is also available for evidence-packet findings. The repository includes a GitHub Action.

To explore the bundled examples from a source checkout:

git clone https://github.com/vassiliylakhonin/agenda-intelligence-md.git
cd agenda-intelligence-md
python3 -m venv .venv
.venv/bin/python -m pip install -e .
.venv/bin/agenda-intelligence check examples/evidence-packet/request.json --strict
.venv/bin/agenda-intelligence review-answer examples/output-verification/rag-answer.json
.venv/bin/agenda-intelligence review-answer examples/output-verification/rag-answer-revised.json --strict

The first packet is complete. The original fictional RAG answer routes to revision; the revised answer routes to human review.

For a private CI pilot, use the local citation check and minimal report.

For local document review and HTML reports, use the file-review guide and example manifest.

Interfaces

Compatibility profiles and adapters

Your workflow

Start here

Python or command line

Quickstart · service functions

Local MCP over stdio

MCP setup and tool catalog

Hosted MCP

Hosted quickstart

Agent repair loops

Integration guides

HTTP or A2A

HTTP API · agent-native access

Protected agent actions

Interaction Trust + Vizier gate

The core checker is deterministic and stateless. Optional generation and document adapters have separate dependencies. The repository also retains the strategic-intelligence runtime and vertical workers as compatibility surfaces and examples built around evidence contracts.

Hosted Output Verification

For a browser trial, open One-claim review. To connect a Streamable HTTP MCP client, use:

https://output-verification.agendamcp.dpdns.org/mcp/agent

Discover the endpoint's tools, then call free_trial_status with {} to inspect trial availability. Choose review_answer for answers and source excerpts, or free_trial for claim/evidence objects matching its schema. The hosted trial has quotas; local Python checks do not require a hosted account.

Local stdio and hosted profiles expose different tool catalogs. Always discover the tools on the endpoint you connect to.

Supplier and document handoffs

The hosted Document Archive Review workflow helps prepare evidence checklists, assign missing-item owners, inspect extraction warnings and source locators, and export reviewer PDF or ZIP/JSON backups. It is separate from the local review command.

See the workspace guide and service-engagement example. Extraction does not authenticate documents; final coverage still needs human review.

Documentation

Core code lives in src/; runnable packets in examples/; guides in docs/; adapters in clients/ and integrations/; deployment packages in deploy/.

Contributing and feedback

Found a missed mismatch or a valid claim that gets flagged? Open an issue with a minimal, sanitized packet, the expected result, and the actual finding. Reproducible cases and integration examples are useful contributions.

For usage questions and workflow ideas, use Discussions. Read CONTRIBUTING.md before a pull request. The standard local verification command is make ci; Worker, discovery, runtime, and validation-guard changes require make verify-local.

License

MIT. The bundled official ACP schema retains its Apache-2.0 license and NOTICE.

Available Tools

32 tools
agentic_interaction_trustAInspect

Triage the trust evidence for an agent-mediated interaction (identity, operator or principal authorization, tool scope, session authentication, action intent) before a high-stakes action executes. Pass a structured trust_request (actor, target_surface, requested_action, dated_sources, risk_question, decision_stage) matching agentic-interaction-trust-request.schema.json. Returns a triage recommendation, trust signal, decision-readiness score, and the specific missing trust evidence. Evidence triage only: not cybersecurity monitoring, identity verification, or authorization; human review is required.

Inputs: trust_request (required).

agent_output_verificationAInspect

Choose this to review an existing AI answer's claims and supplied source excerpts, without checking a specific intended action. For action routing choose pre_action_check. Pass audit_json matching evidence-audit.schema.json (claims, evidence records, optional unsupported_claims). Returns a review-only relay verdict, per-claim findings, orphaned references and owner actions. Human review is required; no verdict is permission to relay. It does not verify factual truth, fetch or validate cited sources, or authorize an action.

Inputs: audit_json (required).

analyzeAInspect

Generate an auditable strategic-risk memo from a structured Agenda request. Use for sanctions, regulatory, geopolitical, trade, corridor, or policy-risk questions where the agent needs a memo with assumptions, scenarios, evidence discipline, and regional routing. Pass request matching agenda-request.schema.json. Returns a validated agenda-memo; when ANTHROPIC_API_KEY is unset it returns the assembled system_prompt for the host model to complete. No live source retrieval and no legal, compliance, financial, or investment advice.

Inputs: request (required).

append_evidenceAInspect

Append a claim and its sources to an evidence pack and re-validate the result. Use when building an evidence pack incrementally as sources are read, instead of assembling the whole document by hand. Omit pack_json to start a new pack (topic is then required). A claim whose text already exists gains the new sources instead of being duplicated, and unsupported_claims is kept consistent with per-claim support_status. support_status is never inferred as supported: omitted it defaults to unsupported (no sources) or partially_supported (sources supplied). Returns the updated pack to the caller; it does not write files, fetch URLs, verify quotes, score source reliability, or verify factual truth.

Inputs: claim (required), topic, sources, pack_json, +2 more.

audit_claimsAInspect

Validate a claim-level evidence audit and summarize support quality. Use after drafting or receiving a memo to check whether important claims point to evidence IDs with explicit support levels, uncertainty hooks, and risk-if-wrong notes. Pass audit_json matching evidence-audit.schema.json. Returns validity, support-level distribution, orphan evidence references, and unsupported-claim counts. It does not verify factual truth or source reputation.

Inputs: audit_json (required).

check_evidence_packetAInspect

Check a caller-provided evidence packet before human review. Use when an AI output declares claims, source IDs, optional verbatim quotes, and the full supplied source text. Returns packet_complete, source_review_required, or packet_incomplete per claim and overall, with broken references, quote mismatches, lexical-support gaps, unmatched numbers, and owner actions. Deterministic and local-text only: it does not retrieve sources, score source authority, assess factual truth, or authorize an action.

Inputs: packet_json (required).

check_memo_qualityAInspect

Check a schema-shaped Agenda memo against post-hoc evidence-readiness quality guardrails. Use after validate_memo or on any external model memo to catch schema-valid but unsafe output: approval/clearance overreach, hidden evidence gaps, generic monitoring, weak owner actions, or evidence-mode discipline failures. Returns schema_valid separately from ok; it does not verify factual truth.

Inputs: memo_json (required).

cis_secondary_sanctions_exposureAInspect

Triage secondary-sanctions exposure for a CIS-domiciled counterparty (Kazakhstan, Uzbekistan, Kyrgyzstan, Tajikistan, Turkmenistan, Georgia, Armenia, Azerbaijan, Moldova) for EU / UK / UAE / Singapore enhanced due diligence against OFAC EO 14114, the EU sanctions package, UK OFSI, and FATF / EAG typologies. Pass a structured exposure_request (counterparty, exposure_facets, jurisdiction_review_scope, dated_sources, risk_question, decision_stage) matching cis-secondary-sanctions-request.schema.json. Returns a triage recommendation, decision-readiness score, exposure dimensions, evidence gaps, and minimum sources before review. Local stdio runs on user-supplied evidence only (no live retrieval); a name match is not identity verification; human review is required.

Inputs: exposure_request (required).

corridor_bankability_screenAInspect

Illustrative corridor project finance screen using supplied financial figures and internal DSCR/leverage thresholds. Missing financial data is rejected. Mandatory human review; no lender approval or current hydrological verification. Optional paid output is a scenario Markdown memo and 15-year JSON schedule; no Excel/PDF artifact is generated.

Inputs: dscr_min (required), capex_usd_m (required), corridor_leg (required), project_name (required), +4 more.

create_briefAInspect

Assemble an agenda brief from supplied fields and report which required fields are still missing. Use when producing a brief inside the protocol instead of hand-building JSON: call it with whatever is known so far, read missing_required, and call again with the remaining fields. Call with no arguments to get an empty scaffold plus the required field list. evidence_mode defaults to reasoning_only. Returns the assembled brief object and its schema errors to the caller; it does not write files, retrieve sources, draft prose, or verify factual truth.

Inputs: scenarios, confidence, watch_next, bottom_line, +8 more.

deep_diveAInspect

Reserved placeholder for a future Agenda Intelligence v2 deep-dive workflow. Do not use for current detailed analysis. For production work today, call analyze with request.depth set to scenario or red_team. This tool only returns a planned status message and performs no analysis.

Inputs: aspect.

generate_repair_promptBInspect

Generate actionable self-correction instructions for an LLM agent from an evidence packet request. Inspects validation and claim-level issues (missing sources, misquoted excerpts, unmatched numbers, polarity/negation mismatches, weak lexical support) and formats a structured markdown prompt for the agent to revise its claims and citations.

Inputs: packet_json (required).

get_lensAInspect

Return the full markdown for one packaged regional or sector lens. Use after list_lenses when an agent needs the actual specialist context, such as the Central Asia/Caspian or sanctions lens, for a strategic-risk task. Pass lens_type and lens_id exactly as listed. Returns static markdown; it does not retrieve live events or decide which lens should be used.

Inputs: lens_id (required), lens_type (required).

get_protocolAInspect

Return packaged Agenda Intelligence protocol markdown. Use when an agent needs the reasoning contract, evidence-discipline rules, or operating instructions before producing strategic-risk analysis. Pass name='entrypoint' for the main protocol. Returns markdown text from the installed package; it does not analyze a question or validate user data.

Inputs: name (required).

get_schemaAInspect

Return a packaged Agenda Intelligence JSON Schema so an agent can construct a valid payload before calling validate_brief, validate_evidence, validate_memo, analyze, or a vertical worker. Pass name as the schema key (for example agenda_brief, evidence_pack, agenda_memo, middle_corridor_deal_risk_request), its file name, or its bare stem; omit name to list the available schema keys. Returns the schema document and its version. Contract discovery only: it does not validate data, fill in a template, or verify factual truth.

Inputs: name.

get_signalAInspect

Return one packaged strategic-risk signal markdown file by ID. Use after list_signals when an agent needs the full text of a specific archived signal for context or examples. Pass signal_id without the .md extension. Returns static markdown from the installed package; it does not fetch live updates.

Inputs: signal_id (required).

grounded_checkAInspect

Check whether a caller-supplied corpus of source texts lexically supports each claim. Use when you have claims plus the full text of the sources they should rest on and need a deterministic grounded/weakly_grounded/ungrounded verdict per claim before human review. Pass request_json matching grounded-check-request.schema.json (claims with claim_id/claim_text and optional verbatim quotes, corpus documents with corpus_id/text). Returns per-claim grounding status, coverage, best-matching passage, unmatched numeric values, quote checks, and owner actions. Local-text only: no outbound requests, no source discovery, no source-reliability scoring, and no factual-truth verification — grounding in a wrong corpus does not make a claim true.

Inputs: request_json (required).

gulf_maritime_exposureAInspect

Triage maritime sanctions and chokepoint-disruption exposure for a vessel/voyage transiting the Strait of Hormuz, Persian/Arabian Gulf, Gulf of Oman, Bab-el-Mandeb, or Red Sea (Iran-oil, Russia price-cap, dark-fleet, STS transfer, flag-hopping, P&I gap, AIS manipulation). Pass a structured exposure_request (vessel/voyage, route, cargo, counterparties, dated_sources, risk_question, decision_stage) matching gulf-maritime-exposure-request.schema.json. Returns a triage recommendation, exposure signal, decision-readiness score, supplied vs. minimum-required sources, and evidence gaps. Pre-compliance evidence triage only: no live retrieval, does not resolve vessel ownership or verify identity, no legal or sanctions advice; human review is required.

Inputs: exposure_request (required).

kazakhstan_market_entry_readinessBInspect

Grade a Kazakhstan market-entry file (distribution, import, service, showroom, EPC, renewable-energy, infrastructure, technology-transfer, or partner-entry) against a staged source-requirement taxonomy before a launch, budget, or partner commitment. Pass a structured readiness_request (entry_mode, sector, market_entry_file, dated_sources, decision_stage) matching market-entry-readiness-request.schema.json. Returns a gate decision, readiness label, evidence gaps, claim audit, owner actions, and watch-next indicators. Evidence triage only: not legal, compliance, customs, tax, sanctions, or launch-authorization advice; no live retrieval; human review is required.

Inputs: readiness_request (required).

list_lensesAInspect

List packaged regional and sector lens IDs available to Agenda Intelligence. Use before get_lens when an agent needs to discover which geography or sector reference packs can be loaded. Optionally filter by lens_type='regional' or 'sector'. Returns metadata only; it does not return full lens markdown or run analysis.

Inputs: lens_type.

list_signalsAInspect

List packaged strategic-risk signal records vendored from Global Think Tank Analyst. Use to discover available signal IDs before calling get_signal, or to show a static archive index inside an agent workflow. Returns the packaged signals/index.json snapshot. Read-only and offline: it does not fetch live news or update the archive.

Inputs: no named parameters.

list_source_categoriesAInspect

List source requirement category slugs packaged with Agenda Intelligence. Use this first when you do not know which category to pass to source_plan or source_coverage. Returns category IDs and per-pack counts. Discovery only: it does not discover sources, validate coverage, or verify factual truth.

Inputs: no named parameters.

middle_corridor_deal_riskAInspect

Screen a Kazakhstan / Middle Corridor (Trans-Caspian) trade deal for sanctions-adjacent and corridor risk before signature, shipment, insurer handoff, or committee review. Pass a structured deal_risk_request (route, cargo, counterparties, dated_sources, risk_question, decision_stage) matching middle-corridor-deal-risk-request.schema.json. Returns a triage recommendation, risk signal, decision-readiness score, supplied vs. minimum-required source categories, evidence gaps, and a high-risk-jurisdiction presence flag. Pre-compliance evidence triage only: no live retrieval, no factual-truth verification, no legal or sanctions advice; human review is required.

Inputs: deal_risk_request (required).

pre_action_checkAInspect

Choose this for an unsigned readiness check of a specific actor, intended action and target. Pass action_request with claim evidence, risk tier, policy checks and any external approval reference. Returns continue, request_evidence, require_approval or stop, with gaps and reasons. Use agent_output_verification for an answer-only claim review. Resubmit the same run_id after adding evidence or approval. Does not authenticate, authorize, enforce, persist state, issue a signed receipt or perform the action.

Inputs: action_request (required).

score_outputAInspect

Score a before/after pair of agenda-analysis text with the bundled heuristic rubric. Use in evals or demos to compare whether an Agenda Intelligence rewrite improved structure, evidence labeling, uncertainty handling, and decision-readiness. Pass before_text and after_text as plain strings. Returns a heuristic score and breakdown; it is not a factuality, legal, compliance, or investment judgment.

Inputs: after_text (required), before_text (required).

source_coverageAInspect

Diagnose whether an evidence pack covers the must_check source types for a category. Use after collecting evidence to find source gaps before relying on a memo. Pass evidence_json and optionally category; if category is omitted, the tool uses evidence_json.source_category. Returns matched and missing source types. It does not discover new sources, verify truth, or change validate_evidence results.

Inputs: evidence_json (required), category.

source_planAInspect

Return required source categories for a strategic-risk evidence pack. Use before collection or review to know which source types should be checked for a domain such as sanctions, elections, conflict, cyber, or energy. Pass the source category slug as category. Returns a checklist of must_check and optional source types; it does not search the web, fetch documents, or validate an evidence pack.

Inputs: category (required).

validate_briefAInspect

Validate a caller-provided agenda brief against agenda-brief.schema.json. Use before running scoring, evidence audit, or publication steps to catch missing sections and schema drift. Pass the parsed brief object as brief_json. Returns validation status and schema errors only; it does not judge factual truth, retrieve sources, or improve the brief.

Inputs: brief_json (required).

validate_evidenceAInspect

Validate a caller-provided evidence pack against evidence-pack.schema.json. Use when you need to confirm that claims, evidence IDs, provenance fields, and optional source_category metadata are structurally usable by Agenda Intelligence. Pass the parsed evidence pack as evidence_json. Returns schema validity and errors; it does not verify whether evidence is true, current, or sufficient.

Inputs: evidence_json (required).

validate_memoAInspect

Validate an Agenda memo against agenda-memo.schema.json. Use after a host model or external process drafts a memo and before treating it as an Agenda Intelligence artifact. Pass the parsed memo as memo_json. Returns validity and schema errors; it does not score truthfulness, retrieve sources, or rewrite the memo.

Inputs: memo_json (required).

verify_claimsAInspect

Issue a bounded factual Claim Verdict from caller-supplied evidence records. Evaluates freshness, authoritative source class, independent source groups, conflicts, jurisdiction, and exact subject identifiers as of a declared date. Returns verified, contradicted, partially_supported, unresolved, or not_verifiable. No source discovery or live retrieval; verified means the declared evidence threshold is met, not absolute truth. Human review remains required.

Inputs: request_json (required).

verify_quotesAInspect

Check whether quoted fragments appear in caller-provided source text. Use when you have local excerpts and need to catch citation drift or misquoted snippets. Accepts an evidence pack (sources/evidence items with a quote) or an evidence-audit doc with claims[].supporting_quotes; span checks carry the originating claim_id. Pass pack_json plus texts mapping evidence_id to plain text. Returns present, absent, and missing_source_text results. Local-text only: it does not make outbound requests, discover sources, score source reputation, gather news, or verify factual truth.

Inputs: pack_json (required), texts.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.6/5.0

    Scored across 32 tools

    Disambiguation3/5

    The vertical triage tools (CIS sanctions, Gulf maritime, Middle Corridor, Kazakhstan entry, corridor bankability, agentic trust) are mostly domain-distinct, but the large cluster of evidence/claim-checking tools (check_evidence_packet, grounded_check, verify_quotes, verify_claims, audit_claims, agent_output_verification) has subtle boundaries that an agent can easily misselect. analyze also overlaps conceptually with the vertical risk triages, and the placeholder deep_dive adds noise.

    Naming Consistency3/5

    Names are all snake_case, but conventions vary widely: verb_noun (validate_brief, get_lens), noun-phrase verticals (gulf_maritime_exposure), bare verbs (analyze), and generic nouns (source_plan). This is readable but not a predictable tool-family pattern.

    Tool Count2/5

    At 32 tools, the server is heavy for a single strategic-risk MCP surface; several vertical workers and multiple evidence-checking variants sit alongside one another. deep_dive is an admitted placeholder, which weakens the case that every tool earns its place.

    Completeness4/5

    The surface covers a full strategic-risk memo lifecycle: protocol/lens discovery, brief and evidence construction, schema validation, source planning/coverage, quote/grounding/claim checks, memo quality checks, and vertical triage. Remaining gaps are minor, such as no tool for editing/removing evidence entries or performing live source retrieval, though live retrieval is explicitly out of scope.

    Maintenance

    ActivityActive
    ResponsivenessLimited data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      B
      quality
      D
      maintenance
      MCP server that provides AI assistants access to stock market data including financial statements, stock prices, and market news through a Model Context Protocol interface.
      11
      2,329
      MIT
    • A
      license
      A
      quality
      B
      maintenance
      An MCP implementation that integrates the Brave Search API, providing comprehensive search capabilities including web, local business, image, video, news searches, and AI-powered summarization.
      9
      57,365 npm
      1,585
      MIT
    • A
      license
      A
      quality
      B
      maintenance
      Real-time and historical oil, gas, and commodity prices. 40+ energy commodities including Brent Crude, WTI, Natural Gas, LBMA Gold/Silver, EU Carbon, and refined products. Get current prices, compare commodities, view market overviews, and access historical data — all through natural language. Used by energy traders, fintech companies, and researchers worldwide.
      32
      393 npm
      4
      MIT