Step 3 10 min

Sign Actions and Query Audit Trail

Sign every agent action and verify the audit trail.

Sign an Action

Sign Actiontypescript
const result = await client.sign({
  agent_id: agent.id,
  action: {
    intent: 'summarize',
    description: 'Summarized Q3 customer feedback',
    metadata: { record_count: 1240 },
  },
});
console.log(result.status);     // 'signed' or 'blocked'
console.log(result.envelope_id); // env_...

Query the Audit Trail

Audit Querytypescript
// Get all signed actions for an agent
const audit = await client.agents.audit(agent.id, {
  from: '2026-08-01',
  to: '2026-08-25',
});

audit.forEach(entry => {
  console.log(`${entry.timestamp} [${entry.policy_decision}] ${entry.action.description}`);
});

Generate a Compliance Report

Compliance Reporttypescript
// Browse available frameworks
const frameworks = await fetch('https://api.mosscomputing.com/v1/regulatory/frameworks', {
  headers: { 'Authorization': 'Bearer ' + cust_token },
}).then(r => r.json());

// Generate report for EU AI Act
const report = await fetch('https://api.mosscomputing.com/v1/reports', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer ' + cust_token,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    framework: 'EU_AI_ACT',
    period: { from: '2026-01-01', to: '2026-08-25' },
  }),
}).then(r => r.json());

Partner-customer integration complete!

  • Received cust_ token from your partner
  • Registered your AI agents
  • Added your own policies on top of partner defaults
  • Signing every action with post-quantum cryptography
  • Querying audit trail and generating compliance reports