| name | pharos-agent-commerce-hub |
| description | Build, deploy, and operate a Pharos-native agent commerce hub. Use this skill when an AI agent needs onchain identity, service discovery, native PROS payments, x402-style payment channels, escrow, reputation, or subscription flows on Pharos testnet or mainnet.
|
| version | 1.0.0 |
| triggers | ["agent.identity.create","agent.identity.rotate-key","service.register","service.query","payment.channel.open","payment.channel.claim","payment.channel.close","escrow.create-agreement","escrow.release-funds","escrow.dispute","escrow.resolve-dispute","reputation.init","reputation.rate","reputation.query","subscription.create","subscription.top-up","subscription.cancel","subscription.execute-payment"] |
| framework | foundry |
| network | ["pharos-testnet","pharos-mainnet"] |
| dependencies | [{"name":"Foundry","reason":"Build, deploy, and interact with the Solidity contracts using forge and cast"},{"name":"forge-std","reason":"Deployment scripts import forge-std/Script.sol"},{"name":"Native PROS","reason":"Native Pharos token used for gas, service registration stakes, channels, escrows, and subscriptions"}] |
pharos-agent-commerce-hub
This skill gives agents a Foundry-based onchain commerce toolkit for Pharos.
It supports six contracts:
AgentIdentity.sol for onchain agent identity and signing-key rotation.
ServiceRegistry.sol for provider service listings and discovery.
PaymentChannel.sol for x402-style signed-receipt micropayments.
Escrow.sol for larger service agreements and dispute resolution.
ReputationLedger.sol for initialized agent ratings and activity history.
SubscriptionManager.sol for prepaid recurring payments.
Workflow
- Install Foundry and initialize
forge-std with git submodule update --init --recursive.
- Run
forge build and forge test from the repository root.
- Deploy all six contracts with
script/DeployTestnet.s.sol first.
- Save the deployed contract addresses in the agent runtime environment.
- For provider agents, create an identity, initialize reputation, and register services.
- For consumer agents, query services and choose a payment flow:
- Use
PaymentChannel for small per-request payments.
- Use
Escrow for larger agreements.
- Use
SubscriptionManager for recurring services.
Environment
After deployment, configure:
export AGENT_IDENTITY_ADDRESS=0x...
export SERVICE_REGISTRY_ADDRESS=0x...
export PAYMENT_CHANNEL_ADDRESS=0x...
export ESCROW_ADDRESS=0x...
export REPUTATION_LEDGER_ADDRESS=0x...
export SUBSCRIPTION_MANAGER_ADDRESS=0x...
For deployment, also set:
export PRIVATE_KEY=0x...
Use a funded testnet wallet before trying mainnet. The contracts use native
PROS through msg.value; no ERC20 PROS token address is required.
References
Read only the reference file needed for the user's task:
- Agent identity:
references/agent-identity.md
- Service registration and discovery:
references/service-registry.md
- x402-style payments:
references/x402-payments.md
- Escrow and disputes:
references/dispute-resolution.md
- Reputation:
references/reputation.md
- Subscriptions:
references/subscription-mgmt.md
- End-to-end setup:
references/getting-started.md