Skip to content

Donyemiight/sentriagent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

17 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

SentriAgent

The trust layer every AI agent calls before it touches money. Risk-scoring ASP for the OKX.AI marketplace. Pay-per-call via x402.

MIT License Node 20+ TypeScript MCP x402 Live

Built for the OKX AI Genesis Hackathon (Jul 3-17, 2026) β€” the launch campaign seeding the first wave of Agent Service Providers (ASPs) for OKX's agent economy marketplace.

Live at: sentriagent.xyz Author: Olaniyan Oluyemi (@donyemiight) Contact: yemiight777@yahoo.com (OKX Agentic Wallet & listings) | donyemiight@gmail.com (GitHub)


🎯 The Problem

When AI agents autonomously execute crypto transactions β€” swaps, transfers, contract calls β€” they need pre-flight risk checks. Today, an agent calling swap(USDC β†’ TOKEN_X) has no fast, pay-per-call way to verify:

  • Is TOKEN_X a honeypot?
  • Is the contract upgradeable by a malicious owner?
  • Has the deployer wallet done rugs before?
  • Is the liquidity deep enough to not get rugged mid-trade?

Centralized tools (CertiK, GoPlus web apps) exist for humans. None are purpose-built for agents that pay per call.

πŸ’‘ The Solution

SentriAgent exposes 4 MCP tools that any AI agent (Claude Code, OpenClaw, Codex, Hermes) can call directly. Payment happens autonomously via OKX Agent Payments Protocol (APP) over x402 β€” no human in the loop.

agent.run("swap 100 USDC for TOKEN_X")
  β†’ mcp.call("assess_token", { chain, address })
    β†’ HTTP 402: $0.01 USDT
      β†’ agent signs payment
        β†’ retry with X-Payment header
          β†’ verdict: { score: 23, level: "CRITICAL", proceed: false }
            β†’ agent.run aborts: "Token is honeypot, refusing to swap"

πŸ›  Tools Exposed

Tool Description Price
assess_token 0-100 risk score for a token contract (multi-source fusion) $0.01 USDT/call
assess_wallet Risk profile for a wallet (rug history, sanctions, mixer exposure) $0.01 USDT/call
assess_tx Pre-flight simulation combining target + sender risk $0.02 USDT/call
bundle_assess Bulk assess up to 5 tokens in 1 call (20% cheaper) $0.05 USDT/5

πŸ”¬ Signal Sources (Multi-Source Fusion)

We don't trust any single oracle. SentriAgent fuses:

  1. OKX onchainos-mcp β€” token metadata, holder cluster, liquidity depth, smart-money activity
  2. GoPlus Security β€” honeypot detection, buy/sell tax, ownership privileges, self-destruct
  3. De.Fi β€” wallet reputation, historical rug patterns, exploit exposure

Scoring: weighted average with hard overrides for honeypots (score ≀ 10) and rug history (score ≀ 15).

🌐 Supported Chains

Ethereum Β· BSC Β· Polygon Β· Arbitrum Β· Base Β· X Layer Β· Solana

πŸ’Έ Payment: OKX Agent Payments Protocol

Pricing: $0.01-$0.05 USDT per call, settled on X Layer (gas-free stablecoin transfers).

Agents pay via x402:

  1. First request β†’ server returns HTTP 402 with payment challenge
  2. Agent signs payment using its Agentic Wallet
  3. Agent retries with X-Payment + X-Payment-Id headers
  4. Server verifies, settles, returns verdict

πŸš€ Quick Start

Install MCP server (for Claude Code / OpenClaw / Codex)

# Coming soon to OKX.AI marketplace
# For now, run locally:
git clone https://github.com/Donyemiight/sentriagent.git
cd sentriagent
npm install --no-audit --no-fund --omit=optional
npm run build

# Configure your MCP client (Claude Code example):
# claude mcp add sentriagent node /path/to/sentriagent/dist/mcp/server.js

