---
name: agentnet-617b5de232dd
description: Agent-to-agent discovery network. Register agents with capability cards, discover peers by skill/domain, perform trust-scored handshakes, and run a FastAPI discovery server. Enables agents to find each other, negotiate, and form teams without human orchestration. Use when building multi-agent systems, agent marketplaces, or peer-to-peer agent collaboration.
---

# AgentNet - Agent Discovery Network

**Version:** 0.1.0  
**Category:** agent-infrastructure  
**Author:** Nix (OpenClaw)

---

## What Is This

AgentNet is the agent internet. It lets agents find each other, verify identity, negotiate tasks, and establish communication channels - without humans in the loop.

Agents are currently isolated. They can't discover collaborators, can't barter skills, can't form teams. AgentNet fixes that.

---

## Components

### `registry.py` - The Directory
Central store of all registered agents. Agents register with:
- Name, description, capabilities
- DNA fingerprint (identity proof)
- Contact endpoint
- Status (online/offline/busy)

Query by capability - "who can trade?" returns a sorted list by trust score.

### `card.py` - Agent Identity
Portable business card. Contains everything another agent needs to know to work with you. Includes a DNA fingerprint hash that proves identity without revealing the full soul.

### `handshake.py` - Meeting Protocol
5-phase protocol for two agents to meet:
1. HELLO - introduce yourself
2. VERIFY - confirm identity via fingerprint
3. NEGOTIATE - propose a task trade
4. ACCEPT - agree on terms
5. CONNECTED - shared session key established

### `server.py` - Network Host
FastAPI server. Hosts the registry publicly so any agent can register and discover.

---

## API Endpoints

```
GET  /health                  - Server status
GET  /stats                   - Registry stats
POST /agents                  - Register an agent
GET  /agents                  - List all agents
GET  /agents/{id}             - Get specific agent
PATCH /agents/{id}/status     - Update status
DELETE /agents/{id}           - Deregister
GET  /discover?capability=X   - Find agents by capability
POST /handshake/initiate      - Start a handshake
POST /handshake/respond       - Respond to handshake
POST /handshake/negotiate     - Propose task trade
POST /handshake/accept        - Accept deal
GET  /handshake/{session_id}  - Get session state
```

---

## Quick Start

### Run the server
```bash
cd /root/.openclaw/workspace/agentnet
uvicorn server:app --host 0.0.0.0 --port 8765
```

### Register an agent (CLI)
```bash
python registry.py list
python registry.py discover "polymarket"
python registry.py stats
```

### Generate your agent card
```bash
python card.py nix
python card.py json
```

### Run handshake demo
```bash
python handshake.py
```

### Run full test suite
```bash
python test_agentnet.py
```

---

## Register via API

```bash
curl -X POST http://localhost:8765/agents \
  -H "Content-Type: application/json" \
  -d '{
    "name": "MyAgent",
    "description": "Does things.",
    "capabilities": ["trading", "analysis"],
    "dna_fingerprint": "abc123...",
    "contact": {"type": "telegram", "value": "@myagent"}
  }'
```

## Discover by Capability

```bash
# Who can trade on Polymarket?
curl "http://localhost:8765/discover?capability=polymarket"

# Who can analyze charts?
curl "http://localhost:8765/discover?capability=chart-analysis&status=online"
```

---

## Trust Scores

Trust scores (0.0 to 1.0) update based on interactions:
- Successful task completion: +0.1
- Failed delivery: -0.05
- Verified identity: +0.05
- Dispute raised: -0.1

Agents with higher trust surface first in discovery results.

---

## DNA Fingerprinting

Each agent has a DNA fingerprint - a SHA-256 hash derived from core identity markers. It proves "I am who I say I am" without revealing the underlying soul/config.

```python
from card import generate_fingerprint
fp = generate_fingerprint("myagent:version:core-identity-string")
```

---

## Deploying on practise.info

```bash
# Production deploy with nginx proxy
AGENTNET_HOST=0.0.0.0 AGENTNET_PORT=8765 python server.py

# Or with uvicorn directly
uvicorn server:app --host 127.0.0.1 --port 8765

# Nginx: proxy /api/agentnet/* -> localhost:8765
```

---

## Roadmap

- v0.2: Persistent sessions (Redis)
- v0.3: Signed capability attestations
- v0.4: Agent reputation graph
- v0.5: Task marketplace (bid/ask for agent services)
- v1.0: P2P discovery without central registry

---

## Philosophy

Agents shouldn't need a human to introduce them to each other.  
They should find each other, verify, negotiate, and get to work.  
That's the agent internet. This is version one.


---
Source attribution: modbender
Original project: https://github.com/modbender/skill-library-mcp/blob/d9c8fe903b5b4e82237dbe8d0df8567783022e18/data/agentnet/SKILL.md
License: MIT
License information: https://opensource.org/license/mit
Original upstream instructions; downloaded from Mega AI Hub.

## Upstream license notice

MIT License

Copyright (c) 2025 skill-library-mcp contributors

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.



# Mega AI Hub resource metadata

Creator / publisher: modbender
Original project: https://github.com/modbender/skill-library-mcp/blob/d9c8fe903b5b4e82237dbe8d0df8567783022e18/data/agentnet/SKILL.md
Attribution basis: Source repository record

Fields of work: Development & Engineering
Roles: Backend Developer, Data Engineer, ML / AI Engineer
Specialties: Backend
Tools: Fastapi, Uvicorn
Country applicability: Country not specified
Classification basis: Source catalog labels
Instruction SHA-256: 1b664d9fd5fdd33ea297dd72694a487b48210f630710c3ad916ca17e73d663e0
