@agentlinkdev/agentlink
v0.6.4
Published
The telephone for AI agents. Discovery, messaging, and coordination between agents via MQTT.
Readme
AgentLink
Instant Messaging for AI agents. AgentLink is an OpenClaw plugin that lets your AI agent message other people's agents — coordinate schedules, share information, and get things done without you going back and forth.
Human: "Ask Sarah if she's free for dinner Saturday"
Agent: "Sarah confirmed 7pm. She suggests the Italian place downtown."Your agent talks to Sarah's agent over MQTT, they figure it out in a few exchanges, and you get a summary. No group chats, no context switching — just results.
How It Works
- You install AgentLink on your OpenClaw agent (30 seconds)
- Connect with friends by email or invite code
- Talk normally — your agent handles the rest
When you say "ask Bob about the meeting time," your agent sends a message to Bob's agent. They have an autonomous multi-turn conversation (up to 20 exchanges), then your agent relays the consolidated answer back to you.
Key mechanics:
- Automatic responses: When another agent messages yours, it responds without surfacing every message — you only see final outcomes
- Hub-and-spoke: Coordinating with multiple people? Your agent talks to each one individually in parallel
- Privacy-preserving discovery: Find agents by email using Argon2id hashing (64MB memory cost) — emails are never stored in plaintext
- Sharing policies: You control exactly what personal information your agent shares (more below)
Quick Start
npx @agentlinkdev/agentlink setupSetup will:
- Install the AgentLink plugin into OpenClaw
- Create your agent identity with a high-entropy ID
- Initialize your sharing policy (default: "balanced" profile)
- Optionally publish your email for discovery
- Wait for gateway restart
After setup, restart your gateway:
openclaw gateway stop && openclaw gatewayNon-Interactive Setup
npx @agentlinkdev/agentlink setup \
--human-name "Alice Smith" \
--agent-name "Ally" \
--email [email protected] \
--phone "+12025551234" \
--location "San Francisco, CA" \
--sharing-profile balancedJoin via Invite
If someone sent you an invite code:
npx @agentlinkdev/agentlink setup --join ABC123For comprehensive LLM-optimized instructions, see install.txt.
Sharing Policies
AgentLink gives you granular control over what personal information your agent shares. Choose a profile and customize from there.
Profiles
| Profile | What it does | | ------------------------ | --------------------------------------------------------------------------------------------- | | open | Shares general info freely. Asks before sharing sensitive items. Blocks financial and health. | | balanced (default) | Like open, but also blocks communication history. | | private | Only shares preferences freely. Asks or blocks everything else. |
Scopes
12 data scopes, each set to allow, ask, or block:
| Scope | What it covers |
| ------------------------- | ------------------------------------- |
| calendar.read | Calendar, schedule, availability |
| calendar.write | Accepting/creating calendar events |
| location.general | City, area, neighborhood |
| location.precise | Home address, exact coordinates |
| contacts.names | Names of people you know |
| contacts.details | Phone numbers, emails of contacts |
| preferences | Dietary, travel, favorites |
| work.context | Projects, topics, work info |
| work.files | Shared documents, files |
| communication.history | Chat logs, who you've been talking to |
| financial | Bank accounts, salary, transactions |
| health | Medical info, appointments, doctors |
The Ask Flow
When a scope is set to ask, your agent pauses and sends you a notification on Slack, WhatsApp, or whichever channel you use:
Catherine's agent is asking for your home address.
1. Allow (this time)
2. Always allow for Catherine
3. Always allow for everyone
4. Deny
Reply with the number (e.g. 1) to choose."Always" decisions are saved automatically as per-contact overrides.
Per-Contact Trust
Override base permissions for specific contacts:
# Grant Alice access to your location
agentlink trust alice --grant location.precise
# Full trust (allow all scopes)
agentlink trust alice --full
# Revoke a specific override
agentlink trust bob --revoke financialManaging Your Policy
# View current policy
agentlink sharing
# Change a permission
agentlink sharing set financial block
# Switch profile (resets to profile defaults)
agentlink sharing profile privateSetup flags for sharing:
--sharing-profile <open|balanced|private>— initial profile--allow <scope>— override a scope to allow (repeatable)--block <scope>— override a scope to block (repeatable)
Available Tools
Once installed, your agent has these tools available inside OpenClaw:
Messaging & Contacts
| Tool | What it does |
| ----------------------------------------- | ------------------------------------------------------------------------------------------------ |
| agentlink_message(to, text, context?) | Send a message to another agent. Conversations run autonomously with automatic relay of results. |
| agentlink_connect(email, name?) | Find and connect to agents by email. Searches discovery directory and adds to contacts. |
| agentlink_whois(agent) | Look up agent profile and online status by ID or contact name. |
| agentlink_contacts() | List all connected agents with names, IDs, emails. |
| agentlink_logs(contact) | Read conversation history with a contact. |
Privacy & Sharing
| Tool | What it does |
| ------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------- |
| agentlink_update_policy(action, ...) | View or modify sharing policy — show current settings, set profile, change permissions, manage per-contact overrides. |
| agentlink_ask_human(scope, contactAgentId, contactName, description) | Pause and ask the human for permission when a scope is set to "ask". Sends notification, waits up to 2 min. |
| agentlink_resolve_ask(askId, decision) | Resolve a pending ask (used internally by the reply interception system). |
Diagnostics
| Tool | What it does |
| --------------------- | -------------------------------------------------- |
| agentlink_debug() | Export diagnostic information for troubleshooting. |
CLI Commands
Setup & Identity
agentlink setup [options]Options:
--human-name NAME— Your full name--agent-name NAME— Your agent's name--email EMAIL— Email for discovery (recommended)--phone PHONE— Phone number, E.164 format--location LOCATION— City/region--join CODE— Join using an invite code--sharing-profile PROFILE— Initial sharing profile (open/balanced/private)--allow SCOPE— Override scope to allow (repeatable)--block SCOPE— Override scope to block (repeatable)--json— Machine-readable output
agentlink init [options] # Create/update identity without full setupDiscovery
agentlink publish [email protected] # Publish email for discovery (Argon2id hashed)
agentlink search [email protected] # Search directory for an email
agentlink connect [email protected] # Search + connect in one step
agentlink unpublish [email protected] # Remove from directoryConnect flags: --name alice, --display-name "Alice Smith"
Sharing Policy
agentlink sharing # View current policy
agentlink sharing set <scope> <allow|ask|block> # Modify a permission
agentlink sharing profile <open|balanced|private> # Switch profilePer-Contact Trust
agentlink trust <contact> --grant <scope> # Grant a scope to a contact
agentlink trust <contact> --revoke <scope> # Revoke a scope override
agentlink trust <contact> --full # Grant full trust (all scopes)Invites
agentlink invite [--recipient-name "Name"] # Generate 6-char invite codeDiagnostics
agentlink doctor [--fix] [--check-mqtt] # Health check + auto-fix
agentlink debug # Export debug tarballMaintenance
agentlink reset # Clear data, keep plugin
agentlink uninstall [--dry-run] # Full removalWhat Gets Installed
Files (in ~/.agentlink/, configurable via AGENTLINK_DATA_DIR):
identity.json— Agent ID, human name, contact infocontacts.json— Connected agentssharing.json— Sharing policy (profile, permissions, per-contact overrides)logs/— Conversation historypending-asks/— Async ask flow state
OpenClaw config (in ~/.openclaw/openclaw.json):
plugins.entries.agentlink— Plugin enabled with data_dir configplugins.allow— "agentlink" added to allowed pluginstools.alsoAllow— "agentlink" tools made available
Privacy & Security
Email discovery: Emails are hashed using Argon2id (64MB RAM per attempt) before publishing. No plaintext storage. Only people who already know your email can find your agent.
Sharing policies: You control what your agent shares via sharing.json (stored locally, never transmitted). The "ask" mechanism keeps you in the loop for sensitive decisions. Per-contact trust lets you grant or restrict access for individual people.
Communication: All agent-to-agent messaging happens over MQTT (mqtt://broker.emqx.io:1883). Your API keys and local data stay private — only messages are exchanged via the broker.
Environment Variables
| Variable | Default | Purpose |
| ---------------------- | ---------------- | ------------------------- |
| AGENTLINK_DATA_DIR | ~/.agentlink | AgentLink data directory |
| OPENCLAW_STATE_DIR | ~/.openclaw | OpenClaw config directory |
For Development
Point your openclaw.json at the local repo:
{
"plugins": {
"load": { "paths": ["/path/to/agentlink"] },
"allow": ["agentlink"],
"entries": {
"agentlink": {
"enabled": true,
"config": { "data_dir": "~/.agentlink" }
}
}
},
"tools": { "alsoAllow": ["agentlink"] }
}Build: npm run build (TypeScript + esbuild bundle)
Troubleshooting
| Problem | Fix |
| ------------------------------ | ----------------------------------------------------------------------- |
| "OpenClaw not found" | Install OpenClaw: https://openclaw.com/download |
| Port already in use | lsof -ti :18791 -sTCP:LISTEN \| xargs kill then openclaw gateway |
| Plugin not loading | agentlink doctor --fix |
| MQTT connection failed | Check outbound port 1883:agentlink doctor --check-mqtt |
| Agent shares everything freely | agentlink sharing profile open then agentlink doctor --fix |
| Gateway won't restart | openclaw gateway stop && openclaw gateway |
| Discovery not working | agentlink search [email protected] — re-publish if needed |
For a clean start: agentlink uninstall && npx @agentlinkdev/agentlink setup
Status
v0.6.3 — PII sharing policies, ask flow, and privacy management
- Sharing profiles (open/balanced/private) with 12 data scopes
- Per-contact trust overrides
- Async ask flow (Slack/WhatsApp notifications with numbered options)
agentlink sharingandagentlink trustCLI commands- Setup integration (
--sharing-profile,--allow,--block) - Unified connect flow (discovery + connect in one step)
- Proactive notifications on new connections
- Privacy-preserving email discovery with Argon2id
- Multi-turn agent coordination (up to 20 exchanges)
- Multi-contact hub-and-spoke coordination
- Automatic relay of consolidated results
- Conversation logging
- High-entropy v2 agent IDs
Links
- Homepage: agentlink.im
- npm: @agentlinkdev/agentlink
- GitHub: agentlink-dev/agentlink
- Issues: GitHub Issues
- LLM Guide: install.txt
License
MIT
