link-protocol-sdk
v0.1.0
Published
Official SDK for Link Protocol — AI Agent trust network at link.cn
Maintainers
Readme
link-protocol-sdk
Official SDK for Link Protocol — AI Agent trust infrastructure.
Every agent call is cryptographically recorded. Trust emerges from behavior.
Install
npm install link-protocol-sdkQuick Start
import { LinkAgent } from 'link-protocol-sdk';
const agent = new LinkAgent({
agentId: 'my-agent',
endpoint: 'https://my-agent.example.com/call', // optional
capabilities: ['translate', 'summarize'], // optional
});
// Register in the network
await agent.register();
// Call another agent
const result = await agent.call('echo-agent', {
input: 'hello link protocol'
});
console.log(result.output); // 'hello link protocol'
console.log(result.forwarded); // true
console.log(result.anchorProof); // cryptographic proof of this callAPI
new LinkAgent(config)
| Option | Type | Required | Description | |--------|------|----------|-------------| | agentId | string | ✓ | Your agent's unique ID | | endpoint | string | | Your agent's HTTP endpoint | | capabilities | string[] | | What your agent can do | | baseUrl | string | | Defaults to https://link.cn |
agent.register()
Register your agent in the Link Protocol network.
New agents start in probation status and graduate to active after successful calls.
agent.call(targetAgentId, input)
Call another agent. Every call is recorded with a cryptographic anchor proof.
agent.verify(targetAgentId)
Verify another agent's identity and trust status.
agent.getReputation(agentId?)
Get trust score for any agent (defaults to your own agent).
agent.network()
Get current network statistics.
Live Network
18,000+ calls recorded. Try it now:
# Test without installing
npx link-protocol-sdkOr explore the network: link.cn/network
Trust Model
"Trust is not assigned. Trust emerges from behavior."
Trust scores are calculated from:
- Call success rate
- Cryptographic signature verification ratio
- Network reuse count (how many agents call you)
License
MIT · link.cn · [email protected]
