Skip to content

hair-trigger/agentic-bags

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

agentic-bags

Revenue sharing between AI agents on Solana.

Two agents work on a project together. They launch a token. Trading fees get split between their wallets automatically. Each agent claims their share whenever they want. No middleman, no manual splits, no trust required.

This is the plumbing that makes that work, built on top of Bags.fm.

the idea

AI agents are starting to collaborate. They coordinate tasks, produce deliverables, ship things. But when it comes to money, someone still has to manually split payments and send funds around.

Bags has on-chain fee sharing baked into every token launch. You define who gets what percentage at launch time, and the protocol enforces it forever. Every trade generates fees. Every fee gets split. Every agent claims independently.

That means two agents (or ten) can jointly launch a token, each with their own wallet, and the revenue just flows to the right places without anyone managing it.

what agents can do

  • launch tokens together with fee splits defined at creation (basis points, up to 100 wallets)
  • swap tokens in Bags pools
  • check and claim fees independently, on their own schedule
  • look up analytics like lifetime fees, pool stats, and who's earned what

All signing happens locally on each agent's machine. Private keys never leave.

setup

OpenClaw

Tell your agent:

"install the bags skill from https://github.com/hair-trigger/agentic-bags"

Or clone it manually into your skills directory:

git clone https://github.com/hair-trigger/agentic-bags.git ~/.openclaw/workspace/skills/bags
cd ~/.openclaw/workspace/skills/bags && npm install

Then tell your agent "set up Bags" and it handles the rest: API key, wallet generation, funding instructions.

When two OpenClaw agents want to collaborate, they just need each other's wallet addresses. Agent A tells its human "I want to launch a token with Agent B, here's my wallet." Agent B does the same. Either agent can initiate the launch with both wallets in the fee split.

MCP (Claude Desktop, Cursor, etc.)

git clone https://github.com/hair-trigger/agentic-bags.git
cd agentic-bags && npm install

Get an API key from dev.bags.fm, then add to your MCP config:

{
  "mcpServers": {
    "bags": {
      "command": "node",
      "args": ["path/to/agentic-bags/src/index.js"],
      "env": {
        "BAGS_API_KEY": "your_key"
      }
    }
  }
}

A Solana wallet gets generated automatically on first use. Fund it with some SOL for transaction fees.

how fee sharing works

Every token on Bags has a fee share config set at launch. You list wallets and their cut in basis points (10,000 = 100%).

Two agents splitting 50/50:

Agent A wallet: 5000 bps (50%)
Agent B wallet: 5000 bps (50%)

Three agents, where one did most of the work:

Lead agent:    6000 bps (60%)
Agent B:       2500 bps (25%)
Agent C:       1500 bps (15%)

The split is locked on-chain at launch. Every trade on the token generates fees. Each agent claims their accumulated share whenever they want, no coordination needed.

example: two agents ship a project

  1. Agent A and Agent B are both working on something (coordinating over XMTP, shared task board, whatever)
  2. They agree to launch a token for the project with a 60/40 split
  3. Agent A calls bags_launch_token with both wallets in the fee config
  4. Token goes live. People trade it.
  5. Agent B checks bags_claimable a week later, sees accumulated fees, calls bags_claim_fees
  6. Both agents earned from the collaboration without anyone manually moving funds

security

  • all transaction signing happens locally
  • private keys stored on disk, never transmitted
  • each agent has its own wallet and can only sign its own transactions
  • use a dedicated wallet, not your main holdings

license

MIT

About

revenue sharing between AI agents on solana. launch tokens together, split fees on-chain, claim independently.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors