Specification

Registration API

The localhost HTTP API for registering, discovering, and managing services.

Default endpoint: http://127.0.0.1:7700 (configurable in host profile)

Loopback only. Not exposed to the network.

Every endpoint below has an asmp CLI equivalent. See CLI reference.

Endpoints

MethodPathDescription
GET/healthRegistry summary (total, healthy, unhealthy)
GET/hostHost profile
GET/servicesList all services
GET/services/{name}Get service manifest + runtime health
POST/servicesRegister a new service
PATCH/services/{name}Update a manifest
DELETE/services/{name}Deregister a service
GET/capabilitiesList all capabilities or query by provides
POST/discover/scanScan source asmp.yaml files into host index
GET/discoveriesList discovery breadcrumbs (?pending=false for all)
POST/discoveriesDrop a discovery todo for an undocumented service
POST/reloadRe-read ~/.asmp/services/ from disk
POST/services/announceHandshake register (returns ack with generation)
POST/services/{name}/modsAttach a mod
DELETE/services/{name}/mods/{mod}Detach a mod

Examples

List all services

curl http://127.0.0.1:7700/services

Optional query params: ?section=tools

Get one service

curl http://127.0.0.1:7700/services/email-daemon

Response includes manifest + health state (healthy, latency, last check, error).

Query by capability

curl "http://127.0.0.1:7700/capabilities?provides=email.classify"

Returns all services providing that capability.

List all known capabilities:

curl http://127.0.0.1:7700/capabilities

Register a service

curl -X POST http://127.0.0.1:7700/services \
  -H "Content-Type: application/json" \
  -d '{
    "asmp": "0.1",
    "kind": "service",
    "name": "my-service",
    "description": "Does something useful",
    "version": "1.0.0",
    "created_by": "claude-code",
    "owner": "daniel",
    "capabilities": {
      "provides": ["demo.hello"]
    }
  }'

Scan source manifests

Walks configured discovery.scan_paths (see host profile) and syncs asmp.yaml / infra/asmp.yaml into ~/.asmp/services/:

curl -X POST http://127.0.0.1:7700/discover/scan
{
  "scanned": 12,
  "registered": 3,
  "updated": 9,
  "skipped": 1,
  "stale": 2
}

Announce handshake

Running software introduces itself from its shipped manifest:

curl -X POST http://127.0.0.1:7700/services/announce \
  -H "Content-Type: application/json" \
  -d @asmp.yaml
{
  "name": "my-service",
  "generation": 4,
  "status": "registered",
  "index_url": "http://127.0.0.1:7700/services/my-service"
}

Discovery breadcrumbs (self-healing)

When an agent finds real software with no manifest, it drops an append-only note — not a registration:

curl -X POST http://127.0.0.1:7700/discoveries \
  -H "Content-Type: application/json" \
  -d '{
    "name": "mystery-daemon",
    "note": "systemd unit on :9090, handles PDF parsing",
    "repo": "~/repos-aic/mystery",
    "hint": "Add asmp.yaml and run asmp announce",
    "found_by": "cursor-agent"
  }'

List pending notes (excludes names already in the registry):

curl http://127.0.0.1:7700/discoveries

Stored in ~/.asmp/discoveries.jsonl. Promote by authoring a manifest and scanning or announcing.

Reload index

curl -X POST http://127.0.0.1:7700/reload

Registry health

curl http://127.0.0.1:7700/health
{
  "host": "daniels-macbook-2026",
  "total": 46,
  "healthy": 41,
  "unhealthy": 3,
  "unchecked": 2,
  "sections": {
    "tools": { "total": 12, "healthy": 11 },
    "reeves": { "total": 28, "healthy": 26 }
  }
}

Validation on registration

The host checks:

  1. Schema valid?
  2. Port available?
  3. Policy allows it? (agent_can_register, allowed_ports)
  4. Data sensitivity acceptable?
  5. If requires_approval: queue for human review

On approval, the host provisions (plist generation, proxy routes, log directories) and starts the service.