Skip to content

Conversation

@JasonRobertDestiny
Copy link

@JasonRobertDestiny JasonRobertDestiny commented Jan 19, 2026

Cortensor Governance Agent

Hackathon #4 Submission - MCP Client for DeFi Governance Analysis

An intelligent agent that analyzes DeFi governance proposals using the Cortensor decentralized AI network, with built-in verification and cryptographic audit trails.

Highlights

  • MCP 2024-11-05 Protocol - Full HTTP stream implementation with notifications/initialized
  • Dual-Mode Client - MCP for public router + REST API for self-hosted nodes
  • Trust & Verification - cortensor_validate for consensus validation
  • Evidence Bundles - SHA-256 integrity hashes for audit trail
  • Safety & Constraints - Strict boundaries for responsible operation

Architecture

+-----------------------------------------------------------+
|                   Governance Agent                         |
|  +------------+   +------------+   +------------------+   |
|  |  Analyze   |-->|  Delegate  |-->|    Validate      |   |
|  |  Proposal  |   |  to Miners |   |    Results       |   |
|  +------------+   +------------+   +------------------+   |
+-----------------------------------------------------------+
         |              MCP / REST API              |
         v                                          v
+-----------------------------------------------------------+
|              Cortensor Router Network                      |
+-----------------------------------------------------------+

Safety & Constraints

What the Agent Does:

  • Analyzes governance proposals
  • Delegates inference to Cortensor network
  • Validates results through consensus
  • Generates tamper-proof evidence bundles

What the Agent Refuses:

  • No execution of transactions
  • No private key handling
  • No financial advice
  • No automated voting
  • No external API calls beyond Cortensor

Evaluation Alignment

Criteria Weight Implementation
Agent capability & workflow 30% Complete analysis workflow
Cortensor Integration 25% MCP protocol, cortensor_validate
Reliability & safety 20% Error handling, strict constraints
Usability & demo 15% demo.py, clear README
Public good impact 10% MIT license, reusable library

Demo

cd apps/cortensor-governance-agent
pip install -e .
python demo.py

Bonus Features

  • MCP 2024-11-05 protocol (HTTP stream)
  • /validate endpoint integration
  • x402-enabled router support

Built for Cortensor Hackathon #4 | MIT License

MCP-Compatible Verifiable Agent Framework for Cortensor Network.

Features:
- MCP Server with 5 tools (inference, verify, miners, audit, health)
- Multi-Agent Swarm (Planner, Executor, Validator, Auditor)
- Evidence Bundle with SHA-256 cryptographic integrity
- Mock mode for development and testing
- 11 passing tests

Cortensor Integration:
- Uses Cortensor Web2 API (/api/v1/completions)
- Session-based inference with PoI consensus
- Multi-miner response aggregation

Demo: export CORTENSOR_MOCK_MODE=true && python examples/full_workflow_demo.py
@JasonRobertDestiny JasonRobertDestiny changed the title [Hackathon #4] Cortensor MCP Gateway - Verifiable Agent Framework [Hackathon #4] Cortensor Governance Agent - MCP Client for DeFi Analysis Jan 19, 2026
JasonRobertDestiny and others added 5 commits January 19, 2026 15:10
Previous submission was an MCP Server. Per official feedback,
entries should be MCP clients that connect to Cortensor's
existing MCP server at router1-t0.cortensor.app/mcp.

New implementation:
- MCP Client using 2024-11-05 protocol (HTTP streaming)
- Connects to Cortensor MCP and calls cortensor_completions/validate
- Governance Analyst Agent for DeFi proposal analysis
- Evidence bundle with SHA-256 integrity hash

Tested: MCP connection successful, all 10 tools accessible.
- Add REST API support for self-hosted router nodes
- Implement full MCP 2024-11-05 protocol with notifications/initialized
- Add demo.py showing MCP and REST connection modes
- Update README with production-ready documentation
- Support API key authentication for VPS routers

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Document what the agent does and refuses to do
- Add sample demo output for runtime proof
- Update evaluation alignment to match Hackathon cortensor#4 criteria
- Add bonus features section

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Implements the competitive hackathon submission pattern per official
Cortensor guidance: use /delegate and /validate endpoints instead of
simple /completions for higher success rates.

Key changes:
- Add delegate() method for k-redundant inference across miners
- Add validate() method for PoI + PoUW verification
- Add session log export for hackathon submission evidence
- Add delegate_validate_demo.py demonstrating the full workflow
- Update README with competitive submission pattern documentation

API endpoints:
- /api/v1/delegate - Delegate tasks to k miners with consensus
- /api/v1/validate - Validate results via re-inference

Session logs capture complete audit trail with request/response
pairs, timestamps, and latency metrics for submission.
Includes:
- session_log_20260119_112544.json: Complete session log with 2 delegates + 2 validates
- submission_evidence/demo_output.txt: Full demo run output

Evidence shows:
- /delegate endpoint: consensus 1.0, 3 miners
- /validate endpoint: is_valid=true, confidence 0.88-0.92
- JWS attestations included
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant