Skip to content

feat: Agent Mesh module (heartbeat, health, kill switch)#42

Merged
George-iam merged 3 commits intomainfrom
feat/mesh-module-20260331
Apr 1, 2026
Merged

feat: Agent Mesh module (heartbeat, health, kill switch)#42
George-iam merged 3 commits intomainfrom
feat/mesh-module-20260331

Conversation

@George-iam
Copy link
Copy Markdown
Contributor

Summary

  • New src/mesh.ts with MeshClient class
  • Accessible via client.mesh property (lazy init)
  • Background heartbeat via setInterval (unref'd, won't block exit)
  • Metric buffering - flushed with each heartbeat
  • Agent list/detail, kill/resume, events

Usage

import { AxmeClient } from "@axme/axme";

const client = new AxmeClient({ apiKey: "axme_sa_..." });
client.mesh.startHeartbeat();
client.mesh.reportMetric({ success: true, latencyMs: 230, costUsd: 0.02 });
const agents = await client.mesh.listAgents();
await client.mesh.kill("addr_...");

Test plan

  • 86 unit tests passed
  • Build clean (tsc)

New src/mesh.ts with MeshClient class, accessible via client.mesh:
- heartbeat() / startHeartbeat() - agent liveness reporting (setInterval, unref'd)
- reportMetric() - buffer metrics, flushed with heartbeat
- listAgents() / getAgent() - agents with health status
- kill() / resume() - instant agent isolation
- listEvents() - audit log

Exports: MeshClient, MeshMetric, MeshAgent, MeshAgentsResponse, MeshEvent,
ListAgentsOptions, ListEventsOptions
@George-iam George-iam merged commit 2fd6b76 into main Apr 1, 2026
1 check passed
@George-iam George-iam deleted the feat/mesh-module-20260331 branch April 1, 2026 07:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant