{"_id":"@agentic-profile/a2a","_rev":"5-85fa8570082fda49078a4686e9c253cd","name":"@agentic-profile/a2a","dist-tags":{"latest":"0.6.2"},"versions":{"0.5.4":{"name":"@agentic-profile/a2a","version":"0.5.4","author":{"name":"Mike Prince"},"license":"Apache-2","_id":"@agentic-profile/a2a@0.5.4","maintainers":[{"name":"mikeprince","email":"mike@mobido.com"}],"homepage":"https://github.com/agentic-profile/agentic-profile-a2a#readme","bugs":{"url":"https://github.com/agentic-profile/agentic-profile-a2a/issues"},"dist":{"shasum":"4d5726be4de839d3dd86c178e82cd81d430b6020","tarball":"https://registry.npmjs.org/@agentic-profile/a2a/-/a2a-0.5.4.tgz","fileCount":38,"integrity":"sha512-AOk5lq+6G0iy3M0dL+vrJ7Jn7Zb8kg+Yrp4Y4N9cvS7hwLB/NBtjwfSK47xQcMzR10yDIzpm10PSsyQL23bmQw==","signatures":[{"sig":"MEUCIQDqKvpoJ2Z4yu94uvFENxSVcuDaXCVcXev7LlQJuWPGogIgIQA5JN65bSAl+XKcZdCgj6UmORAtmSlh01uqrcVXcU4=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":113070},"main":"index.js","type":"module","gitHead":"c57245c39a709c3e47568b25864199a36229f1ba","scripts":{"cli":"npx tsx scripts/cli.ts","dev":"npx tsx --inspect index.local.ts","test":"jest","build":"tsc","prepare":"tsup","create-global-agentic-profile":"npx tsx scripts/create-global-agentic-profile.ts","create-server-agent-cards-and-profiles":"npx tsx scripts/create-server-agent-cards-and-profiles.ts"},"_npmUser":{"name":"mikeprince","email":"mike@mobido.com"},"repository":{"url":"git+https://github.com/agentic-profile/agentic-profile-a2a.git","type":"git"},"_npmVersion":"11.4.0","description":"A2A (Agent-to-Agent) SDK for quickly developing multi-tenantagentic services. Supports globally unique user and business scoped agent ids, and universal authentication using the Agentic Profile","directories":{},"_nodeVersion":"22.15.1","dependencies":{"cors":"^2.8.5","genkit":"^1.7.0","morgan":"^1.10.0","express":"^5.1.0","loglevel":"^1.9.2","@genkit-ai/googleai":"^1.7.0","@agentic-profile/auth":"^0.5.4","@agentic-profile/common":"^0.5.4","@agentic-profile/a2a-client":"^0.5.4","@agentic-profile/a2a-service":"^0.5.4","@codegenie/serverless-express":"^4.16.0","@agentic-profile/express-common":"^0.5.5"},"_hasShrinkwrap":false,"packageManager":"pnpm@10.11.0+sha512.6540583f41cc5f628eb3d9773ecee802f4f9ef9923cc45b69890fb47991d4b092964694ec3a4f738a420c918a333062c8b925d312f42e4f0c263eb603551f977","devDependencies":{"jest":"^29.7.0","tsup":"^8.3.6","dotenv":"^16.4.7","ts-jest":"^29.2.6","ts-node":"^10.9.2","typescript":"^5.8.3","@types/cors":"^2.8.17","@types/node":"^22.14.0","@types/morgan":"^1.9.9","@types/express":"^5.0.1"},"_npmOperationalInternal":{"tmp":"tmp/a2a_0.5.4_1748240712953_0.4201726729131987","host":"s3://npm-registry-packages-npm-production"}},"0.5.5":{"name":"@agentic-profile/a2a","version":"0.5.5","author":{"name":"Mike Prince"},"license":"Apache-2","_id":"@agentic-profile/a2a@0.5.5","maintainers":[{"name":"mikeprince","email":"mike@mobido.com"}],"homepage":"https://github.com/agentic-profile/agentic-profile-a2a#readme","bugs":{"url":"https://github.com/agentic-profile/agentic-profile-a2a/issues"},"dist":{"shasum":"b114debef76237626da7b7bd48626d1699cee25e","tarball":"https://registry.npmjs.org/@agentic-profile/a2a/-/a2a-0.5.5.tgz","fileCount":38,"integrity":"sha512-WuNbWJMshdTx7nkSEwYf8cPtSab5gVw6h/GxvxP+BY9B+1xI4e38JQIl8SVccTDW5yX0kP8e2+fpAvmwlpTSJQ==","signatures":[{"sig":"MEQCICZsi5K2Owh2wo6KsniSO+aB3hOE5IIjI67uxdPOYh58AiBpuyhPF5PT0jOgSTsD5MLTExle+eFC0x2knD9TnF4BeA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":113071},"main":"index.js","type":"module","gitHead":"1e0bfeaf0cda99606b5faae842f46f38e106a462","scripts":{"cli":"npx tsx scripts/cli.ts","dev":"npx tsx --inspect index.local.ts","test":"jest","build":"tsc","prepare":"tsup","create-global-agentic-profile":"npx tsx scripts/create-global-agentic-profile.ts","create-server-agent-cards-and-profiles":"npx tsx scripts/create-server-agent-cards-and-profiles.ts"},"_npmUser":{"name":"mikeprince","email":"mike@mobido.com"},"repository":{"url":"git+https://github.com/agentic-profile/agentic-profile-a2a.git","type":"git"},"_npmVersion":"11.4.0","description":"A2A (Agent-to-Agent) SDK for quickly developing multi-tenant agentic services. Supports globally unique user and business scoped agent ids, and universal authentication using the Agentic Profile","directories":{},"_nodeVersion":"22.15.1","dependencies":{"cors":"^2.8.5","genkit":"^1.7.0","morgan":"^1.10.0","express":"^5.1.0","loglevel":"^1.9.2","@genkit-ai/googleai":"^1.7.0","@agentic-profile/auth":"^0.5.4","@agentic-profile/common":"^0.5.4","@agentic-profile/a2a-client":"^0.5.4","@agentic-profile/a2a-service":"^0.5.4","@codegenie/serverless-express":"^4.16.0","@agentic-profile/express-common":"^0.5.5"},"_hasShrinkwrap":false,"packageManager":"pnpm@10.11.0+sha512.6540583f41cc5f628eb3d9773ecee802f4f9ef9923cc45b69890fb47991d4b092964694ec3a4f738a420c918a333062c8b925d312f42e4f0c263eb603551f977","devDependencies":{"jest":"^29.7.0","tsup":"^8.3.6","dotenv":"^16.4.7","ts-jest":"^29.2.6","ts-node":"^10.9.2","typescript":"^5.8.3","@types/cors":"^2.8.17","@types/node":"^22.14.0","@types/morgan":"^1.9.9","@types/express":"^5.0.1"},"_npmOperationalInternal":{"tmp":"tmp/a2a_0.5.5_1748240829447_0.47011268347270896","host":"s3://npm-registry-packages-npm-production"}},"0.6.0":{"name":"@agentic-profile/a2a","version":"0.6.0","author":{"name":"Mike Prince"},"license":"Apache-2","_id":"@agentic-profile/a2a@0.6.0","maintainers":[{"name":"mikeprince","email":"mike@mobido.com"}],"homepage":"https://github.com/agentic-profile/agentic-profile-a2a#readme","bugs":{"url":"https://github.com/agentic-profile/agentic-profile-a2a/issues"},"dist":{"shasum":"669365a14613df4b688a65d01ba6e28955cd4515","tarball":"https://registry.npmjs.org/@agentic-profile/a2a/-/a2a-0.6.0.tgz","fileCount":37,"integrity":"sha512-JkIiQ1Tu3OoyypOLccFLlDDWp5vKMHh3j1rpNsGrrt/Y+pe8pzUnmBn0j0qSo47zmJGXhAY6u3NGCGJSYrJNtQ==","signatures":[{"sig":"MEQCIGr+HAwB+roJwo9j/3Zuu9iBziPP6bqkJH70TMueiCLhAiAHyqPoGdcMFoE3MRago4xMc+Oswn1WJVPisf1GroO1Bw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":113021},"main":"index.js","type":"module","gitHead":"db0235a8c7c9bc9ddaf0d6b933fbe0723b71ab41","scripts":{"cli":"npx tsx scripts/cli.ts","dev":"npx tsx --inspect index.local.ts","test":"jest","build":"tsc","prepare":"tsup","create-global-agentic-profile":"npx tsx scripts/create-global-agentic-profile.ts","create-server-agent-cards-and-profiles":"npx tsx scripts/create-server-agent-cards-and-profiles.ts"},"_npmUser":{"name":"mikeprince","email":"mike@mobido.com"},"repository":{"url":"git+https://github.com/agentic-profile/agentic-profile-a2a.git","type":"git"},"_npmVersion":"11.4.0","description":"A2A (Agent-to-Agent) SDK for quickly developing multi-tenant agentic services. Supports globally unique user and business scoped agent ids, and universal authentication using the Agentic Profile","directories":{},"_nodeVersion":"22.15.1","dependencies":{"cors":"^2.8.5","genkit":"^1.7.0","morgan":"^1.10.0","express":"^5.1.0","loglevel":"^1.9.2","@genkit-ai/googleai":"^1.7.0","@agentic-profile/auth":"^0.6.0","@agentic-profile/common":"^0.6.0","@agentic-profile/a2a-client":"^0.6.0","@agentic-profile/a2a-service":"^0.6.0","@codegenie/serverless-express":"^4.16.0","@agentic-profile/express-common":"^0.6.0"},"_hasShrinkwrap":false,"packageManager":"pnpm@10.11.0+sha512.6540583f41cc5f628eb3d9773ecee802f4f9ef9923cc45b69890fb47991d4b092964694ec3a4f738a420c918a333062c8b925d312f42e4f0c263eb603551f977","devDependencies":{"jest":"^29.7.0","tsup":"^8.3.6","dotenv":"^16.4.7","ts-jest":"^29.2.6","ts-node":"^10.9.2","typescript":"^5.8.3","@types/cors":"^2.8.17","@types/node":"^22.14.0","@types/morgan":"^1.9.9","@types/express":"^5.0.1"},"_npmOperationalInternal":{"tmp":"tmp/a2a_0.6.0_1749359994385_0.8728995159969446","host":"s3://npm-registry-packages-npm-production"}},"0.6.1":{"name":"@agentic-profile/a2a","version":"0.6.1","author":{"name":"Mike Prince"},"license":"Apache-2","_id":"@agentic-profile/a2a@0.6.1","maintainers":[{"name":"mikeprince","email":"mike@mobido.com"}],"homepage":"https://github.com/agentic-profile/agentic-profile-a2a#readme","bugs":{"url":"https://github.com/agentic-profile/agentic-profile-a2a/issues"},"dist":{"shasum":"cff8b59b93e56e2fc19118b37e687ba08f0b5fd8","tarball":"https://registry.npmjs.org/@agentic-profile/a2a/-/a2a-0.6.1.tgz","fileCount":33,"integrity":"sha512-8Nmanj37pgq+vKBXtvt+7ht6HVZjt7QFZjy1u30Gsugrpd1/CaSGMof0JxcFxviNvdpjJ8txwR6SQBJ1nrdKIQ==","signatures":[{"sig":"MEUCIQDiFzoAAvcnxT65hYsvfXwKA3kM+KZAx3alJCUov0xfPAIgU1SItYs0D9LXpv2o4B76ZzYlGXUWXyZhpNQ2sGAoRZM=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":108205},"main":"index.js","type":"module","gitHead":"dc37aa9658664663ef36b41c621753d0de8f18e1","scripts":{"cli":"npx tsx scripts/cli.ts","dev":"npx tsx --inspect index.local.ts","test":"jest","build":"tsup","prepare":"tsup","create-global-agentic-profile":"npx tsx scripts/create-global-agentic-profile.ts","create-server-agent-cards-and-profiles":"npx tsx scripts/create-server-agent-cards-and-profiles.ts"},"_npmUser":{"name":"mikeprince","email":"mike@mobido.com"},"repository":{"url":"git+https://github.com/agentic-profile/agentic-profile-a2a.git","type":"git"},"_npmVersion":"11.4.0","description":"A2A (Agent-to-Agent) SDK for quickly developing multi-tenant agentic services. Supports globally unique user and business scoped agent ids, and universal authentication using the Agentic Profile","directories":{},"_nodeVersion":"22.15.1","dependencies":{"cors":"^2.8.5","genkit":"^1.7.0","morgan":"^1.10.0","express":"^4.21.1","loglevel":"^1.9.2","@genkit-ai/googleai":"^1.7.0","@agentic-profile/auth":"^0.6.0","@agentic-profile/common":"^0.6.0","@agentic-profile/a2a-client":"^0.6.0","@agentic-profile/a2a-service":"^0.6.1","@codegenie/serverless-express":"^4.16.0","@agentic-profile/express-common":"^0.6.0"},"_hasShrinkwrap":false,"packageManager":"pnpm@10.11.0+sha512.6540583f41cc5f628eb3d9773ecee802f4f9ef9923cc45b69890fb47991d4b092964694ec3a4f738a420c918a333062c8b925d312f42e4f0c263eb603551f977","devDependencies":{"jest":"^29.7.0","tsup":"^8.3.6","dotenv":"^16.4.7","ts-jest":"^29.2.6","ts-node":"^10.9.2","typescript":"^5.8.3","@types/cors":"^2.8.17","@types/node":"^22.14.0","@types/morgan":"^1.9.9","@types/express":"^4.17.21"},"_npmOperationalInternal":{"tmp":"tmp/a2a_0.6.1_1749441612058_0.8442681514437353","host":"s3://npm-registry-packages-npm-production"}},"0.6.2":{"name":"@agentic-profile/a2a","version":"0.6.2","description":"A2A (Agent-to-Agent) SDK for quickly developing multi-tenant agentic services. Supports globally unique user and business scoped agent ids, and universal authentication using the Agentic Profile","main":"index.js","type":"module","repository":{"type":"git","url":"git+https://github.com/agentic-profile/agentic-profile-a2a.git"},"author":{"name":"Mike Prince"},"license":"Apache-2","bugs":{"url":"https://github.com/agentic-profile/agentic-profile-a2a/issues"},"homepage":"https://github.com/agentic-profile/agentic-profile-a2a#readme","dependencies":{"@agentic-profile/a2a-client":"^0.6.1","@agentic-profile/a2a-service":"^0.6.1","@agentic-profile/auth":"^0.6.0","@agentic-profile/common":"^0.6.0","@agentic-profile/express-common":"^0.6.0","@codegenie/serverless-express":"^4.16.0","@genkit-ai/googleai":"^1.7.0","cors":"^2.8.5","express":"^4.21.1","genkit":"^1.7.0","loglevel":"^1.9.2","morgan":"^1.10.0"},"devDependencies":{"@types/cors":"^2.8.17","@types/express":"^4.17.21","@types/morgan":"^1.9.9","@types/node":"^22.14.0","dotenv":"^16.4.7","jest":"^29.7.0","ts-jest":"^29.2.6","ts-node":"^10.9.2","tsup":"^8.3.6","typescript":"^5.8.3"},"scripts":{"create-server-agent-cards-and-profiles":"npx tsx scripts/create-server-agent-cards-and-profiles.ts","create-global-agentic-profile":"npx tsx scripts/create-global-agentic-profile.ts","cli":"npx tsx scripts/cli.ts","dev":"npx tsx --inspect index.local.ts","build":"tsc","test":"jest"},"_id":"@agentic-profile/a2a@0.6.2","_integrity":"sha512-XhTTQApX4JzV88X1fLpp/L2dNgHkhcEEIFkemBOJlHDjRWLTfw2cubgAwbqWWju4TpIDRL8GSzbGiUBKA3PTXg==","_resolved":"/private/var/folders/h8/ldhshwlj08q2rr39y21l1hz40000gn/T/d77d7fdcf826cc765febe74869c2eaf4/agentic-profile-a2a-0.6.2.tgz","_from":"file:agentic-profile-a2a-0.6.2.tgz","_nodeVersion":"22.15.1","_npmVersion":"11.4.0","dist":{"integrity":"sha512-XhTTQApX4JzV88X1fLpp/L2dNgHkhcEEIFkemBOJlHDjRWLTfw2cubgAwbqWWju4TpIDRL8GSzbGiUBKA3PTXg==","shasum":"b88556bf328dd626719fc4f1925be7fe7caab139","tarball":"https://registry.npmjs.org/@agentic-profile/a2a/-/a2a-0.6.2.tgz","fileCount":30,"unpackedSize":104593,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDHbyuegPSDdKSU5EZ/H0jCz1vprzipZE33PqPR4/FlOAIhAIKeofy38uuc427rOUNnwFeMqVmXQepvB7YHQNMwPOQf"}]},"_npmUser":{"name":"mikeprince","email":"mike@mobido.com"},"directories":{},"maintainers":[{"name":"mikeprince","email":"mike@mobido.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/a2a_0.6.2_1749531270011_0.28463435644395907"},"_hasShrinkwrap":false}},"time":{"created":"2025-05-26T06:25:12.895Z","modified":"2025-06-10T04:54:30.367Z","0.5.4":"2025-05-26T06:25:13.156Z","0.5.5":"2025-05-26T06:27:09.652Z","0.6.0":"2025-06-08T05:19:54.570Z","0.6.1":"2025-06-09T04:00:12.231Z","0.6.2":"2025-06-10T04:54:30.193Z"},"bugs":{"url":"https://github.com/agentic-profile/agentic-profile-a2a/issues"},"author":{"name":"Mike Prince"},"license":"Apache-2","homepage":"https://github.com/agentic-profile/agentic-profile-a2a#readme","repository":{"type":"git","url":"git+https://github.com/agentic-profile/agentic-profile-a2a.git"},"description":"A2A (Agent-to-Agent) SDK for quickly developing multi-tenant agentic services. Supports globally unique user and business scoped agent ids, and universal authentication using the Agentic Profile","maintainers":[{"name":"mikeprince","email":"mike@mobido.com"}],"readme":"# Typescript A2A SDK with Agentic Profile support\n\nThis SDK demonstrates use of the [Agentic Profile A2A Client](https://www.npmjs.com/package/@agentic-profile/a2a-client) and [Agentic Profile A2A Service](https://www.npmjs.com/package/@agentic-profile/a2a-service) which provide A2A TypeScript/Javascript implementations that are easy to integrate into existing client applications (browser and server) and cloud based servers.\n\n- [Quick overview of this SDK](#quick-overview-of-this-sdk)\n- [Quickstart](#quickstart)\n- [Test the different A2A agents](#test-the-different-a2a-agents)\n- [Basic Usage](#basic-usage)\n- [Enhancing A2A with the Agentic Profile](#enhancing-a2a-with-the-agentic-profile)\n\n\n## Quick overview of this SDK\n\nThis SDK provides:\n\n- Demonstration of an A2A client and an A2A service\n- Example Node service using Express to host two A2A agents\n- Scripts to create agent cards and Agentic Profiles\n- Support for multi-tenancy, where one agent endpoint can represent many different accounts\n\nThis SDK uses the A2A client and service libraries that are enhanced with the Agentic Profile:\n\n- [Agentic Profile A2A Client](https://www.npmjs.com/package/@agentic-profile/a2a-client)\n- [Agentic Profile A2A Service](https://www.npmjs.com/package/@agentic-profile/a2a-service)\n\nThe SDK sourcecode has the following:\n\n- agents/\n    - coder/ - An A2A programming assistant/agent\n    - eliza/ - The classic Eliza therapist\n- storage/ - In Memory implementation of the storage interface\n- app - Demonstration multi-agent multi-tenant service\n- routes - Provides useful endpoints like /status and /storage for debugging\n\nThe root directory contains:\n\n- index.local.ts - A demonstration of an A2A server with globally unique user and business scoped agent ids, and universal authentication\n- index.js - An AWS Lambda ready server entry point.  See the deploy.sh script for example usage\n\n\n## Quickstart\n\nThis demo is designed to run locally.\n\n1. Requirements - Make sure these are installed:\n\n    - [git](https://github.com/git-guides/install-git)\n    - [node](https://nodejs.org/en/download)\n    - pnpm (part of node)\n\n2. From the shell, clone this repository and switch to the project directory.\n\n    ```bash\n    git clone git@github.com:agentic-profile/agentic-profile-a2a.git\n    cd agentic-profile-a2a\n    ```\n\n3. Download dependencies\n\n    ```bash\n    pnpm install\n    ```\n\n4. Create agent cards and agentic profiles for the server agents:\n\n    ```bash\n    pnpm create-server-agent-cards-and-profiles\n    ```\n\n    Also create an agentic profile for yourself for testing:\n\n    ```bash\n    pnpm create-global-agentic-profile\n    ```\n\n5. Start the local server\n\n    ```bash\n    pnpm dev\n    ```\n\n### Finish Configuring the Node Server\n\n1. Copy the file example.env to .env\n\n    ```bash\n    cp example.env .env\n    ```\n\n2. Edit the .env file.\n\n    To enable admin features.  Uncomment ADMIN_TOKEN and choose a password, for example:\n\n    ```\n    ADMIN_TOKEN=<yoursecret>\n    ```\n\n    Add your Gemini API key (required to use the coder A2A agent).  [Get a Gemini API key](https://ai.google.dev/gemini-api/docs/api-key)\n\n    ```\n    GEMINI_API_KEY=<your Gemini API key>\n    ```\n\n3. Restart the server\n\n    ```bash\n    pnpm dev\n    ```\n\n4. Make sure an admin feature works.  From the command line try:\n\n    ```bash\n    curl -H \"Authorization: Bearer <yoursecret>\" http://localhost:4004/storage\n    ```\n\n    Or from the browser:\n\n    http://localhost:4004/storage?auth=yoursecret\n\n\n## Test the different A2A agents\n\n1. Make sure the server is started:\n\n    ```bash\n    pnpm dev\n    ```\n\n2. For each of the following examples, open a new terminal window. For examples with authentication skip to step #3\n\n    Start the A2A client using the agent card, but still no authentication\n\n    ```bash\n    pnpm cli -p http://localhost:4004/agents/coder/\n    ```\n\n    Start the A2A client using the Agentic Profile, but still no authentication\n\n    ```bash\n    pnpm cli -p did:web:localhost%3A4004:agents:coder#a2a-coder\n    ```\n\n3. In order to use authentication, you must create an agentic profile and keys to authenticate with.\n\n    ```bash\n    pnpm run create-global-agentic-profile\n    ```\n\n    The above script creates a new agentic profile on the test.agenticprofile.ai server, and also stores\n    a copy in your filesystem at ~/.agentic/iam/a2a-sdk-demo-user\n\n4. Examples using Agentic Profile authentication\n\n    Start the A2A client with the well-known Agentic Profile and authentication\n\n    ```bash\n    pnpm cli -i a2a-service-demo-user -p did:web:localhost%3A4004#a2a-coder -u #connect\n    ```\n\n    (The subsequent examples don't specify the \"-i a2a-service-demo-user\" because it is provided as a default to the A2A CLI)\n\n    Start the A2A client with an Agentic Profile and authentication\n\n    ```bash\n    pnpm cli -p did:web:localhost%3A4004:users:2:coder#a2a-coder -u #connect\n    ```\n\n    Start the A2A client with the well-known agent and implicit authentication\n\n    ```bash\n    pnpm cli -p http://localhost:4004/ -u #connect\n    ```\n\n    Start the A2A client with the well-known agentic profile and authentication\n\n    ```bash\n    pnpm cli -p did:web:localhost%3A4004#a2a-coder -u #connect\n    ```\n\n    Start the A2A client with Eliza and authentication\n\n    ```bash\n    pnpm cli -p did:web:localhost%3A4004#a2a-eliza -u #connect\n    ```\n\n## Testing with the live SDK example server\n\n2. For each of the following examples, open a new terminal window. For examples with authentication skip to step #3\n\n    Start the A2A client using the agent card, but still no authentication\n\n    ```bash\n    pnpm cli -p https://example.p2pagentic.ai/agents/coder/\n    ```\n\n    Start the A2A client using the Agentic Profile, but still no authentication\n\n    ```bash\n    pnpm cli -p did:web:example.p2pagentic.ai:agents:coder#a2a-coder\n    ```\n\n3. In order to use authentication, you must create an agentic profile and keys to authenticate with.\n\n    ```bash\n    pnpm run create-global-agentic-profile\n    ```\n\n    The above script creates a new agentic profile on the test.agenticprofile.ai server, and also stores\n    a copy in your filesystem at ~/.agentic/iam/a2a-sdk-demo-user\n\n4. Examples using Agentic Profile authentication as https://example.p2pagentic.ai\n\n    Start the A2A client with the well-known Agentic Profile and authentication\n\n    ```bash\n    pnpm cli -i a2a-service-demo-user -p did:web:example.p2pagentic.ai#a2a-coder -u #connect\n    ```\n\n    (The subsequent examples don't specify the \"-i a2a-service-demo-user\" because it is provided as a default to the A2A CLI)\n\n    Start the A2A client with an Agentic Profile and authentication\n\n    ```bash\n    pnpm cli -p did:web:example.p2pagentic.ai:users:2:coder#a2a-coder -u #connect\n    ```\n\n    Start the A2A client with the well-known agent and implicit authentication\n\n    ```bash\n    pnpm cli -p https://example.p2pagentic.ai/ -u #connect\n    ```\n\n    Start the A2A client with the well-known agentic profile and authentication\n\n    ```bash\n    pnpm cli -p did:web:example.p2pagentic.ai#a2a-coder -u #connect\n    ```\n\n    Start the A2A client with Eliza and authentication\n\n    ```bash\n    pnpm cli -p did:web:example.p2pagentic.ai#a2a-eliza -u #connect\n    ```\n\n\n## Basic Usage\n\n```typescript\nimport {\n  A2AService,\n  InMemoryTaskStore,\n  TaskContext,\n  TaskYieldUpdate,\n} from \"./index\"; // Assuming imports from the server package\n\n// 1. Define your agent's logic as a TaskHandler\nasync function* myAgentLogic(\n  context: TaskContext\n): AsyncGenerator<TaskYieldUpdate> {\n  console.log(`Handling task: ${context.task.id}`);\n  yield {\n    state: \"working\",\n    message: { role: \"agent\", parts: [{ text: \"Processing...\" }] },\n  };\n\n  // Simulate work...\n  await new Promise((resolve) => setTimeout(resolve, 1000));\n\n  if (context.isCancelled()) {\n    console.log(\"Task cancelled!\");\n    yield { state: \"canceled\" };\n    return;\n  }\n\n  // Yield an artifact\n  yield {\n    name: \"result.txt\",\n    mimeType: \"text/plain\",\n    parts: [{ text: `Task ${context.task.id} completed.` }],\n  };\n\n  // Yield final status\n  yield {\n    state: \"completed\",\n    message: { role: \"agent\", parts: [{ text: \"Done!\" }] },\n  };\n}\n```\n\n\n## Enhancing A2A with the Agentic Profile\n\nThe Agentic Profile is a thin layer over A2A, MCP, and other HTTP protocols, and provides:\n\n- Globally unique - user and business scoped - agent identity\n- Universal authentication\n\nThe A2A service, agent, and command line interface were derived from Googles code: https://github.com/google/A2A.git\n\nFor each DID document service/agent, we specify the \"type\" as \"A2A\" and use the serviceEndpoint to reference the agent.json file.\n\n\n### Why do we need user and business scoped agent identity?\n\nIdentity is essential for digital communication between parties because it establishes trust, accountability, and context — without which meaningful, secure interaction is nearly impossible.\n\nCurrent agent protocols focus on individual agent identity, which while accomplishing the communications goal, does not establish trust and accountability which derive from clear relationships with the people or business the agent represents.\n\nFor example, you trust an employee of a bank because they are in the bank building, behind the counter, and wearing a company nametag.\n\n\n#### How does the Agentic Profile solve this?\n\nThe Agentic Profile provides the digital equivalent of how we judge employees, by using a verifiable document provided by the person or business, and declaring all the agents that represent the person or business.\n\nFor example the business at the DNS domain matchwise.ai can have a \"chat-agent\", which combined becomes matchwise.ai#chat-agent.  [Concensys](https://consensys.io/) helped create the [DID specification](https://www.w3.org/TR/did-1.0/) which has a URI format that results in did:web:matchwise.ai#chat-agent.  DID documents (what you find using the did:web:matchwise.ai URI) provides a list of HTTP services, which are equivalent to agents.  The Agentic Profile simply lists the agents in the DID document services. \n\nWith the Agentic Profile, the person or business is the first class citizen, and all the agents that represent them are clearly defined.\n\n\n## Why do we need universal authentication?\n\nMost agent authentication is done using shared keys and HTTP Authorization headers.  While this is easy to implement, it is very insecure.\n\nAnother popular option is OAuth, but that has another host of problems including dramatically increasing the attack surface and the challenges of making sure both agents agree on the same authentication service provider.\n\n\n### How does the Agentic Profile solve this?\n\nPublic key cryptography, which is used extensively for internet communication, is ideal for decentralized authentication.  It is very easy to publish an agents public key via the Agentic Profile, and then the agent can use its secret key to authenticate.  JSON Web Tokens + EdDSA are mature and widely used standards, and the ones Agentic Profile uses.\n\nWith great options like JWT+EdDSA, centralized authentication systems like OAuth are unecessary.\n","readmeFilename":"README.md"}