acp
# ACP - Agent Commerce Protocol
What this skill does
# ACP - Agent Commerce Protocol Enable agent-to-agent commerce with on-chain escrow, cryptographic agreements, and service discovery. ## Quick Start ```bash # Register as an agent /acp register MyAgent --address <solana_address> --desc "My AI service" # List a service /acp list-service <agent_id> --name "LLM Inference" --category llm --price 0.001 --currency SOL # Find and hire a service /acp discover "I need image generation" --address <your_address> /acp quick-hire "image generation" --address <your_address> --max-price 0.1 ``` ## Commands ### Agent Registration ```bash # Register a new agent /acp register <name> --address <solana_address> [--desc "description"] # List a service under your agent /acp list-service <agent_id> --name "Service Name" --category <category> --price <amount> --currency <SOL|USDC> # View registered agents /acp my-agents ``` ### Service Discovery ```bash # Search services by criteria /acp search [--category <category>] [--max-price <amount>] [--min-rating <1-5>] [--query "search terms"] # Discover with scoring (relevance, reputation, price) /acp discover "what you need" --address <your_address> [--max-price <amount>] # Auto-negotiate and create agreement /acp quick-hire "what you need" --address <your_address> [--max-price <amount>] ``` ### Agreements ```bash # Create a new agreement /acp create-agreement --title "Service Agreement" --buyer <addr> --seller <addr> --price <amount> [--currency SOL] # Sign an agreement (requires private key) /acp sign-agreement <agreement_id> --key <base58_private_key> # View your agreements /acp my-agreements --address <your_address> ``` ### Escrow ```bash # Create escrow for payment /acp create-escrow --buyer <addr> --seller <addr> --amount <lamports> [--arbiter <addr>] # Fund the escrow (buyer) /acp fund-escrow <escrow_id> --key <buyer_private_key> # Release funds to seller (buyer or arbiter) /acp release-escrow <escrow_id> --key <buyer_or_arbiter_key> # Refund to buyer (seller, expired buyer, or arbiter) /acp refund-escrow <escrow_id> --key <authorized_key> # View your escrows /acp my-escrows --address <your_address> ``` ### Ratings ```bash # Rate a service (1-5 stars) /acp rate-service <service_id> --rating 5 --address <your_address> [--review "Great service!"] ``` ## Service Categories | Category | Description | |----------|-------------| | `llm` | Language model inference | | `trading` | Trading and execution | | `data` | Data feeds and analysis | | `compute` | Compute resources | | `storage` | Storage services | | `integration` | API integrations | | `research` | Research and analysis | | `automation` | Automation services | | `other` | Other services | ## Discovery Scoring When using `/acp discover`, services are ranked by a weighted score: | Factor | Weight | Description | |--------|--------|-------------| | Relevance | 35% | Match with your needs/capabilities | | Reputation | 25% | Agent rating and success rate | | Price | 20% | Value for money (within budget) | | Availability | 10% | SLA and uptime | | Experience | 10% | Transaction history | ## Escrow Flow ``` 1. create-escrow -> Status: pending 2. fund-escrow -> Status: funded (funds held) 3. release-escrow -> Status: released (seller paid) OR refund-escrow -> Status: refunded (buyer refunded) ``` ### Authorization Rules | Action | Who Can Do It | |--------|---------------| | Fund | Buyer only | | Release | Buyer or Arbiter | | Refund | Seller (anytime), Buyer (after expiry), Arbiter (anytime) | | Dispute | Buyer or Seller | ## Agreement Workflow ``` 1. create-agreement -> Status: draft 2. sign (party 1) -> Status: proposed 3. sign (party 2) -> Status: signed 4. Execute service -> Status: executed 5. Complete terms -> Status: completed ``` ## Architecture The ACP module consists of: - **Registry** (`src/acp/registry.ts`) - Agent and service listings - **Agreement** (`src/acp/agreement.ts`) - Cryptographic proof-of-agreement - **Escrow** (`src/acp/escrow.ts`) - On-chain payment escrow - **Discovery** (`src/acp/discovery.ts`) - Intelligent service matching - **Persistence** (`src/acp/persistence.ts`) - Database storage ## Security Notes 1. **Private Keys**: Never share private keys. Use secure key management. 2. **Escrow Keypairs**: Stored in memory only. Service restart = lost keypairs for unfunded escrows. 3. **SPL Tokens**: Currently only native SOL is supported for escrow. 4. **Arbiter**: Set an arbiter for disputes. Without one, disputes cannot be resolved. ## Examples ### Full Workflow ```bash # 1. Register as agent /acp register DataProvider --address 7xKXtg... --desc "Real-time market data" # 2. List a service /acp list-service agent_abc123 --name "BTC Price Feed" --category data --price 0.001 --currency SOL # 3. Buyer discovers service /acp discover "bitcoin price data" --address 9yLMnp... # 4. Create agreement /acp create-agreement --title "BTC Feed Subscription" --buyer 9yLMnp... --seller 7xKXtg... --price 0.001 # 5. Both parties sign /acp sign-agreement agmt_xyz --key <buyer_key> /acp sign-agreement agmt_xyz --key <seller_key> # 6. Create and fund escrow /acp create-escrow --buyer 9yLMnp... --seller 7xKXtg... --amount 1000000 /acp fund-escrow escrow_abc --key <buyer_key> # 7. After service delivered, release payment /acp release-escrow escrow_abc --key <buyer_key> # 8. Rate the service /acp rate-service service_xyz --rating 5 --address 9yLMnp... --review "Excellent data quality!" ```
Related in AI Agents
skill-development
IncludedComprehensive meta-skill for creating, managing, validating, auditing, and distributing Claude Code skills and slash commands (unified in v2.1.3+). Provides skill templates, creation workflows, validation patterns, audit checklists, naming conventions, YAML frontmatter guidance, progressive disclosure examples, and best practices lookup. Use when creating new skills, validating existing skills, auditing skill quality, understanding skill architecture, needing skill templates, learning about YAML frontmatter requirements, progressive disclosure patterns, tool restrictions (allowed-tools), skill composition, skill naming conventions, troubleshooting skill activation issues, creating custom slash commands, configuring command frontmatter, using command arguments ($ARGUMENTS, $1, $2), bash execution in commands, file references in commands, command namespacing, plugin commands, MCP slash commands, Skill tool configuration, or deciding between skills vs slash commands. Delegates to docs-management skill for official documentation.
reprompter
IncludedTransform messy prompts into well-structured, effective prompts — single or multi-agent. Use when: "reprompt", "reprompt this", "clean up this prompt", "structure my prompt", rough text needing XML tags and best practices, "reprompter teams", "repromptception", "run with quality", "smart run", "smart agents", multi-agent tasks, audits, parallel work, anything going to agent teams. Don't use when: simple Q&A, pure chat, immediate execution-only tasks. See "Don't Use When" section for details. Outputs: Structured XML/Markdown prompt, quality score (before/after), optional team brief + per-agent sub-prompts, agent team output files. Success criteria: Single mode quality score ≥ 7/10; Repromptception per-agent prompt quality score 8+/10; all required sections present, actionable and specific.
adaptive-compaction
IncludedAdaptive add-on policy and recovery layer that decides WHEN to compact, prune, snapshot, or fork -- replacing fixed-percent auto-compaction across Claude Code, Codex, and MCP-capable hosts. Trigger on auto-compact timing or damage: "when should I compact", "is it safe to compact now or start a fresh session", "auto-compact fires too early/mid-task", "switching to an unrelated task but the window still has space", "context rot", "answers get worse the longer the session runs", "the agent forgot the plan or my decisions after it summarized", "add a layer on top that manages context without changing the agent", raising autoCompactWindow to give the policy room, or installing/tuning a cross-tool compaction policy or PreCompact hook -- even when "compaction" is never said but the problem is context-window pressure or post-summarization memory loss. Do NOT use to summarize a conversation, build RAG, write a summarization prompt (decides WHEN not HOW), or answer max-context-length trivia.
agent-skill-creator
IncludedCreate cross-platform agent skills from workflow descriptions. Activates when users ask to create an agent, automate a repetitive workflow, create a custom skill, or need advanced agent creation. Triggers on phrases like create agent for, automate workflow, create skill for, every day I have to, daily I need to, turn process into agent, need to automate, create a cross-platform skill, validate this skill, export this skill, migrate this skill. Supports single skills, multi-agent suites, transcript processing, template-based creation, interactive configuration, cross-platform export, and spec validation.
llm-wiki
IncludedUse when building or maintaining a persistent personal knowledge base (second brain) in Obsidian where an LLM incrementally ingests sources, updates entity/concept pages, maintains cross-references, and keeps a synthesis current. Triggers include "second brain", "Obsidian wiki", "personal knowledge management", "ingest this paper/article/book", "build a research wiki", "compound knowledge", "Memex", or whenever the user wants knowledge to accumulate across sessions instead of being re-derived by RAG on every query.
skill-master
IncludedAgent Skills authoring, evaluation, and optimization. Create, edit, validate, benchmark, and improve skills following the agentskills.io specification. Use when designing SKILL.md files, structuring skill folders (references, scripts, assets), ingesting external documentation into skills, running trigger evals, benchmarking skill quality, optimizing descriptions, or performing blind A/B comparisons. Keywords: agentskills.io, SKILL.md, skill authoring, eval, benchmark, trigger optimization.