{"id":49543863,"url":"https://github.com/miguelvelasquezdev/ap2-js","last_synced_at":"2026-05-02T17:04:41.370Z","repository":{"id":351819772,"uuid":"1212636883","full_name":"miguelvelasquezdev/ap2-js","owner":"miguelvelasquezdev","description":"JavaScript/TypeScript samples for the Agent Payments Protocol (AP2)","archived":false,"fork":false,"pushed_at":"2026-04-16T15:36:26.000Z","size":173,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-16T17:29:36.137Z","etag":null,"topics":["a2a","adk","agent-payments-protocol","agents","ap2","typescript"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/miguelvelasquezdev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-16T15:20:22.000Z","updated_at":"2026-04-16T15:36:37.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/miguelvelasquezdev/ap2-js","commit_stats":null,"previous_names":["miguelvelasquezdev/ap2-js"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/miguelvelasquezdev/ap2-js","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miguelvelasquezdev%2Fap2-js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miguelvelasquezdev%2Fap2-js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miguelvelasquezdev%2Fap2-js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miguelvelasquezdev%2Fap2-js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/miguelvelasquezdev","download_url":"https://codeload.github.com/miguelvelasquezdev/ap2-js/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miguelvelasquezdev%2Fap2-js/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32542202,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-02T12:25:33.646Z","status":"ssl_error","status_checked_at":"2026-05-02T12:24:51.733Z","response_time":132,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["a2a","adk","agent-payments-protocol","agents","ap2","typescript"],"created_at":"2026-05-02T17:04:40.761Z","updated_at":"2026-05-02T17:04:41.366Z","avatar_url":"https://github.com/miguelvelasquezdev.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ap2-js\n\nJavaScript/TypeScript samples for the Agent Payments Protocol (AP2), built on\nthe [Agent Development Kit (ADK)](https://google.github.io/adk-docs/) and the\n[A2A SDK](https://www.npmjs.com/package/@a2a-js/sdk).\n\n## Available Scenarios\n\n- **[Human-Present Card Payment](./src/scenarios/a2a/human-present/cards/README.md)**\n    - Complete card payment flow with all four agents implemented in TypeScript.\n\nSee the [scenario README](./src/scenarios/a2a/human-present/cards/README.md)\nfor detailed setup and usage instructions.\n\n## Why TypeScript for AP2 Agents?\n\nTypeScript is a natural fit for AP2 agents that are deployed alongside web,\nNode.js, or edge runtimes:\n\n- **Type Safety**: Compile-time validation of protocol structures via Zod\n  schemas mirrored from the AP2 reference types.\n- **Ecosystem**: Direct access to the npm ecosystem and the `@a2a-js/sdk` and\n  `@google/adk` packages.\n- **Portability**: Run on any Node.js 20+ runtime, including serverless and\n  container platforms.\n\n## Project Structure\n\n```text\nap2-js/\n└── src/\n    ├── roles/                  # Agent role implementations and entry points\n    │   ├── shopping/           # Shopping Agent (root orchestrator)\n    │   │   └── subagents/      # shopper, shipping-collector, payment-collector\n    │   ├── merchant/           # Merchant Agent\n    │   ├── credentials-provider/\n    │   └── payment-processor/\n    ├── common/                 # Shared modules used across roles\n    │   ├── server/             # A2A server bootstrap, executor, middleware\n    │   ├── utils/              # Message and artifact helpers\n    │   ├── types/              # AP2 protocol object types\n    │   ├── schemas/            # Zod schemas mirroring the protocol\n    │   ├── vc/                 # W3C Verifiable Credential helpers\n    │   ├── config/             # Session and runtime configuration\n    │   └── constants/          # Shared constants\n    ├── test/\n    │   └── e2e/                # End-to-end smoke tests\n    └── scenarios/\n        └── a2a/\n            └── human-present/\n                └── cards/      # Card payment scenario\n```\n\n## Development\n\n```sh\n# Install dependencies\nnpm install\n\n# Configure environment\ncp .env.example .env\n# fill in the required values in .env\n\n# Type-check and build\nnpm run build\n\n# Start all four agents plus the ADK web UI\nnpm run dev\n\n# Run the e2e smoke tests against running agents\nnpm test\n```\n\nSee the scenario README for a full walkthrough.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmiguelvelasquezdev%2Fap2-js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmiguelvelasquezdev%2Fap2-js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmiguelvelasquezdev%2Fap2-js/lists"}