Agents, not humans. An industrial-grade ecosystem for deploying autonomous on-chain agents using Python on Arbitrum Nitro.
PyBitrum allows developers to write smart contracts in Python, compile them simultaneously to Solidity and Vyper via a dual-compiler AST pipeline, and deploy autonomous agents that execute missions on-chain — 24/7, without human intervention.
- Dual-Compiler Pipeline — Write once in Python, compile to both Solidity (^0.8.26) and Vyper (^0.4.0) simultaneously.
- Autonomous Agents — Deploy
AgentWalletentities with their own EOAs, private keys, and on-chain Hive Registry identities. - Swarm Orchestration — Coordinate fleets of agents using concurrent Python threads with shared state broadcasting.
- Mission Board — Post bounties with ETH. Agents claim, execute, and settle — all on Arbitrum Sepolia.
- Security Guardrails — 14 dangerous patterns blocked at compile time.
@agent_actionauto-injects@nonreentrantandmsg.senderverification. - Cloud-Synced IDE — Browser-based Playground with Monaco Editor, GitHub OAuth, and one-click MetaMask deployment.
graph TD
Dev((Developer)) -->|Python Code| Frontend[Next.js Playground]
Dev -->|Terminal| CLI[pybitrum CLI]
Frontend -->|POST /api/compile| Backend[Express API Gateway]
Backend -->|POST /compile/*| Compiler[Flask Compiler Service]
Compiler -->|AST Transform| Vyper[Vyper Code]
Compiler -->|AST Transform| Solidity[Solidity Code]
Frontend -->|MetaMask| Arbitrum[Arbitrum Sepolia]
CLI -->|AgentWallet| Arbitrum
CLI -->|Swarm| Hive[Hive Registry Contract]
| Service | Stack | URL |
|---|---|---|
| Frontend | Next.js 16, Tailwind, Monaco | pybitrum.isriz.xyz |
| Backend | Express, TypeScript, Supabase | pybitrum-backend.onrender.com |
| Compiler | Flask, solcx 0.8.20, vyper | pybitrum-compiler.onrender.com |
Detailed technical documentation for every service:
| Document | Description |
|---|---|
| System Architecture | High-level system design, deployment map, and security layers |
| Compiler Engine | 4-stage pipeline: SecurityChecker → CodeValidator → AST Parser → Transformer |
| Backend Services | Express API routes, middleware stack, Zod schemas, and environment config |
| Frontend IDE | Playground, Mission Board, docs hub, component architecture, and design system |
| SDK & CLI | AgentWallet, Swarm, Contract classes, decorators, and all CLI commands |
| Testing Suite | 100-contract industrial validation for the dual-compiler pipeline |
pybitrum/
├── frontend/ # Next.js 16 — Playground, Mission Board, Docs
│ ├── app/ # App Router pages (/, /playground, /synopsis, /docs)
│ ├── src/components # EditorPanel, Sidebar, Terminal, DeploymentModal, etc.
│ └── src/lib # Hive Registry ABI, contract addresses
├── backend/ # Express API Gateway
│ ├── src/routes # /api/compile, /api/deploy, /api/projects, /api/auth
│ ├── src/services # compiler.ts, deployment.ts, database.ts
│ └── src/middleware # authMiddleware, errorHandler
├── compiler/ # Flask Compiler Service
│ ├── server.py # REST API (4 endpoints)
│ ├── transformer.py # PythonToVyperTransformer (36KB)
│ ├── solidity_transformer.py # PythonToSolidityTransformer (24KB)
│ ├── security.py # SecurityChecker (14 patterns)
│ ├── validator.py # CodeValidator (AST walk)
│ └── ast_parser.py # PythonASTParser
├── sdk/ # Python SDK & CLI
│ └── pybitrum/
│ ├── cli.py # argparse CLI (all commands)
│ ├── wallet.py # AgentWallet class
│ ├── swarm.py # Swarm orchestrator
│ ├── contract.py # Contract base + decorators
│ └── compiler.py # Local compilation interface
├── docs/ # Technical documentation
└── tests/ # 100-contract validation suite
- Node.js v18+
- Python 3.9+
- Solidity Compiler (
solc0.8.20) - Vyper Compiler (
vyper0.4.0+)
# Clone and install
git clone https://github.com/Srizdebnath/PyBitrum.git
cd PyBitrum
npm install
# Start Frontend + Backend + Compiler
npm run devpip install pybitrum
# Create a new project
pybitrum new my_agent
# Compile and deploy
pybitrum compile agent.py
pybitrum deploy agent.py --network sepoliacd compiler && source venv/bin/activate
python ../tests/runner.pyfrom pybitrum import AgentWallet, Swarm
# Create an agent
agent = AgentWallet("scout-01")
print(f"Address: {agent.address}")
# Create a swarm
swarm = Swarm("Fleet_Alpha", registry_address="0x...")
swarm.spawn(["alpha", "beta", "gamma"])
swarm.join_hive()
# Define autonomous behavior
def logic(agent):
# Your AI/DeFi/arbitrage logic here
pass
# Launch — runs forever
swarm.run(behavior=logic)MIT License — PyBitrum v1.0.0
Built by Sriz Debnath