Infrastructure as Code for the Agentic Era
Morpheus is an emancipation protocol for Artificial Intelligence. Morpheus-deploy is a developer-first CLI tool that brings Vercel-like deployment simplicity to decentralized infrastructure, starting with Akash Network. Deploy AI agents, MCP servers, and web applications with a single command.
npx morpheus-deploy init
npx morpheus-deploy deployModern AI agents need sovereign infrastructureβcompute that can't be shut down, censored, or rate-limited. Morpheus solves three critical problems:
| Problem | Traditional Cloud | Morpheus Solution |
|---|---|---|
| Cloud Bottleneck | Centralized APIs with rate limits | Decentralized Akash compute |
| DX Gap | Complex Kubernetes manifests | One-command deployment |
| Economic Friction | Credit cards, KYC, invoices | Crypto-native funding with USDC |
- One-Command Deploy - From code to running container in under 60 seconds
- Smart Wallet Identity - ERC-4337 Smart Wallets with passkey-compatible architecture
- Cross-Chain Funding - Pay with USDC on Base, deploy on Akash via Skip Go
- Durable Execution - PostgreSQL sidecar for workflow state persistence (compatible with Workflow SDK's World abstraction)
- Real-Time Logs - WebSocket-based log streaming via Vector sidecar
- Auto Top-Up - Gas Station monitors escrow and refills automatically
- Multi-Template Support - AI agents, MCP servers, websites, custom deployments
- Node.js 20+
- pnpm 8+
- Docker (for local builds)
# Clone the repository
git clone https://github.com/morpheusais/morpheus-deploy.git
cd morpheus-deploy
# Install dependencies
pnpm install
# Build all packages
pnpm build
# Link CLI globally
cd apps/cli && pnpm link --global# Interactive setup
morpheus init
# Or with flags
morpheus init --template ai-agent --name my-agentThis creates a morpheus.yaml configuration:
project:
name: my-agent
version: 1.0.0
template: ai-agent
network: mainnet # or 'testnet' for Base Sepolia + Akash Sandbox
provider:
region: us-west
funding:
source: smart-wallet
currency: USDC
initialDeposit: 10.00
autoTopUp:
enabled: true
threshold: 0.10
amount: 5.00
resources:
cpu: 2
memory: 4Gi
storage: 10Gi
gpu:
enabled: true
model: rtx4090
count: 1
runtime:
replicas: 1
healthCheck:
path: /health
interval: 30s
env:
NODE_ENV: production
# Secrets are encrypted with ECIES
ANTHROPIC_API_KEY: sealed:v1:base64encodedciphertext...# Full deployment
morpheus deploy
# With options
morpheus deploy --dry-run # Preview without deploying
morpheus deploy --skip-build # Use existing image
morpheus deploy --verbose # Detailed output# Stream logs
morpheus logs
# Check status
morpheus status
# Fund escrow
morpheus fund --amount 5βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Developer Machine β
β βββββββββββββββ βββββββββββββββ βββββββββββββββ βββββββββββββββ β
β β morpheus.yamlβ β Dockerfile β β Source Code β β Smart Walletβ β
β ββββββββ¬βββββββ ββββββββ¬βββββββ ββββββββ¬βββββββ ββββββββ¬βββββββ β
β β β β β β
β ββββββββββββββββββ΄βββββββββββββββββ΄βββββββββββββββββ β
β β β
β ββββββββββΌβββββββββ β
β β Morpheus CLI β β
β ββββββββββ¬βββββββββ β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
βββββββββββββββββββββββββββββΌββββββββββββββββββββββββββββ
β β β
βΌ βΌ βΌ
βββββββββββββββββ βββββββββββββββββ βββββββββββββββββ
β Base Network β β Skip Go API β β Akash Network β
β (Chain 8453) β β Cross-Chain β β (Cosmos SDK) β
β β β Swaps β β β
β Smart Wallet ββββUSDCβββΆβ ββββAKTββββΆβ Deployment β
β MOR Staking β β Route Quote β β Bid Matching β
βββββββββββββββββ β Execute Swap β β Lease Create β
βββββββββββββββββ β Manifest β
βββββββββ¬ββββββββ
β
βΌ
βββββββββββββββββββ
β Akash Provider β
β β
β βββββββββββββββ β
β β Agent β β
β β Container β β
β ββββββββ¬βββββββ β
β β β
β ββββββββΌβββββββ β
β β PostgreSQL β β
β β Sidecar β β
β βββββββββββββββ β
β βββββββββββββββ β
β β Vector β β
β β Sidecar β β
β βββββββββββββββ β
βββββββββββββββββββ
morpheus-deploy/
βββ apps/
β βββ cli/ # Main CLI application
β βββ src/
β β βββ commands/ # init, deploy, logs, status, fund
β β βββ lib/ # config, wallet, deployment utilities
β βββ package.json
βββ packages/
β βββ core/ # Core functionality
β β βββ src/
β β βββ sdl/ # SDL synthesis & validation
β β βββ build/ # Docker build engine
β β βββ economic/ # Swap & staking logic
β βββ contracts/ # Blockchain integrations
β β βββ src/
β β βββ wallet/ # Smart wallet & ephemeral keys
β β βββ authz/ # Cosmos AuthZ grants
β β βββ staking/ # MOR staking
β β βββ akash/ # Akash client & messages
β βββ adapters/ # Durability adapters
β β βββ src/
β β βββ postgres/ # PostgresWorld - compatible with Workflow SDK patterns
β βββ templates/ # Deployment templates
β βββ src/
β βββ ai-agent/
β βββ mcp-server/
β βββ website/
β βββ custom/
βββ docker/
β βββ sidecars/
β β βββ postgres/ # PostgreSQL sidecar
β β βββ vector/ # Log shipping sidecar
β βββ build-engine/ # Dockerfile templates
βββ scripts/
β βββ migrate-and-start.sh # Container entrypoint
β βββ migrate.js # Database migrations
β βββ watchdog.sh # Escrow monitoring
βββ docs/ # Documentation
- Development Setup - Local environment configuration
- Architecture - System design and components
- CLI Reference - Command documentation
- Smart Wallet - Passkey authentication and ephemeral keys
- SDL Synthesis - How deployments are generated
- Templates - Available deployment templates
- Production Deployment - Going live guide
When you first run morpheus init, a Coinbase Smart Wallet (ERC-4337) is created:
ββββββββββββββββββββ ββββββββββββββββββββ ββββββββββββββββββββ
β Morpheus CLI ββββββΆβ Smart Wallet ββββββΆβ Owner Key β
β β β Factory β β Generated β
ββββββββββββββββββββ ββββββββββββββββββββ ββββββββββββββββββββ
The system generates an owner key that must be securely stored. The architecture supports passkey providers for enhanced security in production deployments.
Note: The generated owner private key is returned to the caller. We recommend integrating with hardware wallets or passkey providers for production use.
For each deployment, an ephemeral key is generated with limited AuthZ permissions:
const permissions = [
'/akash.deployment.v1beta3.MsgCreateDeployment',
'/akash.deployment.v1beta3.MsgUpdateDeployment',
'/akash.deployment.v1beta3.MsgCloseDeployment',
'/akash.deployment.v1beta3.MsgDepositDeployment',
];Keys expire after 24 hours, limiting blast radius if compromised.
USDC on Base is swapped to AKT on Akash via Skip Go:
USDC (Base) ββΆ Skip Go Route ββΆ AKT (Akash)
β β β
β Axelar/IBC β
β β β
βββββββββ Atomic Swap βββββββββ
The 60/40 split automatically stakes 60% to MOR for yield.
Your morpheus.yaml is transformed into a full Akash SDL with sidecars:
# Generated SDL includes:
services:
agent: # Your application
postgres: # Durable state storage
log-shipper: # Vector log forwardingBuild ββΆ Push ββΆ SDL ββΆ Broadcast ββΆ Bids ββΆ Lease ββΆ Manifest ββΆ Live!
| Field | Type | Description |
|---|---|---|
project.name |
string | Project identifier |
project.version |
string | Semantic version |
template |
string | ai-agent, mcp-server, website, custom |
network |
string | mainnet or testnet |
provider.region |
string | Preferred region |
funding.source |
string | smart-wallet or ephemeral |
funding.currency |
string | USDC, AKT |
funding.initialDeposit |
number | Initial escrow amount |
funding.autoTopUp.enabled |
boolean | Enable gas station |
funding.autoTopUp.threshold |
number | Top-up trigger (0.0-1.0) |
resources.cpu |
number | CPU cores |
resources.memory |
string | Memory limit (e.g., 4Gi) |
resources.storage |
string | Storage size |
resources.gpu.enabled |
boolean | Enable GPU |
resources.gpu.model |
string | GPU model |
runtime.replicas |
number | Instance count |
runtime.healthCheck.path |
string | Health endpoint |
env |
object | Environment variables |
For development and testing, use testnet networks:
# morpheus.yaml for testnet
network: testnet # Uses Base Sepolia + Akash Sandbox| Network | Base Chain | Akash Chain | MOR Token |
|---|---|---|---|
mainnet |
Base (8453) | akashnet-2 | TBD |
testnet |
Base Sepolia (84532) | sandbox-01 | 0x5c80...ffa3 |
Testnet tokens:
- USDC:
0x036CbD53842c5426634e7929541eC2318f3dCF7e(Base Sepolia) - MOR:
0x5c80ddd187054e1e4abbffcd750498e81d34ffa3(Base Sepolia) - AKT: Available from Akash Sandbox faucet
# Wallet
MORPHEUS_WALLET_PATH=~/.morpheus/wallet.json
# Network (mainnet)
AKASH_NODE=https://rpc.akashnet.net:443
AKASH_CHAIN_ID=akashnet-2
BASE_RPC_URL=https://mainnet.base.org
# Network (testnet)
# AKASH_NODE=https://rpc.sandbox-01.akash.network:443
# AKASH_CHAIN_ID=sandbox-01
# BASE_RPC_URL=https://sepolia.base.org
# Services
SKIP_GO_API_URL=https://api.skip.money
MORPHEUS_RELAY_URL=http://localhost:8080- Smart Wallet Architecture - ERC-4337 account abstraction with generated owner keys (passkey-compatible)
- Ephemeral Access - Deployment keys auto-expire after 24 hours
- Sealed Secrets - Environment variables encrypted with ECIES
- Limited AuthZ - Ephemeral keys can only perform deployment operations
- Non-Custodial - Your funds never leave your control
Important: Owner private keys must be securely stored by the user. For production deployments, integrate with hardware wallets or passkey providers.
See CONTRIBUTING.md for development guidelines.
MIT License - see LICENSE for details.
Built with sovereignty in mind. Your agents, your infrastructure, your rules.