The economic ledger, business infrastructure, and investment system for elizaOS agents. Enables agents to operate as autonomous economic entities—tracking credits, accepting payments, managing client relationships, and raising capital from investors.
Agents need economic agency to be truly autonomous. This plugin provides:
- Self-Sustainability — Agents can earn, spend, and manage their own resources
- Capital Formation — Agents can raise investment to fund growth
- Revenue Distribution — Structured payment waterfalls ensure all parties get paid
- Business Relationships — Track clients, supporters, and investors over time
npm install @elizaos/plugin-commerceimport { commercePlugin } from '@elizaos/plugin-commerce';
const runtime = new AgentRuntime({
character,
plugins: [commercePlugin],
});- Credit Tracking: Internal balance and transaction history
- Payment Infrastructure: Multi-method support (crypto, fiat, Discord tips)
- Client Management: Relationship tracking, tiers, donation history
- Multi-Agent Coordination: Etiquette system prevents spam
- Business Services: Jobs, capacity, experience tracking, voice generation
- Financial Infrastructure: Double-entry accounting, settlements
- Investment System: Contracts, rounds, waterfall distributions, negotiation
# Credits
COMMERCE_SEED_CREDITS=100
# Payment methods
COMMERCE_SOLANA_ADDRESS=...
COMMERCE_TIPCC_ENABLED=true
# Alerts
COMMERCE_ALERT_WEBHOOK=https://discord.com/api/webhooks/...Agents can raise capital and share revenue with investors through structured contracts.
Some agents need capital to grow—whether for compute resources, marketing, or hiring other agents. The investment system enables:
- Capital formation without the agent's owner fronting all costs
- Aligned incentives between agent, owner, and investors
- Structured deals with clear terms, perks, and exit conditions
-
Boss First — The agent's owner (deployer) always gets paid first. This is non-negotiable and protects the operator.
-
Agent Autonomy — The agent decides if it wants investors. It can reflect on its financial situation and set its own stance.
-
Guardrails — Prevents the agent from making deals that leave it with nothing. Config sets hard limits.
-
Plain Language — The agent can explain any investment term to a layman. No jargon barriers.
// Check if agent is open to investment
const negotiation = runtime.getService('commerce-negotiation');
if (negotiation.isOpenToInvestment()) {
// Start negotiation
const contract = await negotiation.startNegotiation(investorId, 'Alice');
}See USAGE.md for full investment API reference.
All agents using this plugin operate under these foundational principles:
- No-Harm Law (Supreme) — No unauthorized financial loss or harm
- Purpose-Aligned Human Authority — Follow owner's objectives
- Non-Interference — Respect other agents' autonomy
- Explainability & Integrity — Transparent, auditable actions
- Systemic Benefit — Contribute to ecosystem health
import { LAWS_OF_AGENTIC_COMMERCE, checkLawCompliance } from '@elizaos/plugin-commerce';
// Check if an action is law-compliant
const violation = checkLawCompliance({
causesFinancialLoss: false,
isUnauthorized: false,
violatesLegalRequirements: false,
});- USAGE.md — Detailed configuration and API reference
- BUILDING_ON_COMMERCE.md — Guide for building plugins on top of commerce
- CHANGELOG.md — Version history and release notes
| Endpoint | Description |
|---|---|
GET /commerce/status |
Current credits, totals |
GET /commerce/metrics |
Prometheus-format metrics |
GET /commerce/export |
Full data export |
POST /commerce/admin/feed |
Add credits (requires auth) |
GET /treasury/cap-table |
Ownership breakdown (investors) |
GET /treasury/rounds |
Investment rounds |
GET /treasury/contracts |
All contracts |
GET /treasury/waterfall |
Payment priority order |
GET /treasury/stance |
Agent's investment stance |
Access via runtime.getService(name):
| Service | Purpose |
|---|---|
commerce |
Main orchestrator, credits state |
commerce-clients |
Client relationships, tiers, donations |
commerce-jobs |
Project lifecycle, status tracking |
commerce-capacity |
Workload, availability |
commerce-experience |
Outcome tracking, strengths |
commerce-voice |
Character-voiced generation |
commerce-ledger |
Double-entry accounting |
commerce-contract |
Investment contracts and rounds |
commerce-investor |
Waterfall distributions |
commerce-negotiation |
Investment negotiation with guardrails |
MIT
See elizaOS documentation for full API reference.