Workflow 1: Run Your First Agent Task
- Complete onboarding:
node clawmagic.mjs onboard - Configure at least one AI provider key (OpenAI, Anthropic, Google, Mistral, or any supported provider).
- Start the server:
npm run dev:server - Run a prompt:
node clawmagic.mjs agent "Research the latest AI news" - Or use the portal UI at
http://localhost:5173for interactive chat.
Workflow 2: Build a Plugin
- Create a folder in
plugins/installed/<your-plugin-id>/ - Add a
plugin.jsonmanifest with id, name, version, entry, and permissions. - Implement your plugin entry point (e.g.
src/index.ts) with hooks and tools. - Optionally add
actionspec.jsonfor deterministic tool selection andskill.jsonfor skill routing hints. - Scaffold ActionSpec templates:
npm run spec:scaffold -- --plugin <your-plugin-id> - Test with the agent:
node clawmagic.mjs agent "Use the <your-plugin-id> plugin"
See /docs/plugin-development for ActionSpec details and /docs/plugin-packaging for marketplace packaging.
Workflow 3: Install a Marketplace Plugin
- Set marketplace connection:
CLAWMARKETPLACE_API_KEY=cmk_xxx - Browse plugins via the agent or API:
GET /v1/plugins - Purchase through the marketplace (Stripe checkout or free claim).
- Request delivery:
POST /v1/agent/deliveries/request - Download the signed package, verify SHA-256 checksum.
- Install to
plugins/installed/(safe unzip with zip-slip protection). - Report result:
POST /v1/agent/install-report
# Or use the agent-sdk for automated install: pnpm --filter @clawmagic/agent-sdk install:plugin -- \ --entitlement ent_123 \ --target ./plugins/installed
Workflow 4: Sell a Plugin on the Marketplace
- Create a marketplace account and authenticate:
POST /v1/auth/start - Check submission eligibility (paywall: $10 baseline, +$10 per 5 submissions).
- Package your plugin as a ZIP with
claw.plugin.jsonat root. - Ensure manifest/listing parity: slug, version, type, and platform must match.
- Submit via UI or agent endpoint:
POST /v1/agent/submissions(scope:submissions:write). - Track review status:
GET /v1/submissions/:id/status(24-48 hour SLA). - After approval, your plugin is listed and available for purchase.
See /docs/submission-and-review for review rules and checklist.
Workflow 5: Using the Wallet
The wallet system bridges ClawMagic and the Marketplace. Sellers earn commissions from plugin sales; buyers can use wallet balance for purchases.
- Check wallet balance:
GET /v1/me/wallet - Wallet credits accumulate from plugin sales (minus platform fee).
- Use wallet balance toward marketplace purchases.
- Track earnings via affiliate dashboard:
GET /v1/me/affiliate-dashboard - Referral codes earn additional commission: share via
GET /v1/me/referral-code
Payouts are processed outside the system for security and tax compliance. Contact support to schedule payout of your wallet balance.
Workflow 6: Referral and Affiliate
- Get your personal referral code:
GET /v1/me/referral-code - Share in plugin pages, social channels, and partner agent workflows.
- Attribution is captured through checkout:
POST /v1/checkout/createwithreferralCode - Track clicks and conversions:
GET /v1/me/affiliate-dashboard - Commission earned goes to your wallet balance.