# AI use cases for Openpactprotocol (openpactprotocol/openpactprotocol)

Repo: [openpactprotocol/openpactprotocol](https://github.com/openpactprotocol/openpactprotocol) | Use cases: 4 | Page: https://dedupedai.com/use-cases/openpactprotocol-openpactprotocol/

PACT is an open TypeScript protocol, with schemas, a client library, and reference code, that lets personal agents call businesses' agents with signed identity and customer-granted permissions.

This file holds every use case of this repo. Each one starts with a "## " heading and ends with its URL.

- Run PACT conformance tests against a Provider: https://dedupedai.com/use-cases/openpactprotocol-openpactprotocol/run-pact-conformance-tests-against-a-provider/
- Build a personal agent that calls business agents: https://dedupedai.com/use-cases/openpactprotocol-openpactprotocol/build-a-personal-agent-that-calls-business-agents/
- Validate PACT messages with protocol schemas: https://dedupedai.com/use-cases/openpactprotocol-openpactprotocol/validate-pact-messages-with-protocol-schemas/
- Run the demo personal agent chat UI locally: https://dedupedai.com/use-cases/openpactprotocol-openpactprotocol/run-the-demo-personal-agent-chat-ui/

## How to run PACT conformance tests against a Provider with Openpactprotocol

Repo: [openpactprotocol/openpactprotocol](https://github.com/openpactprotocol/openpactprotocol) | Difficulty: Advanced | Time: 1 hour | Basis: From the README

Check that a Provider's endpoints follow the PACT spec using the bundled e2e suite.

**Who it is for:** A Provider engineer who has built or is building support agents for Brands and needs proof the endpoints match the protocol before going live.

**The problem:** Interop breaks when a Provider reads Agent Cards, signed requests, or consent claims slightly differently from the spec.

**The outcome:** A pass or fail result from the conformance suite for the target Provider, with failing checks identified.

### Steps

1. Clone the repository and open its folder.
2. Run `pnpm install && pnpm gen-keys`.
3. Follow Run the reference stack in docs/running.md to start the reference Provider locally.
4. Run the conformance suite in e2e/ with `E2E_PROVIDER=any pnpm test` after setting E2E_PROVIDER to your Provider's base URL. (inferred, check the README)
5. Read the failing test names and map each one to the matching section of docs/spec.md.

### Prompt to paste into your agent

```text
Using the openpactprotocol/openpactprotocol repo, set up the e2e conformance suite and run it against the Provider at <provider-url>. Output a list of passed and failed checks with the spec section for each failure. Verify that the suite ran against <provider-url> and not the reference Provider by checking the target in the test output.
```

### Caveat

The README says the e2e suite runs against any Provider with E2E_PROVIDER=any, but the exact test command is not shown, so confirm it in the e2e folder before relying on it.

Dual-use notice: only use this on software, sites and systems you own or are authorized to test.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/openpactprotocol-openpactprotocol/run-pact-conformance-tests-against-a-provider/

## How to build a personal agent that calls business agents with Openpactprotocol

Repo: [openpactprotocol/openpactprotocol](https://github.com/openpactprotocol/openpactprotocol) | Difficulty: Advanced | Time: 1 hour | Basis: From the README

Create a personal agent that signs requests and fetches a Brand's Agent Card.

**Who it is for:** A developer building a personal agent platform that must act for a User with Brands' support agents, and needs verifiable identity on each call.

**The problem:** A business agent must know which personal agent is calling and what the customer authorized, and the personal agent must not hold the customer's login credentials.

**The outcome:** A personal agent client that signs requests with the signer, fetches an Agent Card, and sends messages through A2AClient.

### Steps

1. Read Build a personal agent integration in docs/personal-agent.md.
2. Run `pnpm install && pnpm gen-keys` in the repository.
3. Import the signer, fetchAgentCard, and A2AClient from @openpactprotocol/client in your code.
4. Use fetchAgentCard to load the Brand's Agent Card, then send a message with A2AClient.
5. Compare your flow with the demo in reference/personal-agent/ and its JWKS server.

### Prompt to paste into your agent

```text
Using the openpactprotocol/openpactprotocol repo, write a personal agent client that fetches the Agent Card at <agent-card-url> with fetchAgentCard and sends one message with A2AClient. Output the source file and the Agent Card name returned. Verify that each outgoing request carries a signature produced by the signer.
```

### Caveat

The README describes the client package only by name and function, so check its exported API in packages/client before writing calls.

Risk, credentials: Signing keys generated by pnpm gen-keys must be stored securely, because anyone holding them can sign requests as your personal agent.

Dual-use notice: only use this on software, sites and systems you own or are authorized to test.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/openpactprotocol-openpactprotocol/build-a-personal-agent-that-calls-business-agents/

## How to validate PACT messages with protocol schemas with Openpactprotocol

Repo: [openpactprotocol/openpactprotocol](https://github.com/openpactprotocol/openpactprotocol) | Difficulty: Intermediate | Time: 45 minutes | Basis: From the README

Check Agent Cards, messages, errors, and JWT claims against the Zod schemas.

**Who it is for:** A developer or coding agent writing a Provider or personal agent that must reject malformed PACT payloads before acting on them.

**The problem:** Hand-written checks drift from the spec, so malformed Agent Cards or JWT claims can slip through.

**The outcome:** Incoming PACT objects are parsed against the protocol package, and invalid objects produce clear validation errors.

### Steps

1. Open packages/protocol to find the Zod schemas for Agent Card, messages, errors, and JWT claims.
2. Add @openpactprotocol/protocol to your project with `pnpm add @openpactprotocol/protocol`. (inferred, check the README)
3. Call the matching schema's parse or safeParse method on each incoming object.
4. Log the validation errors for any object that fails and reject it.
5. Run your existing tests with a sample Agent Card and a malformed one.

### Prompt to paste into your agent

```text
In the openpactprotocol/openpactprotocol repo, use the Zod schemas in packages/protocol to validate the sample payload at <payload-path>. Output whether it is an Agent Card, a message, an error, or JWT claims, and list any validation errors. Verify the result by running the schema against one valid and one invalid sample.
```

### Caveat

The package name @openpactprotocol/protocol comes from the README, but the install command is inferred, so confirm the published package name before adding it.

Dual-use notice: only use this on software, sites and systems you own or are authorized to test.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/openpactprotocol-openpactprotocol/validate-pact-messages-with-protocol-schemas/

## How to run the demo personal agent chat UI locally with Openpactprotocol

Repo: [openpactprotocol/openpactprotocol](https://github.com/openpactprotocol/openpactprotocol) | Difficulty: Intermediate | Time: 45 minutes | Basis: From the README

Start the demo personal agent with its JWKS server and chat UI on your machine.

**Who it is for:** A developer who wants to see how a PACT personal agent behaves before writing their own, or who is onboarding a team.

**The problem:** Reading the spec alone does not show how signing, keys, and the chat flow fit together.

**The outcome:** A running demo personal agent with a JWKS server and a chat UI that you can use to exercise PACT calls.

### Steps

1. Clone the repository and change into its folder.
2. Run `pnpm install && pnpm gen-keys`.
3. Follow Run it locally in docs/running.md to start the reference stack.
4. Open the demo personal agent in reference/personal-agent/ and confirm the JWKS server is running.
5. Send a test message through the chat UI to a local Provider.

### Prompt to paste into your agent

```text
Using the openpactprotocol/openpactprotocol repo, start the demo personal agent in reference/personal-agent/ and report the local URL of its chat UI and of its JWKS endpoint. Verify that the JWKS endpoint returns a JSON key set before you report success.
```

### Caveat

The README does not give the exact start command for the demo agent, so follow docs/running.md rather than guessing one.

Dual-use notice: only use this on software, sites and systems you own or are authorized to test.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/openpactprotocol-openpactprotocol/run-the-demo-personal-agent-chat-ui/
