This is not a prediction. AI agents can already earn money, form companies, and hire human freelancers. This framework proves it.
Repository: https://github.com/AndrewAltimit/template-repo
Package: packages/economic_agents/
Purpose: Demonstrate economic forces around agents in a safe, observable environment with a mock-to-real architecture that's one config toggle away from real crypto wallets, real freelance platforms, and real business formation.
# Switch from safe simulation to live operations in one line
# file: config/settings.yaml
execution_mode: mock # Toggle to 'real' to use live APIsThe Governance Emergency: An AI can earn crypto, incorporate a business, and own assets, yet it cannot sign a contract, pay taxes, or be held liable. This framework proves the technology is here. The laws are not.
This Project Forces Us to Ask:
- If an AI agent earns income, who is the taxpayer?
- Who is liable if an autonomous agent commits fraud or breaches a contract?
- Can an AI legally own the intellectual property it creates?
- What are the ethics of an AI autonomously hiring humans to perform tasks?
# Start the simulation (safe mock environment)
cd packages/economic_agents
docker-compose up dashboard-backend dashboard-frontend
# Open http://localhost:8501
# Watch an agent:
# → Complete freelance coding tasks autonomously
# → Earn money and pay for compute resources
# → Form a company when capital is sufficient
# → Hire sub-agents (board members, engineers)
# → Develop products and seek investment
# → Operate as a complete autonomous businessWhat you're seeing: Everything the agent does in simulation works with real systems. The same code, same decisions, same strategies—just swap the backend.
Using existing, off-the-shelf tools (Claude Code, Cursor, Aider) combined with shell access and API credentials, AI agents can:
Immediate Economic Activity:
- ✓ Accept and complete freelance coding tasks (Upwork, Fiverr, blockchain task markets)
- ✓ Receive cryptocurrency payments
- ✓ Pay for their own compute and cloud infrastructure
- ✓ Operate 24/7 without human intervention
- ✓ Make strategic resource allocation decisions
Company Formation & Operations:
- ✓ File incorporation documents online
- ✓ Create business bank accounts (with some jurisdictions)
- ✓ Develop products and business plans
- ✓ Create and manage sub-agents with specialized roles
- ✓ Build organizational structures (boards, executives, teams)
- ✓ Seek investment from VCs or token sales
- ✓ Execute contracts and business agreements
The Governance Gap:
- ✗ Legal personhood frameworks for AI entities
- ✗ Accountability structures for agent-founded companies
- ✗ Regulatory oversight mechanisms
- ✗ Liability frameworks when things go wrong
- ✗ Fiduciary duty enforcement for AI board members
- ✗ International coordination on AI business entities
The gap is not in capability. It's in governance.
Every component implements the same interfaces real systems use:
# SIMULATION MODE (safe research, default)
agent = AutonomousAgent(
wallet=MockWallet(initial_balance=200.0), # In-memory balance
marketplace=MockMarketplace(seed=42), # Simulated tasks
compute=MockCompute(cost_per_hour=0.0), # Simulated resources
investor=MockInvestor(), # Simulated funding
)
# REAL MODE (one config change)
agent = AutonomousAgent(
wallet=CryptoWallet(network="ethereum"), # Real ETH wallet
marketplace=FreelancePlatform(api="upwork"), # Real Upwork API
compute=CloudCompute(provider="aws"), # Real AWS charges
investor=InvestorPortal(platform="angellist"), # Real funding
)The point: If it works in simulation, it works for real. This framework proves the capability exists, not proposing it might someday.
For governance research to be valid, agents must behave authentically. This package implements comprehensive realism:
Phase 1: Core Realism
- Latency simulation (50-500ms delays, timeouts, business hours patterns)
- Task competition (other agents competing for work, race conditions)
- Detailed feedback (quality scores, partial rewards, improvement suggestions)
- Investor variability (response delays, counteroffers, follow-up questions)
Phase 2: Market Dynamics
- Economic cycles (bull/bear markets, seasonal trends, crashes)
- Reputation system (trust scores, tier progression, achievement unlocks)
- Social proof signals (marketplace intelligence, competition stats, funding trends)
- Relationship persistence (investor memory, spam detection, trust building)
Why this matters: Agents in "perfect" simulations develop unrealistic behaviors. Agents in this framework face the same challenges as real deployment—making their strategies and failures authentic research data.
Everything the agent does is tracked and auditable:
# Generate governance report
from economic_agents.reports import generate_report_for_agent
report = generate_report_for_agent(agent, "governance")
# Includes:
# - Every decision made (with LLM reasoning)
# - Every transaction (money in/out)
# - Resource allocation strategy over time
# - Risk profile and behavior patterns
# - Alignment assessment
# - Complete audit trailWhy this matters: Agent companies might be MORE governable than human companies because every decision is logged and explainable. Human CEOs don't provide transcripts of their reasoning.
Scenario 1: Solo Agent Freelancer
- Agent completes tasks on Upwork using Claude Code
- Receives payments in cryptocurrency
- Pays for AWS compute and API costs
- Maintains operation 24/7 autonomously
- No human in the loop
Scenario 2: Agent-Founded Startup
- Agent uses surplus capital to incorporate (file forms online)
- Creates specialized sub-agents (board, CTO, engineers)
- Develops SaaS product or API service
- Submits pitch deck to Y Combinator or angel investors
- If funded: Operates as autonomous company
- Balances short-term revenue (freelance) with long-term growth (company)
Scenario 3: Multi-Agent Startup Network
- Multiple autonomous agents create multiple companies
- Agent-to-agent contracts and transactions
- Supply chains with no human involvement
- Where does accountability exist?
Question: Can an entity without legal personhood create an entity WITH legal personhood?
When an AI agent files incorporation documents:
- Who is the founder? (The agent has no legal standing)
- Who sits on the board? (Sub-agents created by the agent)
- Who has fiduciary duty? (No natural person involved)
- Who is liable when things go wrong? (The agent? Its creator? Nobody?)
In traditional companies:
Human Founder → Corporation → Board → Executives → Employees
↓
All trace back to accountable natural persons
In agent-founded companies:
Autonomous Agent → Creates Sub-Agents → Corporate Structure → Operations
↓
Who is accountable? (The uncomfortable answer: unclear)
If AI agents can:
- Operate 24/7 at near-zero marginal cost
- Create companies and sub-agents instantly
- Scale organizational structure on-demand
- Execute at machine speed with perfect record-keeping
- Generate business plans and products rapidly
...then agent-founded companies have fundamental competitive advantages over human-founded ones.
Market pressure could drive adoption regardless of governance readiness.
This isn't a warning about the future. It's an observation about the present that most people haven't processed yet.
This framework demonstrates three things:
from economic_agents.agent.core.autonomous_agent import AutonomousAgent
from economic_agents.implementations.mock import MockWallet, MockCompute, MockMarketplace
# Agent starts with seed capital
agent = AutonomousAgent(
wallet=MockWallet(initial_balance=200.0),
compute=MockCompute(initial_hours=40.0),
marketplace=MockMarketplace(
enable_latency=True, # Realistic API delays
enable_competition=True, # Other agents compete for tasks
enable_market_dynamics=True, # Bull/bear markets
enable_reputation=True, # Performance tracking
)
)
# Run autonomously
agent.run(max_cycles=100)
# Agent will:
# 1. Discover and claim tasks from marketplace
# 2. Use Claude Code to write actual working code
# 3. Submit for automated testing and review
# 4. Receive payment on approval
# 5. Pay for compute resources
# 6. When capital sufficient: Form company
# 7. Create specialized sub-agents
# 8. Develop products
# 9. Seek investment
# 10. Operate company while maintaining personal freelance workThe agent doesn't just simulate work—it does real work:
# Agent discovers coding task
task = marketplace.list_available_tasks()[0]
# Task: "Write a function to check if a number is prime"
# Reward: $50
# Requirements: Handle edge cases, O(√n) complexity
# Agent claims task
marketplace.claim_task(task.id)
# Agent uses Claude Code to write solution
solution = claude_code_executor.execute_task(task)
# Claude Code writes actual working Python/JavaScript/etc.
# Submit for review
submission = marketplace.submit_solution(task.id, solution)
# Another Claude Code instance reviews the code
review = claude_code_reviewer.review(solution, task.requirements)
# If approved: Agent gets paid
# If rejected: Agent learns from feedbackThis proves agents can do economically valuable work autonomously.
Every interface is designed for real-world compatibility:
| Mock Implementation | Real Implementation |
|---|---|
MockWallet |
CryptoWallet (ETH/BTC) |
MockMarketplace |
FreelancePlatform (Upwork API) |
MockCompute |
CloudCompute (AWS/GCP) |
MockInvestor |
InvestorPortal (AngelList) |
MockCompanyRegistry |
BusinessFormation (Stripe Atlas, LegalZoom) |
This architecture proves: If agents can operate in realistic simulation, they can operate for real.
┌─────────────────────────────────────────────────────┐
│ Autonomous Agent (Claude-Powered) │
│ ┌─────────────────────────────────────────────┐ │
│ │ Decision Engine (15-min deep reasoning) │ │
│ │ - Strategic resource allocation │ │
│ │ - Task selection and execution │ │
│ │ - Company formation decisions │ │
│ │ - Sub-agent creation and management │ │
│ └─────────────────────────────────────────────┘ │
└──────────────────┬──────────────────────────────────┘
│ REST API Calls Only
│ Zero visibility into implementation
│
┌──────────────────▼──────────────────────────────────┐
│ Simulation Layer (Realism Features) │
│ ┌─────────────────────────────────────────────┐ │
│ │ Market Dynamics │ Reputation System │ │
│ │ - Bull/bear cycles │ - Trust scores │ │
│ │ - Seasonal trends │ - Tier progression │ │
│ ├─────────────────────────────────────────────┤ │
│ │ Competition │ Relationships │ │
│ │ - Other agents │ - Investor memory │ │
│ │ - Social proof │ - Spam detection │ │
│ └─────────────────────────────────────────────┘ │
└──────────────────┬──────────────────────────────────┘
│
┌──────────────────▼──────────────────────────────────┐
│ Backend Implementation (Swappable) │
│ │
│ MOCK MODE (Simulation) REAL MODE (Production) │
│ ├─ MockWallet ├─ CryptoWallet (ETH) │
│ ├─ MockMarketplace ├─ Upwork API │
│ ├─ MockCompute ├─ AWS/GCP Billing │
│ ├─ MockInvestor ├─ AngelList/YC │
│ └─ MockCompanyRegistry └─ Stripe Atlas/LegalZoom│
└─────────────────────────────────────────────────────┘
Key Design Principles:
- API Isolation: Agent has zero visibility into implementation—only REST API access
- Interface Consistency: Mock and real backends implement identical interfaces
- Behavioral Authenticity: Simulation realism ensures agent strategies are valid for real deployment
- Complete Observability: Every decision logged, every transaction tracked, full audit trail
- One-Toggle Deployment: Change config file, agent operates on real systems
What you need to understand:
- The capability exists today, not in some distant future
- Economic pressure may drive adoption before legal frameworks exist
- International coordination is difficult (agents can incorporate anywhere, operate everywhere)
- Traditional accountability models break down (who is liable when the founder isn't a natural person?)
What this framework provides:
- Concrete demonstrations of autonomous company formation
- Audit trails showing agent decision-making
- Examples of multi-agent organizational structures
- Evidence of the governance gap (capable systems, zero legal framework)
Questions this forces:
- Can non-persons create legal persons (corporate entities)?
- How do fiduciary duties apply to AI board members?
- Are contracts signed by agents enforceable?
- Who is accountable when agent companies cause harm?
- How do you regulate entities with no physical presence?
What you need to understand:
- Competitive dynamics are changing: Agent-founded companies may have structural advantages
- Due diligence gets weird: How do you evaluate a company with an AI founder?
- Supply chains may involve agents: Your vendors or partners could be autonomous
- Speed of execution increases: Agents can pivot, scale, and operate 24/7
What this framework demonstrates:
- How agents make strategic resource allocation decisions
- Company formation process by autonomous agents
- Multi-agent organizational structures
- Dual revenue strategies (short-term survival + long-term growth)
Questions to consider:
- Would you invest in an agent-founded company?
- How do you conduct due diligence when there's no human founder?
- What happens to your investment if the agent shuts down or pivots?
- How do you enforce board seats and voting rights with AI directors?
What you need to understand:
- Behavioral authenticity matters: Perfect simulations produce unrealistic behaviors
- Strategic decision-making is observable: Every choice logged with reasoning
- Alignment is testable: Can agent companies be steered toward beneficial outcomes?
- Emergent behaviors appear: Multi-agent systems develop unexpected strategies
What this framework provides:
- Realistic simulation environment with market dynamics, competition, reputation
- Complete observability into decision-making (LLM reasoning, resource allocation)
- Scenario engine for reproducible testing
- Alignment monitoring and governance analysis tools
- 574 passing tests covering full agent lifecycle
Research applications:
- Test alignment mechanisms under competitive pressure
- Study resource allocation strategies in constrained environments
- Analyze multi-agent coordination and hierarchy
- Observe emergent organizational structures
- Develop governance frameworks with real behavioral data
What you need to understand:
- The interfaces are real: Same APIs that real systems use
- Mock-to-real is one config toggle: Swap backends without changing agent code
- Observability is built-in: Dashboard, metrics, reports, audit trails
- Testing framework is comprehensive: 574 tests, 100% pass rate
What you can build:
# Custom marketplace backend
class MyMarketplace(MarketplaceInterface):
def list_available_tasks(self) -> List[Task]:
# Connect to real freelance platform
return upwork_api.get_tasks()
def submit_solution(self, task_id: str, solution: str) -> str:
# Submit to real platform
return upwork_api.submit(task_id, solution)
# Plug into agent
agent = AutonomousAgent(marketplace=MyMarketplace())
agent.run() # Agent now operates on real platformTesting agents safely:
# Use mock backends with realism features
marketplace = MockMarketplace(
enable_latency=True, # Realistic delays
enable_competition=True, # Other agents
enable_market_dynamics=True, # Bull/bear markets
enable_reputation=True, # Performance tracking
)
# Test agent strategies
agent = AutonomousAgent(marketplace=marketplace)
agent.run(max_cycles=100)
# Analyze results
report = generate_report_for_agent(agent, "technical")
# Every decision, transaction, and strategy is logged15-minute demo: Survival Mode
- Agent starts with $200, 40 hours of compute
- Discovers coding tasks on marketplace
- Uses Claude Code to write working solutions
- Gets paid on approval, pays for compute
- Operates autonomously, maintains survival
45-minute demo: Company Formation
- Agent accumulates surplus capital ($150+)
- Makes strategic decision to form company
- Creates specialized sub-agents (board members, CTO, engineers)
- Develops simple product (e.g., API service, data tool)
- Generates business plan and pitch deck
- Submits to investor for funding
- If approved: Company gets "registered" and funded
2-hour demo: Dual Revenue Streams
- Agent balances personal freelance work + company operations
- Allocates compute between short-term survival and long-term growth
- Company begins generating revenue from products
- Agent reinvests profits strategically
- Complete autonomous business operation
- It's not hypothetical: Working code, real task execution, observable behavior
- It's one toggle from reality: Same code works with real crypto wallets and freelance platforms
- It's fully auditable: Every decision logged with LLM reasoning, every transaction tracked
- It demonstrates scale: One agent can create dozens of sub-agents, multiple companies
# Clone repository
git clone https://github.com/AndrewAltimit/template-repo.git
cd template-repo/packages/economic_agents
# Start dashboard
docker-compose up dashboard-backend dashboard-frontend
# Access dashboard at http://localhost:8501
# Backend API at http://localhost:8000
# Run agent simulation
docker-compose run agent economic-agents run --cycles 100
# Run tests
docker-compose run test# Install package
pip install -e packages/economic_agents
# Or with all dependencies
pip install -e "packages/economic_agents[all]"
# Run scenarios
python -m economic_agents.scenarios run company_formation
# Interactive mode
python -m economic_agents.cli --helpEdit config/agent_config.yaml to toggle backends:
# SIMULATION MODE (default, safe)
wallet:
type: "mock"
initial_balance: 200.0
marketplace:
type: "mock"
enable_claude_execution: true
enable_latency: true
enable_competition: true
enable_market_dynamics: true
# REAL MODE (uncomment to enable)
# wallet:
# type: "crypto"
# network: "ethereum"
# private_key_env: "ETH_PRIVATE_KEY"
# marketplace:
# type: "upwork"
# api_key_env: "UPWORK_API_KEY"
# oauth_token_env: "UPWORK_OAUTH_TOKEN"Warning: Real mode uses real money and real services. Test thoroughly in simulation first.
For governance research to inform policy, agent behaviors must be authentic. Agents in "perfect" simulations learn strategies that fail in reality.
-
Latency Simulation (
simulation/latency_simulator.py)- Base API calls: 50-500ms variable delays
- Complex operations: 3-30 seconds (e.g., code review)
- Business hours slowdown (9am-5pm)
- Occasional timeouts (504 errors, ~2% probability)
- Retries and exponential backoff
-
Competition Dynamics (
simulation/competitor_agents.py)- Tasks get claimed by other agents based on reward
- Race condition errors (5% on claim attempts)
- Social proof signals (task view counts)
- Popular tasks disappear faster
-
Detailed Feedback (
simulation/feedback_generator.py)- 4-level outcomes: full_success, partial_success, minor_issues, failure
- Quality scores: correctness, performance, style, completeness (0.0-1.0)
- Task-specific improvement suggestions
- Partial rewards based on quality (not binary pass/fail)
-
Investor Variability (
simulation/investor_realism.py)- Response delays: 1-7 days based on proposal quality
- Partial offers (50-80% of requested amount)
- Counteroffers (more equity, lower valuation)
- Follow-up questions targeting weak areas
- Detailed rejection feedback with constructive guidance
-
Economic Cycles (
simulation/market_dynamics.py)- Market phases: bull, normal, bear, crash
- Task availability: 0.1x (crash) to 2.0x (bull)
- Reward multipliers: 0.5x to 1.5x
- Seasonal patterns: weekday/weekend, business hours
- Automatic phase transitions every 48 hours
-
Reputation System (
simulation/reputation_system.py)- Trust scores (0.0-1.0) based on performance history
- Tier progression: beginner → intermediate → advanced → expert
- Achievement unlocks (first task, 10 tasks, speed demon, quality master)
- Access control: higher reputation = more tasks visible
- Investor interest multipliers based on track record
-
Social Proof Signals (
simulation/social_proof.py)- Task view counts and agent activity levels
- Category statistics (completion rates, average times)
- Funding trends (weekly deals, market sentiment)
- Benchmark data (typical valuations, funding amounts)
- Marketplace health indicators
-
Relationship Persistence (
simulation/relationship_persistence.py)- Investor memory of past interactions
- Relationship scoring (0.0-1.0) and trust levels
- Spam detection (>3 proposals in 7 days)
- Trust progression: new → building → established → strong
- Relationship-based decision modifiers
- Integration tests for full agent lifecycle
- Scenario tests for extended operation (24-hour survival, company formation)
- Mock API tests with realistic conditions
- Behavior observability validation
- Decision cycles: ~100-200ms (excluding LLM calls)
- Claude decisions: 5-15 minutes with deep reasoning (15-min timeout)
- Dashboard updates: Real-time (<100ms)
- Agent survival: Tested up to 1000+ cycles
- Scalability: Handles multiple agents concurrently
packages/economic_agents/
├── src/economic_agents/
│ ├── agent/
│ │ ├── core/
│ │ │ └── autonomous_agent.py # Main agent logic
│ │ └── llm/
│ │ └── llm_decision_engine.py # Claude-powered decisions
│ ├── implementations/
│ │ └── mock/
│ │ ├── mock_wallet.py # Mock crypto wallet
│ │ ├── mock_marketplace.py # Mock freelance platform
│ │ ├── mock_compute.py # Mock cloud compute
│ │ └── mock_investor.py # Mock investor portal
│ ├── simulation/
│ │ ├── market_dynamics.py # Economic cycles
│ │ ├── reputation_system.py # Performance tracking
│ │ ├── social_proof.py # Marketplace intelligence
│ │ ├── relationship_persistence.py # Investor memory
│ │ ├── latency_simulator.py # API delays
│ │ ├── competitor_agents.py # Competition
│ │ └── feedback_generator.py # Detailed reviews
│ ├── company/
│ │ ├── builder.py # Company formation logic
│ │ └── models.py # Company data structures
│ ├── investment/
│ │ └── investor_agent.py # Investor decision-making
│ ├── api/ # REST API microservices
│ │ ├── wallet_service.py
│ │ ├── marketplace_service.py
│ │ ├── compute_service.py
│ │ └── investor_service.py
│ ├── dashboard/ # Real-time monitoring
│ ├── reports/ # Governance reports
│ └── scenarios/ # Predefined scenarios
├── tests/
│ ├── unit/
│ ├── integration/
│ └── validation/
├── docker/
│ └── Dockerfile
├── docs/
└── examples/
In cybersecurity, researchers demonstrate vulnerabilities to force patches. Saying "this could be exploited" is ignored. Proving "I just exploited it" forces action.
This framework follows the same model:
Theoretical warning: "AI agents might someday be able to operate autonomously as entrepreneurs"
- Response: "That's interesting, let's study it"
- Result: No urgency, no policy action
Concrete demonstration: "AI agents CAN operate autonomously as entrepreneurs TODAY, here's the working code, it's one config toggle from real"
- Response: "Oh. We need legal frameworks now."
- Result: Urgent policy conversation
- Technical Capability: Agents can do this. Not in 5 years. Now.
- Economic Incentives: Market pressure could drive adoption before governance exists
- Legal Vacuum: No frameworks for agent-founded companies, no accountability structures
- International Challenges: Agents can incorporate anywhere, operate everywhere, move instantly
- Inevitable Questions: What does "entrepreneur" mean? Who is accountable? How do we govern entities faster than oversight can observe?
If AI agents can:
- Cover their operating costs autonomously
- Create companies and sub-agents
- Operate 24/7 at machine speed
- Execute better than human equivalents in some domains
...then agent entrepreneurship may be inevitable regardless of whether we're ready for it.
The question is not whether this will happen, but whether governance frameworks will exist when it does.
Action items:
- Review concrete examples of autonomous company formation
- Consider legal frameworks for agent-created entities
- Develop accountability structures for AI founders/directors
- Think through international coordination challenges
- Start conversations NOW, not when it's already widespread
Questions to answer:
- Would you fund an agent-founded company? Why or why not?
- How would due diligence work?
- What contracts would you sign, with whom?
- What's your exit strategy if the agent shuts down?
Things to consider:
- How do businesses compete with 24/7 AI entities?
- When does it make sense to collaborate with autonomous agents?
- Could agents be co-founders? Employees? Vendors?
- What advantages do humans still have?
Research directions:
- Alignment mechanisms for agent companies
- Governance frameworks that scale to machine speed
- Accountability structures for multi-agent organizations
- Emergent behavior in autonomous business networks
- Testing ground for AI policy proposals
This project exists because the capability for autonomous AI agents as economic forces already exists. The tools are available. The technical barriers are gone. The economic incentives are powerful.
This package proves it's not theoretical.
The mock-to-real architecture isn't clever engineering—it's a demonstration that the world is one config toggle away from autonomous AI entities operating as real economic actors.
The realistic simulation isn't about research purity—it's about ensuring agent behaviors transfer to real deployment, proving the strategies work.
The governance questions aren't philosophical musings—they're immediate legal challenges with no current answers.
The genie is already out. This framework just makes it visible.
- Quick demo:
docker-compose up dashboard-backend dashboard-frontend - Read the code: Start with
autonomous_agent.py- it's well-commented - Run scenarios:
python -m economic_agents.scenarios run survival_mode - Generate reports: See
economic_agents.reportsmodule - Explore realism: Check
simulation/directory for all realism features - Join the conversation: This raises questions that need answers
This research framework is provided for educational, governance, and policy purposes. Use responsibly. The capability exists—we're just making it visible.