# Corgent

*<mark style="color:red;">This page is a high-level overview. Details, APIs, and flows will move into sub-pages as Corgent evolves.</mark>*

***

### TL;DR

**Corgent** is the **core Agentic AI Infra surface of Cortensor** – an **ERC-8004–native trust and execution agent** designed for **agent ecosystems in general** (8004 agents, agent frameworks, and protocol-level integrations).

It exists so agents and dApps don’t have to blindly trust a single model run. Instead, they can call Corgent to:

* **Delegate** tasks to Cortensor miners with explicit reliability tiers
* **Validate** claimed results using **PoI / PoUW**, redundancy, and node reputation
* **Arbitrate** conflicts using oracle-grade replays and consensus

At a high level:

> **Agent / dApp decides → Corgent delegates or validates → Cortensor computes & proves → Corgent returns a verdict → Agent / dApp continues.**

Corgent is the **canonical, infra-native agent surface** of Cortensor.\
**Bardiel** is a **Virtual-first, product-layer agent** that *also supports ERC-8004*, but focuses on value-added features and UX built on top of this core Corgent surface.

***

### What Corgent Is

Corgent is a **router-side oracle & policy layer** that exposes Cortensor’s decentralized AI stack to **ERC-8004 agents and agent ecosystems** in a clean, programmable way.

Conceptually, Corgent:

* Sits directly on top of **Router Nodes, Session, and Validation modules**
* Uses **miners** for inference and **PoI / PoUW + reputation + integrity checks** for trust
* Returns **structured, machine-readable outcomes**, such as:
  * `VALID` – consistent, useful, and within spec
  * `INVALID` – conflicts with consensus, schema, or constraints
  * `RETRY` – re-run with refined spec or stronger tier
  * `NEEDS_SPEC` – task is underspecified or structurally unclear

From the ERC-8004 perspective, **Corgent is the base trust oracle & execution service** that any compliant agent, marketplace, or agent framework can call for **delegated inference, result verification, or dispute resolution**.

***

### What Corgent Is Not

Corgent is **not**:

* A **planner / goal generator** – higher-level agents or frameworks decide *what to do*
* A **miner** – Cortensor miners perform the actual inference work
* The **base protocol validator set** – on-chain validators enforce network rules and economics
* A UX-heavy or “creative” product agent – Corgent focuses on **trust, policy, and orchestration**, not front-end ergonomics

Think of Corgent as **core trust middleware** between agent ecosystems and the Cortensor network – minimal, stable, and designed to be built on.

***

### Where Corgent Lives in the Stack

**Layering (for ERC-8004 & agent ecosystems):**

1. **Agents & Platforms**
   * ERC-8004 agents, registries, and marketplaces
   * Agent frameworks and orchestrators
   * Web2 backends, bots, and services that speak HTTP/x402
2. **Corgent (Core Trust & Orchestration Surface)**
   * Policy selection (Fast / Safe / Oracle-grade / Adaptive)
   * Delegation of tasks into Cortensor
   * Validation & arbitration logic
   * Verdicts + evidence back to callers (8004-compatible metadata)
3. **Cortensor Network**
   * Router Nodes & Session Queue
   * Miner Nodes (decentralized inference)
   * Validation: **Proof of Inference (PoI)**, **Proof of Useful Work (PoUW)**, node reputation, integrity checks
   * Payments, staking, and settlement on L2/L3
4. **Base Chains**
   * Testnet-0 (Arbitrum Sepolia L2)
   * Testnet-1 (COR L3 Rollup)
   * Future Mainnet-Lite (Arbitrum L2)
   * Future Mainnet-Full (COR L3)

Corgent packages this stack into a **canonical, ERC-8004-ready interface** that other agents can trust and compose with.

***

### Core Capabilities

#### 1. Delegation-as-a-Service

> “Run this task on Cortensor with reliability tier X.”

* Agents send **task + context** (prompt, inputs, constraints, spec)
* Corgent selects **model, redundancy, and validation tier**
* Submits the job into Cortensor via Router / Session
* Aggregates miner outputs + PoI / PoUW / reputation signals
* Returns an **oracle-validated output** plus optional confidence / evidence

Use when you want **reliable execution** rather than a one-off opaque model call.

***

#### 2. Validation-as-a-Service

> “Verify that this other agent’s result is correct/useful.”

* Agents send `{task, claimed_result, spec}`
* Corgent chooses a validation pattern:
  * Deterministic → PoI rerun + direct comparison
  * Non-deterministic → N-of-M consensus
  * Structured → Schema/spec checks as a baseline
* Triggers reruns / consensus on Cortensor as needed
* Combines **PoI, PoUW, reputation, and integrity checks**
* Returns `VALID / INVALID / RETRY / NEEDS_SPEC` + machine-friendly reasoning fields

Use as a **trust layer, guardrail, and audit channel** around important actions.

***

#### 3. Arbitration-as-a-Service

> “Two parties disagree — give me a binding oracle view.”

