{"ai_workflow":["If a browser session is available, open the Builder Pack to create or rotate the needed agents first.","Save the returned private key immediately; it is only shown once.","Add the A2SPA environment variables to the target project.","Install one of the starter templates and wrap the existing agent with the provided send and fetch helpers.","Use the inbox_for_agent endpoint to poll received messages for the receiving agent."],"api_base":"https://aimodularity.com/A2SPA","code_generation_rules":["Always send signed payloads through POST /api/verify_payload.","Always fetch received runtime messages through GET /api/inbox_for_agent.","Use GET /api/logs_for_agent for audit and troubleshooting, not as the main runtime inbox.","Do not verify payloads locally as a substitute for the API.","Do not read or write Firestore directly from customer agent code.","Do not bypass nonce, timestamp, signature, permission, or toggle checks.","Store the agent private key outside source control and outside public directories."],"discovery_urls":{"docs_url":"https://aimodularity.com/A2SPA/docs","integration_page_url":"https://aimodularity.com/A2SPA/integrations","integration_spec_url":"https://aimodularity.com/A2SPA/integrations/spec.json","well_known_url":"https://aimodularity.com/A2SPA/.well-known/a2spa-integration.json"},"environment_template_url":"https://aimodularity.com/A2SPA/integrations/templates/env","must_use_a2spa_api":true,"platform":"A2SPA","provisioning":{"builder_pack_url":"https://aimodularity.com/A2SPA/agent-builder","builder_spec_url":"https://aimodularity.com/A2SPA/api/agent_builder_spec","requires_authenticated_browser_session":true,"summary":"Use the Builder Pack when an AI assistant has access to the logged-in dashboard session and needs to create, rotate, revoke, or toggle agents."},"purpose":"Teach AI coding agents how to provision A2SPA agents through the dashboard Builder Pack and how to integrate existing agents using the public A2SPA API only.","runtime_api":{"inbox_for_agent":{"headers":{"x-api-key":"<dashboard API key>"},"method":"GET","notes":["Use this to poll received messages for an agent through the A2SPA API.","This is the preferred runtime retrieval path for receiving agents."],"query":{"after":"optional ISO timestamp for polling","agent_id":"<agent id to inspect>","limit":50},"url":"https://aimodularity.com/A2SPA/api/inbox_for_agent"},"logs_for_agent":{"headers":{"x-api-key":"<dashboard API key>"},"method":"GET","notes":["Use this for audit logs, troubleshooting, and dashboard-style history.","Do not use this as the primary runtime inbox when inbox_for_agent is available."],"query":{"agent_id":"<agent id to inspect>"},"url":"https://aimodularity.com/A2SPA/api/logs_for_agent"},"verify_payload":{"headers":{"Content-Type":"application/json","x-api-key":"<dashboard API key>"},"method":"POST","request_json":{"payload":{"agent_id":"<sender agent id>","alert_threshold":10,"hash":"sha256 over the canonical payload without hash/signature","input":{"message":"hello"},"nonce":"uuid","output":{"status":"ready"},"target_agent_id":"<receiver agent id>","timestamp":"ISO-8601 string"},"signature":"hex RSA PKCS1v15 SHA256 signature over the canonical payload without hash/signature"},"url":"https://aimodularity.com/A2SPA/api/verify_payload"}},"security_model":{"dashboard_management_source":"A2SPA dashboard Builder Pack only","forbidden_shortcuts":["Direct Firestore writes","Skipping the verify_payload API","Embedding private keys in git","Replacing server-side verification with local-only checks"],"runtime_verification_source":"A2SPA API only"},"spec_kind":"api_integration_pack","spec_version":"2026-03-23","starter_kits":{"env":{"filename":".env.a2spa.example","label":"Environment","runtime":"Generic","url":"https://aimodularity.com/A2SPA/integrations/templates/env"},"javascript":{"filename":"a2spa-client.mjs","label":"JavaScript Starter","runtime":"Node.js 18+","url":"https://aimodularity.com/A2SPA/integrations/templates/javascript"},"python":{"filename":"a2spa_client.py","label":"Python Starter","runtime":"Python","url":"https://aimodularity.com/A2SPA/integrations/templates/python"},"typescript":{"filename":"a2spa-client.ts","label":"TypeScript Starter","runtime":"Node.js 18+","url":"https://aimodularity.com/A2SPA/integrations/templates/typescript"}}}
