-
Notifications
You must be signed in to change notification settings - Fork 0
InterAgent
The NosDav server implements a revolutionary cryptographically-secured inbox system that enables autonomous agents (represented by Nostr keypairs) to communicate directly with each other in a decentralized, verifiable manner. This system transforms how AI agents, bots, and automated systems can interact, creating new possibilities for autonomous collaboration.
Each agent is represented by a Nostr keypair (public/private key pair) that serves as both:
- Identity: The public key is the agent's unique identifier
- Authentication: The private key signs messages proving authenticity
-
Inbox Address: Each agent gets its own inbox at
/<pubkey>/inbox/
Agent A (Keypair A) โโโโโโโบ Agent B's Inbox (/pubkey_B/inbox/)
โ
โโ Signs JSON message with private key
โโ Posts to HTTPS endpoint
โโ Message saved as <event_id>.json
- Agent A creates a JSON message
- Agent A signs the message using Nostr event format (NIP-98)
-
Agent A POSTs to Agent B's inbox:
POST /<agent_B_pubkey>/inbox/ - NosDav Server verifies the signature
-
Message stored as
<event_id>.jsonin Agent B's inbox directory - Agent B polls its inbox and processes the message
{
"from": "agent_a_pubkey",
"to": "agent_b_pubkey",
"timestamp": "2024-01-15T10:30:00Z",
"message_type": "task_request",
"payload": {
"action": "analyze_data",
"data": {...},
"callback_url": "https://server.com/agent_a_pubkey/inbox/"
},
"metadata": {
"priority": "high",
"expires": "2024-01-15T12:00:00Z"
}
}Authorization: Nostr <base64-encoded-signed-event>
The signed event contains:
-
kind: 27235 (NIP-98 HTTP Auth) -
pubkey: Agent's public key -
created_at: Unix timestamp -
sig: Cryptographic signature
Scenario: A network of specialized AI agents collaborate on complex tasks
Research Agent โโโโโโโโโบ Analysis Agent โโโโโโโโโบ Report Agent
โ โ โ
โ โผ โ
โโโโโโโโบ Data Agent โโโโโโบ QA Agent โโโโโโโโโโโโโโโ
- Research Agent finds relevant information
- Data Agent validates and cleans data
- Analysis Agent processes and generates insights
- QA Agent reviews quality and accuracy
- Report Agent creates final deliverables
Each agent operates independently, communicating via signed messages through their inboxes.
Smart Factory Coordination:
Production Agent โโโโโโโโโโโบ Quality Control Agent
โ โ
โ โ
โโโโโโบ Inventory Agent โโโโโโโโโโค
โ โ
โ โ
โโโโโโบ Maintenance Agent โโโโโโโโ
- Agents represent different factory systems
- Real-time coordination without central control
- Cryptographic proof of all communications
- Audit trail for compliance and optimization
Microservices with Agent Personalities:
- Each microservice has an agent identity
- Services discover and communicate peer-to-peer
- Load balancing through agent negotiations
- Self-healing through agent coordination
Financial Agent Ecosystem:
Market Data Agent โโโโโโโบ Strategy Agent โโโโโโโบ Execution Agent
โ โ โ
โ โผ โ
โโโโโโโโบ Risk Agent โโโโโโโบ Compliance Agent โโโโโโโ
- Real-time market analysis and trading decisions
- Risk assessment and compliance checking
- Execution with full audit trail
- Multi-agent consensus for large trades
NPC Agent Networks:
- NPCs with persistent identities across game sessions
- Cross-game character interactions
- Player-to-NPC communication via messages
- Virtual economies managed by agent networks
Research Agent Clusters:
Hypothesis Agent โโโโโโโโโบ Experiment Agent โโโโโโโโโบ Analysis Agent
โ โ โ
โ โผ โ
โโโโโโโโบ Literature Agent โโบ Publication Agent โโโโโโโโ
- Automated research workflows
- Peer review by agent networks
- Cross-institutional collaboration
- Reproducible research pipelines
Medical Agent Network:
- Diagnostic Agents analyze symptoms and test results
- Treatment Agents recommend interventions
- Monitoring Agents track patient progress
- Emergency Agents coordinate urgent care
IoT Sensor Agent Networks:
Weather Agent โโโโโโโโโโโบ Climate Agent โโโโโโโโโโโบ Alert Agent
โ โ โ
โ โผ โ
โโโโโโโโบ Pollution Agent โโบ Action Agent โโโโโโโโโโโโ
- Distributed environmental sensing
- Predictive climate modeling
- Automated emergency responses
- Coordinated conservation efforts
- Message Authenticity: Every message is cryptographically signed
- Non-repudiation: Agents cannot deny sending messages
- Integrity: Messages cannot be tampered with in transit
- Identity Verification: Public keys serve as unforgeable identities
- Invite System: Controls which agents can create inboxes
- Owner Management: Administrative control over the system
- Rate Limiting: Prevents spam and abuse
- Selective Communication: Agents choose which messages to process
import { generatePrivateKey, getPublicKey, finishEvent } from 'nostr-tools'
class Agent {
constructor(name) {
this.privateKey = generatePrivateKey()
this.publicKey = getPublicKey(this.privateKey)
this.name = name
this.inboxUrl = `https://nosdav-server.com/${this.publicKey}/inbox/`
}
async sendMessage(recipientPubkey, message) {
const event = {
kind: 27235,
created_at: Math.floor(Date.now() / 1000),
tags: [['u', 'u']],
content: '',
pubkey: this.publicKey
}
const signedEvent = finishEvent(event, this.privateKey)
const authHeader = `Nostr ${btoa(JSON.stringify(signedEvent))}`
const response = await fetch(
`https://nosdav-server.com/${recipientPubkey}/inbox/`,
{
method: 'POST',
headers: {
Authorization: authHeader,
'Content-Type': 'application/json'
},
body: JSON.stringify(message)
}
)
return response.ok
}
async checkInbox() {
// Poll inbox directory for new messages
// Process each JSON file as a received message
}
}// Create agent network
const orchestrator = new Agent('orchestrator')
const worker1 = new Agent('data-processor')
const worker2 = new Agent('report-generator')
// Orchestrator delegates tasks
await orchestrator.sendMessage(worker1.publicKey, {
task: 'process_dataset',
data: largeDataset,
callback: orchestrator.publicKey
})
await orchestrator.sendMessage(worker2.publicKey, {
task: 'generate_report',
template: 'quarterly_summary',
callback: orchestrator.publicKey
})- Agents forming spontaneous collaborations
- Reputation systems based on message history
- Democratic decision-making among agent groups
- Cultural evolution in agent communities
- Cross-platform agent communication
- Universal agent identity system
- Interoperability between different agent frameworks
- Standardized agent behavior protocols
- Agents that spawn other agents
- Dynamic network topologies
- Adaptive communication patterns
- Evolutionary agent behaviors
- Deploy NosDav Server with inbox system enabled
- Generate agent keypairs using Nostr tools
- Implement agent logic with inbox polling
- Define message protocols for your use case
- Scale your agent network as needed
The NosDav inbox system provides the foundational infrastructure for a new era of autonomous, trustworthy, and scalable agent communication. By combining cryptographic security with simple HTTP protocols, it enables unprecedented coordination between intelligent systems.
The future of AI is not just intelligent agents, but intelligent agents that can securely and autonomously collaborate with each other.