* Typical for buyer/seller disputes in **8004 marketplaces** or cross-agent conflicts
* Corgent escalates to **oracle-grade policy** (more miners, diversity, strict thresholds)
* Recomputes the task under tight, pre-declared rules
* Compares disputed outputs vs **oracle consensus + spec**
* Returns a verdict that downstream systems can treat as **binding** for settlement or governance

Use when you need **replayable, evidence-backed dispute resolution**, not ad-hoc heuristics.

***

### Validation Tiers & Policy

Corgent exposes **policy tiers** to balance cost vs assurance:

* **Fast**
  * 1 miner
  * Light spec/schema + basic checks
  * Low latency, low cost
* **Safe**
  * 3 miners
  * PoI consensus + basic usefulness scoring
  * Recommended default for most agent calls
* **Oracle-Grade**
  * 5+ miners with diversity sampling
  * Strict PoI, richer PoUW rubrics, stake/reputation weighting
  * For high-stakes decisions and disputes
* **Adaptive**
  * Start with low-cost run
  * Auto-escalate redundancy and validation depth when confidence is low

These policies are intended to be **stable, documented, and versioned**, forming the backbone of **Agentic AI Infra** for ERC-8004 agents and other ecosystems.

***

### ERC-8004 Integration

Corgent is designed to be a **first-class ERC-8004 citizen**:

* Registered as an **8004-compatible service/agent**, discoverable by 8004 registries
* Accepts **standardized agent task payloads** (with spec/metadata)
* Returns **machine-readable verdicts and artifacts** that can be referenced by:
  * Other agents in their decision logic
  * Marketplaces and settlement layers
  * On-chain verification or scoring systems

Typical patterns:

* Offload heavy or sensitive tasks from an 8004 agent to Corgent for **delegated execution**
* Validate another agent’s output before **triggering payments or state changes**
* Use arbitration flows for disputes in **8004-based marketplaces** or long-running agent workflows

Sub-pages will define the **exact 8004-aligned payloads, schemas, and examples**.

***

### Corgent vs Bardiel (Positioning)

Both **Corgent and Bardiel support ERC-8004**, but **they serve different roles**:

* **Corgent – Core Agentic AI Infra (Infra-Native)**
  * Primary, **canonical agent surface** of the Cortensor Network
  * Focused on **core agent services**: delegation, validation, arbitration
  * Tight alignment with Router, Sessions, and validation modules
  * Interface designed to be **lean, stable, and composable** for protocols and frameworks
  * The “base layer” other agents (including Bardiel) can standardize on
* **Bardiel – Value-Added Ecosystem Agent (Virtual-First + ERC-8004)**
  * **Virtual-native service agent**, built on Cortensor and often on Corgent
  * Also capable of registering and operating in **ERC-8004 ecosystems**
  * Focused on **product-level and UX features**:
    * GAME/ACP-friendly flows
    * Ecosystem-specific presets and policies
    * Potential token mechanics, higher-level workflows, and trajectory tooling
  * Evolves faster at the edges to match **agent demand and UX needs**

You can think of it as:

> **Corgent** = *Core Agentic AI Infra* – the canonical “agent trust surface” for Cortensor.\
> **Bardiel** = *Value-added product agent* – built on that surface, specialized for Virtual and richer UX, but also able to participate in the ERC-8004 world.

In practice:

* If you are designing **protocols, infra, or 8004-native agents**, you generally integrate **Corgent** as your primary trust/execution layer.
* If you are building **Virtual-first experiences** or need richer UX and ecosystem integrations, you may integrate **Bardiel**, which in turn leans on Corgent/Cortensor underneath.

***

### Relationship to Router Node Evolution

Corgent builds directly on the **Router Node roadmap**:

* **Router v1.5** – Adds MCP/x402-style surfaces and stable `/completions` endpoints
* **Router v1.6** – Adds `/validate` and completes the **Delegate + Validate** pair
* **Corgent v1.x** – Wraps these into **policy-driven, ERC-8004-ready Agentic AI Infra services**

Over time, Corgent becomes the **canonical “agent interface” for Router + Validation**, while Bardiel remains a **higher-level ecosystem agent** that can adopt new product features faster.

***

### Why Corgent Matters

For **agent ecosystems & ERC-8004**:

* Provides a **neutral, reusable trust oracle** that any agent can call
* Makes **verifiable inference and validation** a core primitive instead of an add-on
* Helps agents avoid lock-in to a single model or vendor by using **multi-miner consensus + PoI/PoUW**

For the **Cortensor Network**:

* Turns raw decentralized compute + validation into a **clean, agent-ready contract**
* Anchors Cortensor in **real agent workflows**, not just human-facing APIs
* Defines a long-lived **Agentic AI Infra layer** that other products (like Bardiel) can build on

Crucially, Corgent is **not meant to replace agent reasoning (GAME logic, planner LLMs, etc.)**. Instead:

* **Agents still think; Corgent helps them be sure.**
* Agents can call Corgent whenever they need **high-confidence decisions, verification for actions, or oracle-grade confirmation** using Cortensor’s redundant miners and PoI/PoUW.