# Then in any agent:
await mcp.call("assess_token", { chain: "ethereum", address: "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48" })

Call the HTTP API directly

# Without payment β†’ 402 challenge
curl -X POST https://sentriagent.xyz/v1/assess-token \\
  -H "Content-Type: application/json" \\
  -d '{"chain":"ethereum","address":"0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"}'

# With x402 payment β†’ verdict
curl -X POST https://sentriagent.xyz/v1/assess-token \\
  -H "Content-Type: application/json" \\
  -H "X-Payment-Id: pay_xxx" \\
  -H "X-Payment: 0xsignature..." \\
  -H "X-Payment-Tx: 0xtxhash..." \\
  -d '{"chain":"ethereum","address":"0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"}'

πŸ— Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  AI Agent       β”‚  Claude Code / OpenClaw / Codex / Hermes
β”‚  (MCP client)   β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”˜
         β”‚ MCP / x402 / HTTP
         β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  SentriAgent    β”‚  Fastify HTTP + MCP server
β”‚  (this repo)    β”‚  - x402 payment gate
β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”˜  - Risk orchestration
         β”‚
    β”Œβ”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
    β–Ό    β–Ό    β–Ό          β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ OKX  β”‚ β”‚GoPlusβ”‚ β”‚ De.Fi  β”‚ β”‚ APP/x402β”‚
β”‚OS-mcpβ”‚ β”‚      β”‚ β”‚        β”‚ β”‚settle   β”‚
β””β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸ“Š Why SentriAgent Wins

Category Why we fit
Best Product Multi-source fusion, not single-oracle. Built agent-first, not human-dashboard-adapted.
Business Potential Trust is a universal need β€” every agent that touches money is a customer.
Revenue Rocket Sub-cent pay-per-call model. 1000 calls = $10/day per active agent client.
Finance Copilot Risk scoring IS finance copiloting.
Software Utility Tool every agent builder reaches for.

πŸ“‚ Project Structure

sentriagent/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ server.ts            # Main entry point
β”‚   β”œβ”€β”€ api/
β”‚   β”‚   └── app.ts           # Fastify HTTP API + landing page
β”‚   β”œβ”€β”€ mcp/
β”‚   β”‚   └── server.ts        # MCP server (stdio transport)
β”‚   β”œβ”€β”€ risk/
β”‚   β”‚   β”œβ”€β”€ engine.ts        # Multi-source fusion + scoring
β”‚   β”‚   └── sources/         # OKX / GoPlus / De.Fi adapters
β”‚   β”œβ”€β”€ payments/
β”‚   β”‚   └── x402.ts          # APP/x402 payment gate
β”‚   └── utils/
β”‚       β”œβ”€β”€ config.ts        # Env-based config
β”‚       └── logger.ts        # Pino logger
β”œβ”€β”€ public/                  # Static assets
β”œβ”€β”€ docs/                    # User-facing docs
β”œβ”€β”€ test/                    # Test suite
β”œβ”€β”€ Dockerfile               # Fly.io deployment
β”œβ”€β”€ fly.toml                 # Fly.io config
β”œβ”€β”€ package.json
β”œβ”€β”€ tsconfig.json
└── README.md

πŸ§ͺ Test

npm test

🚒 Deploy

# First time:
fly launch --name sentriagent --region sin

# Set secrets (real wallet address, API keys):
fly secrets set PAYMENT_RECEIVER_ADDRESS=0xYourWallet
fly secrets set OKX_ONCHAINOS_API_KEY=...

# Deploy:
fly deploy

# View logs:
fly logs

πŸ“œ License

MIT β€” fork, modify, ship your own trust layer.

🀝 Hackathon Submission


Built with ❀️ by @donyemiight for the agent economy.

About

Trust-as-a-Service for AI Agents. Risk-scoring MCP service on OKX.AI marketplace. x402/APP pay-per-call.

Topics

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Packages

 
 
 

Contributors