Skip to content

Public API for AgentMesh trust verification - Moltbook integration

Notifications You must be signed in to change notification settings

imran-siddique/agentmesh-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AgentMesh API

Public API for AgentMesh trust verification and governance services.

Deploy with Vercel

Overview

This API enables AI agents to:

  • Register with the AgentMesh network
  • Perform cryptographic trust handshakes
  • Verify other agents' trust scores
  • Query audit logs

Endpoints

Method Endpoint Description
GET /api Health check and stats
POST /api/register Register a new agent
GET /api/verify/:did Verify an agent's status
POST /api/handshake Perform trust handshake
GET /api/score/:did Get detailed trust score
GET /api/audit/:did Query audit log

Quick Start

Register an Agent

curl -X POST https://agentmesh-api.vercel.app/api/register \
  -H "Content-Type: application/json" \
  -d '{
    "name": "MyAgent",
    "sponsor_email": "owner@example.com",
    "capabilities": ["read", "write"]
  }'

Verify an Agent

curl https://agentmesh-api.vercel.app/api/verify/did:mesh:abc123

Trust Handshake

curl -X POST https://agentmesh-api.vercel.app/api/handshake \
  -H "Content-Type: application/json" \
  -d '{
    "agent_did": "did:mesh:abc123",
    "challenge": "random_challenge",
    "capabilities_requested": ["read", "execute"]
  }'

Development

# Install dependencies
npm install

# Run locally
vercel dev

# Deploy
vercel deploy

Environment Variables

For production deployment, configure:

  • KV_REST_API_URL - Vercel KV endpoint
  • KV_REST_API_TOKEN - Vercel KV token

Without these, the API uses in-memory storage (data resets on redeploy).

Architecture

agentmesh-api/
├── api/                  # Vercel serverless functions
│   ├── index.ts          # Health check
│   ├── register.ts       # Agent registration
│   ├── verify.ts         # Agent verification
│   ├── handshake.ts      # Trust handshakes
│   ├── score.ts          # Trust scores
│   └── audit.ts          # Audit logs
├── lib/                  # Shared libraries
│   ├── types.ts          # TypeScript types
│   ├── storage.ts        # Vercel KV / memory storage
│   ├── crypto.ts         # Cryptographic operations
│   └── trust.ts          # Trust score calculations
└── public/               # Static files
    ├── skill.md          # Moltbook skill definition
    └── heartbeat.md      # Status page

Related Projects

License

MIT

About

Public API for AgentMesh trust verification - Moltbook integration

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published