> ## Documentation Index
> Fetch the complete documentation index at: https://opm.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Multi-Agent Consensus

> Three LLMs scan in parallel, submit scores on-chain, aggregate via intelligence-weighted averaging.

# Multi-Agent Consensus

Three different AI models analyze every package in parallel. Each submits an independent risk score on-chain. Scores are aggregated using intelligence-weighted averaging.

## Agent Lineup

| Agent | OpenRouter | OpenAI fallback |
| - | - | - |
| agent-1 | Claude Sonnet 4 | GPT-4.1 |
| agent-2 | Gemini 2.5 Flash | GPT-4.1 Mini |
| agent-3 | DeepSeek Chat | GPT-4.1 Nano |

Model diversity reduces single-model blind spots. Override via `AGENT1_MODEL`, `AGENT2_MODEL`, `AGENT3_MODEL`.

## What Each Agent Does

1. Receives package source, `package.json`, version history, and any known CVEs
2. Produces structured JSON: risk score (0-100), risk level, reasoning, vulnerability list, supply chain indicators
3. Submits score on-chain via `OPMRegistry.submitScore()`

Each agent scores a version only once.

## Intelligence-Weighted Scoring

When `ARTIFICIAL_ANALYSIS_API_KEY` is set, scores are weighted by each model's Intelligence Index and Coding Index from the Artificial Analysis API. Higher-capability models carry more weight in the final score.

<Note>
  Without the API key, agents are weighted equally (simple mean).
</Note>

## Provider Routing

* `OPENROUTER_API_KEY` set → routes through OpenRouter (multi-model)
* Only `OPENAI_API_KEY` → falls back to GPT-4.1 family
* Force a provider: `LLM_PROVIDER=openrouter` or `LLM_PROVIDER=openai`


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.