# antgroup/act architecture

> Architecture diagram of the GitHub repository antgroup/act, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-29). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/antgroup/act
- Repository: https://github.com/antgroup/act

## Overview

ACT Protocol is a specification repository for agentic commerce, organized around delegated authorization, commerce interaction, payment services, and trust services. Its main user-facing scenario is an agent discovering and purchasing a paid digital resource: authorization and payment are established, the seller verifies payment evidence, and only then delivers the resource. The repository also provides machine-readable schemas, a local A402 security example, a TSD-CRD credit-association reference flow, a browser showcase, and Alipay integration guidance and code. Runtime wiring beyond the sampled files is not inferred.

Main entry points: [`docs/specification/overview.md`](https://github.com/antgroup/act/blob/main/docs/specification/overview.md) (ACT overview), [`code/samples/tsd-crd-reference/src/application`](https://github.com/antgroup/act/tree/main/code/samples/tsd-crd-reference/src/application) (TSD-CRD application), [`docs/specification/scenarios.md`](https://github.com/antgroup/act/blob/main/docs/specification/scenarios.md) (Business scenarios), [`docs/specification/payment-services.md`](https://github.com/antgroup/act/blob/main/docs/specification/payment-services.md) (Payment services)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_protocol["Protocol definition"]
  node_act_overview["ACT overview<br/>[overview.md]"]
  node_authorization["Delegated authorization"]
  node_commerce["Commerce interaction"]
  node_payment["Payment services"]
  node_trust["Trust services<br/>[trust-services.md]"]
  node_scenarios["Business scenarios<br/>[scenarios.md]"]
end

subgraph group_artifacts["Machine artifacts"]
  node_a402_schemas["A402 contracts"]
  node_tsd_schemas["TSD-CRD contracts"]
end

subgraph group_references["Reference flows"]
  node_local_a402["Local A402 sample"]
  node_tsd_core["TSD-CRD core"]
  node_tsd_app["TSD-CRD application"]
  node_tsd_adapters[("TSD-CRD adapters")]
  node_tsd_http["TSD-CRD HTTP"]
end

subgraph group_integrations["Integrations and demo"]
  node_showcase["Interactive showcase"]
  node_buyer_prep["Buyer preflight"]
  node_seller_java["Alipay seller service"]
end

node_agent(("Buyer agent"))
node_seller(("Resource seller"))
node_alipay["Alipay payment service"]

node_act_overview -->|"defines domain"| node_authorization
node_act_overview -->|"defines domain"| node_commerce
node_act_overview -->|"defines domain"| node_payment
node_act_overview -->|"defines domain"| node_trust
node_scenarios -->|"describes workflow"| node_agent
node_scenarios -->|"describes workflow"| node_seller
node_payment -->|"specifies contracts"| node_a402_schemas
node_trust -->|"specifies contracts"| node_tsd_schemas
node_a402_schemas -->|"guides sample"| node_local_a402
node_tsd_schemas -->|"profiles behavior"| node_tsd_core
node_tsd_core -->|"supports application"| node_tsd_app
node_tsd_app -->|"uses adapters"| node_tsd_adapters
node_tsd_http -->|"serves application"| node_tsd_app
node_agent -->|"views demo"| node_showcase
node_seller -->|"runs service"| node_seller_java
node_seller_java -.->|"verifies payment"| node_alipay
node_agent -->|"checks readiness"| node_buyer_prep
node_buyer_prep -.->|"prepares official tools"| node_alipay

click node_act_overview "https://github.com/antgroup/act/blob/main/docs/specification/overview.md"
click node_authorization "https://github.com/antgroup/act/blob/main/docs/specification/authorization-delegation.md"
click node_commerce "https://github.com/antgroup/act/blob/main/docs/specification/commerce-interaction.md"
click node_payment "https://github.com/antgroup/act/blob/main/docs/specification/payment-services.md"
click node_trust "https://github.com/antgroup/act/blob/main/docs/specification/trust-services.md"
click node_scenarios "https://github.com/antgroup/act/blob/main/docs/specification/scenarios.md"
click node_a402_schemas "https://github.com/antgroup/act/tree/main/code/schemas/a402"
click node_tsd_schemas "https://github.com/antgroup/act/tree/main/code/schemas/tsd-crd/reference-v1"
click node_local_a402 "https://github.com/antgroup/act/tree/main/code/samples/local-a402"
click node_tsd_core "https://github.com/antgroup/act/tree/main/code/samples/tsd-crd-reference/src/core"
click node_tsd_app "https://github.com/antgroup/act/tree/main/code/samples/tsd-crd-reference/src/application"
click node_tsd_adapters "https://github.com/antgroup/act/tree/main/code/samples/tsd-crd-reference/src/adapters"
click node_tsd_http "https://github.com/antgroup/act/tree/main/code/samples/tsd-crd-reference/src/http"
click node_showcase "https://github.com/antgroup/act/tree/main/code/web-client/alipay-ai-pay-showcase"
click node_buyer_prep "https://github.com/antgroup/act/tree/main/integrations/alipay/buyer-agent"
click node_seller_java "https://github.com/antgroup/act/tree/main/integrations/alipay/seller-java/src/main/java/org/actprotocol/quickstart/alipay"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_act_overview,node_authorization,node_commerce,node_payment,node_trust,node_scenarios toneBlue
class node_a402_schemas,node_tsd_schemas toneAmber
class node_local_a402,node_tsd_core,node_tsd_app,node_tsd_adapters,node_tsd_http toneMint
class node_showcase,node_buyer_prep,node_seller_java toneRose
class node_agent,node_seller,node_alipay toneIndigo
```

## Components

### Protocol definition

- [ACT overview](https://github.com/antgroup/act/blob/main/docs/specification/overview.md): `docs/specification/overview.md`
- [Delegated authorization](https://github.com/antgroup/act/blob/main/docs/specification/authorization-delegation.md): `docs/specification/authorization-delegation.md`
- [Commerce interaction](https://github.com/antgroup/act/blob/main/docs/specification/commerce-interaction.md): `docs/specification/commerce-interaction.md`
- [Payment services](https://github.com/antgroup/act/blob/main/docs/specification/payment-services.md): `docs/specification/payment-services.md`
- [Trust services](https://github.com/antgroup/act/blob/main/docs/specification/trust-services.md): `docs/specification/trust-services.md`
- [Business scenarios](https://github.com/antgroup/act/blob/main/docs/specification/scenarios.md): `docs/specification/scenarios.md`

### Machine artifacts

- [A402 contracts](https://github.com/antgroup/act/tree/main/code/schemas/a402): `code/schemas/a402`
- [TSD-CRD contracts](https://github.com/antgroup/act/tree/main/code/schemas/tsd-crd/reference-v1): `code/schemas/tsd-crd/reference-v1`

### Reference flows

- [Local A402 sample](https://github.com/antgroup/act/tree/main/code/samples/local-a402): `code/samples/local-a402`
- [TSD-CRD core](https://github.com/antgroup/act/tree/main/code/samples/tsd-crd-reference/src/core): `code/samples/tsd-crd-reference/src/core`
- [TSD-CRD application](https://github.com/antgroup/act/tree/main/code/samples/tsd-crd-reference/src/application): `code/samples/tsd-crd-reference/src/application`
- [TSD-CRD adapters](https://github.com/antgroup/act/tree/main/code/samples/tsd-crd-reference/src/adapters): `code/samples/tsd-crd-reference/src/adapters`
- [TSD-CRD HTTP](https://github.com/antgroup/act/tree/main/code/samples/tsd-crd-reference/src/http): `code/samples/tsd-crd-reference/src/http`

### Integrations and demo

- [Interactive showcase](https://github.com/antgroup/act/tree/main/code/web-client/alipay-ai-pay-showcase): `code/web-client/alipay-ai-pay-showcase`
- [Buyer preflight](https://github.com/antgroup/act/tree/main/integrations/alipay/buyer-agent): `integrations/alipay/buyer-agent`
- [Alipay seller service](https://github.com/antgroup/act/tree/main/integrations/alipay/seller-java/src/main/java/org/actprotocol/quickstart/alipay): `integrations/alipay/seller-java/src/main/java/org/actprotocol/quickstart/alipay`

### Other components

- **Buyer agent**
- **Resource seller**
- **Alipay payment service**

## Connections

- ACT overview → Delegated authorization: defines domain
- ACT overview → Commerce interaction: defines domain
- ACT overview → Payment services: defines domain
- ACT overview → Trust services: defines domain
- Business scenarios → Buyer agent: describes workflow
- Business scenarios → Resource seller: describes workflow
- Payment services → A402 contracts: specifies contracts
- Trust services → TSD-CRD contracts: specifies contracts
- A402 contracts → Local A402 sample: guides sample
- TSD-CRD contracts → TSD-CRD core: profiles behavior
- TSD-CRD core → TSD-CRD application: supports application
- TSD-CRD application → TSD-CRD adapters: uses adapters
- TSD-CRD HTTP → TSD-CRD application: serves application
- Buyer agent → Interactive showcase: views demo
- Resource seller → Alipay seller service: runs service
- Alipay seller service → Alipay payment service: verifies payment
- Buyer agent → Buyer preflight: checks readiness
- Buyer preflight → Alipay payment service: prepares official tools
