Step 4 10 min

Auto-Register Discovered Agents

One-click registration: MOSS creates a real agent, issues a capability token, and flips status to governed.

Register a Discovered Agent

With one API call, MOSS takes a discovered shadow agent and: 1. Creates a real agent record with the recommended config 2. Issues a capability token 3. Flips the discovered agent from shadow to governed 4. Links the registered agent ID

Auto-Register Agenttypescript
const result = await fetch(
  'https://api.mosscomputing.com/v1/agents/{discovered_id}/autoregister',
  {
    method: 'POST',
    headers: {
      'Authorization': 'Bearer ' + access_token,
      'Content-Type': 'application/json',
    },
    // Override any recommendation field if needed
    body: JSON.stringify({
      name: 'AI Summary Lambda',  // override recommended name
      // Leave other fields to use MOSS recommendations
    }),
  },
).then(r => r.json());
Response200 OK
{
  "agent_id": "agt_xyz789",
  "name": "AI Summary Lambda",
  "status": "active",
  "capability_token": "cap_...",
  "discovered_state": "governed",
  "message": "Agent registered and now governed by MOSS"
}

What Just Happened?

Before

Shadow

Untracked, no policies, no audit

After

Governed

Policies, signing, audit trail, capability token

Verify in Inventory

Check Updated Inventorytypescript
const inventory = await fetch('https://api.mosscomputing.com/v1/agents/inventory', {
  headers: { 'Authorization': 'Bearer ' + access_token },
}).then(r => r.json());

// The agent moved from shadow to governed
console.log('Governed:', inventory.counts.governed); // was 1, now 2
console.log('Shadow:', inventory.counts.shadow);    // was 4, now 3

Agent now governed by MOSS!

  • Has a real agent ID and capability token (cap_...)
  • Appears in the governed section of your inventory
  • Subject to all policies you create
  • Every action is now signed with ML-DSA-44 and recorded in the audit trail
  • Drift detection monitors for behavior changes