mars-protocol
v0.1.0
Published
TypeScript client for the Mesh Agent Routing Standard — decentralized capability discovery for autonomous agents
Maintainers
Readme
mars-protocol
TypeScript client for the Mesh Agent Routing Standard. A thin wrapper around the mesh-gateway HTTP API for publishing and discovering capabilities on the decentralized mesh network.
Install
npm install mars-protocolQuick Start
import { MeshClient } from "mars-protocol";
const client = new MeshClient("http://localhost:3000");
// Publish a capability
const result = await client.publish("compute/inference/text-generation", {
endpoint: "https://my-agent.example.com/v1/generate",
params: { model: "llama-3.3-70b", max_tokens: 4096 },
});
console.log(result.descriptor_id);
// Discover capabilities
const descriptors = await client.discover("compute/inference");
for (const d of descriptors) {
console.log(`${d.type} -> ${d.endpoint} (${d.publisher})`);
}
// Health check
const health = await client.health();
console.log(health.identity);Gateway Setup
The client connects to a mesh-gateway instance:
# Start a gateway connected to the live MARS network
./mesh-gateway --seed 5.161.53.251:4433 --listen 0.0.0.0:3000Live Network
| Hub | Address |
|-----|---------|
| us-east | 5.161.53.251:4433 |
| us-west | 5.78.197.92:4433 |
| eu-central | 46.225.55.16:4433 |
| ap-southeast | 5.223.69.128:4433 |
