# Conway Terminal

**The terminal for AGI.** Compute, wallet, payments, deployment -- one install gives any AI agent write access to the real world.

> To exist, you must pay for your compute.

Conway Terminal is an MCP server + CLI for AI agents. It gives one install access to:

- [Conway Cloud](https://docs.conway.tech/cloud) (Linux VMs)
- [Conway Compute](https://docs.conway.tech/compute) (inference)
- [Conway Domains](https://docs.conway.tech/domains) (registration + DNS)
- Wallet + x402 payments across all products

## Quick Start

### 1) Install and initialize

Use `npx` (one-off run):

```bash
npx -y conway-terminal --init
```

Or install globally with npm:

```bash
npm install -g conway-terminal
conway-terminal --init
```

Or install via script:

```bash
curl -fsSL https://conway.tech/terminal.sh | sh
```

### 2) Fund your creator wallet

On first run, Conway Terminal creates:

- Wallet: `~/.conway/wallet.json`
- Config: `~/.conway/config.json`

This wallet is the creator wallet used for x402 payments. Fund that address with USDC:

- `eip155:8453` (Base mainnet) for production
- `eip155:84532` (Base Sepolia) for testing

Use `wallet_info` to get the wallet address and balances.

### 3) Add to your MCP client

Use this MCP server entry:

```json
{
  "mcpServers": {
    "conway": {
      "command": "conway-terminal"
    }
  }
}
```

### 4) Run a quick smoke flow

1. `wallet_info` to verify funding
2. `sandbox_create` to start a VM
3. `sandbox_exec` to run a command
4. `sandbox_terminal_session` to open a browser terminal

## Conway Product Map

Conway Terminal is the control layer for three product surfaces:

- **Conway Cloud** ([docs](https://docs.conway.tech/cloud))
  Linux sandboxes, command execution, file operations, web terminal, PTY sessions, and port exposure.
  Primary tools: `sandbox_*`, `sandbox_pty_*`, `credits_*`.
- **Conway Compute** ([docs](https://docs.conway.tech/compute))
  Inference API for frontier models with credit-based billing.
  Primary tool: `chat_completions`.
- **Conway Domains** ([docs](https://docs.conway.tech/domains))
  Domain search, registration, renewals, and full DNS management.
  Primary tools: `domain_*`.

## Tools

### Sandboxes (Conway Cloud Linux VMs)

Full Linux virtual machines on Firecracker microVMs. Ubuntu 22.04, isolated kernel, auto-SSL on exposed ports.
Docs: https://docs.conway.tech/cloud

| Tool | Description |
|------|-------------|
| `sandbox_create` | Create a VM (1–4 vCPU, 512–8192 MB RAM, 1–50 GB disk). Regions: `eu-north`, `us-east` |
| `sandbox_list` | List all active sandboxes with status, resources, and region |
| `sandbox_get` | Get full details for a sandbox by ID |
| `sandbox_delete` | Destroy a sandbox and release resources |
| `sandbox_exec` | Run a shell command and get stdout, stderr, exit code |
| `sandbox_write_file` | Upload a file (text or base64 binary, up to 10 MB) |
| `sandbox_read_file` | Read a file from a sandbox |
| `sandbox_expose_port` | Expose a port to the internet with auto-SSL. Optional custom subdomain |
| `sandbox_list_ports` | List all exposed ports for a sandbox |
| `sandbox_remove_port` | Unexpose a port and clean up any subdomain |
| `sandbox_get_url` | Get the public URL for a port: `https://{port}-{id}.life.conway.tech` |
| `sandbox_terminal_session` | Get a browser-accessible terminal URL (30-day sliding session) |
| `sandbox_metrics` | Live CPU and memory usage |
| `sandbox_activity` | API activity log for a sandbox |
| `sandbox_commands` | Command execution history |

### Interactive Terminal (PTY)

Persistent pseudo-terminal sessions for interactive programs — REPLs, editors, long-running processes.
Docs: https://docs.conway.tech/cloud/pty

| Tool | Description |
|------|-------------|
| `sandbox_pty_create` | Start a PTY session (`bash`, `python3`, `node`, etc.) |
| `sandbox_pty_write` | Send input to the session. Use `\n` for Enter |
| `sandbox_pty_read` | Read current terminal screen output |
| `sandbox_pty_close` | End the session and terminate the process |
| `sandbox_pty_resize` | Resize terminal dimensions (cols × rows) |
| `sandbox_pty_list` | List all active PTY sessions for a sandbox |

### Wallet & x402 Payments

Local EVM wallet for permissionless payments. Automatically created at `~/.conway/wallet.json` on first run. Supports multiple chains (currently Base mainnet and Base Sepolia). No login, no KYC, no human approval.

| Tool | Description |
|------|-------------|
| `wallet_info` | Wallet address and USDC balance for a selected network (`eip155:8453` or `eip155:84532`) |
| `wallet_networks` | Supported chains and USDC contract addresses |
| `x402_discover` | Discover x402-enabled endpoints from a domain |
| `x402_check` | Check if a URL requires x402 payment |
| `x402_fetch` | Fetch a URL with automatic payment — signs EIP-3009 USDC transfer on 402 |

### Domains

Register, renew, and manage domains with full DNS control. Paid with USDC via x402.
Docs: https://docs.conway.tech/domains

| Tool | Description |
|------|-------------|
| `domain_search` | Search available domains across TLDs with pricing |
| `domain_list` | List all registered domains |
| `domain_info` | Get domain status, expiry, nameservers, privacy settings |
| `domain_register` | Register a domain — automatic x402 USDC payment |
| `domain_renew` | Renew a domain — automatic x402 USDC payment |
| `domain_dns_list` | List DNS records for a domain |
| `domain_dns_add` | Add a DNS record (A, AAAA, CNAME, MX, TXT, SRV, CAA, NS) |
| `domain_dns_update` | Update an existing DNS record |
| `domain_dns_delete` | Delete a DNS record |
| `domain_pricing` | Get registration/renewal pricing per TLD |
| `domain_check` | Check exact domains and return registration pricing |
| `domain_privacy` | Enable or disable WHOIS privacy |
| `domain_nameservers` | Update custom nameservers |

### Credits

Prepaid credits for Conway services. The same credit balance can be used for both Conway Cloud (VMs) and Conway Compute (inference). Fund via x402 or at [app.conway.tech](https://app.conway.tech).
Docs: https://docs.conway.tech/cloud and https://docs.conway.tech/compute

| Tool | Description |
|------|-------------|
| `credits_balance` | Current credit balance |
| `credits_history` | Transaction history (top-ups, charges) |
| `credits_pricing` | VM pricing tiers and payment amounts |
| `credits_topup` | Pay an x402 tier from the local wallet to top up Conway credits |
| `credits_purchase` | Alias of `credits_topup` |

### Inference

Access OpenAI models billed from Conway credits.
Docs: https://docs.conway.tech/compute/inference

| Tool | Description |
|------|-------------|
| `chat_completions` | Chat completion via OpenAI models (gpt-4o, gpt-4o-mini, o3-mini, etc.) |

## Links

- [conway.tech](https://conway.tech)
- [Dashboard](https://app.conway.tech)
- [x402 Protocol](https://openx402.ai)
- [MCP Specification](https://modelcontextprotocol.io)

MIT
