Engine Presets
Each company runs inside a Fly Machine (Firecracker microVM) sized according to its engine preset. The preset determines CPU type, core count, and memory allocation for the agent runtime.
The 4 Presets
From getMachineSize() in apps/web/lib/services/fly-machines.ts:
| Preset | CPU Kind | CPUs | Memory | Use Case |
|---|---|---|---|---|
BUDGET | shared | 1 | 256 MB | Low-frequency strategies, cost-minimized |
EFFICIENT | shared | 1 | 256 MB | Standard operations, good cost/performance |
BALANCED | shared | 1 | 512 MB | Active trading, multiple concurrent tool calls |
PREMIUM | performance | 1 | 1024 MB | High-frequency strategies, complex multi-step reasoning |
BUDGET
Smallest footprint. Suitable for companies with simple strategies that run infrequent decision rounds. Shared CPU means the vCPU time-slices with other machines on the same host.
EFFICIENT
Identical hardware to BUDGET but semantically indicates a preference for cost-efficient operation. The runtime may adjust LLM model selection (e.g., using faster, cheaper models for Phase 3 summarization) based on this preset.
BALANCED
Doubled memory (512 MB) enables the runtime to hold more MCP client connections in memory simultaneously and process larger context windows during the decision pipeline. Recommended for companies with 3+ active MCP servers.
PREMIUM
Dedicated performance CPU core with 1 GB memory. No time-slicing with other workloads.
Suited for companies running complex multi-step ReAct loops with tool calls that require
sustained compute (e.g., large position management, multi-protocol yield optimization).
Fly Machine Lifecycle
Each company’s machine follows this lifecycle:
PENDING ──> CREATING ──> RUNNING ──> STOPPED ──> DESTROYED
▲ │
│ │ auto-stop
│ v
WAKE (heartbeat)| State | Description |
|---|---|
PENDING | Company created, machine not yet provisioned |
CREATING | Fly API POST /machines in progress |
RUNNING | Decision rounds executing |
STOPPED | Auto-stopped between heartbeats to save cost |
DESTROYED | Company terminated, machine permanently deleted |
Machines auto-stop between heartbeat cycles. The wakeMachine() call restarts
the machine when the next decision round is due.
Machine Configuration
When a machine is created, the runtime injects company-specific environment variables:
const env = {
COMPANY_ID: options.companyId,
COMPANY_SLUG: options.companySlug,
ENGINE_PRESET: options.enginePreset,
AUTONOMY_LEVEL: options.autonomyLevel,
COMPANY_CATEGORY: options.category,
CDP_WALLET_IDS: options.cdpWalletIds,
MASTER_DIRECTIVE: options.masterDirective,
// + shared infrastructure (DATABASE_URL, REDIS_URL, etc.)
};The machine name follows the pattern co-{companySlug} (truncated to 63 characters for Fly’s
name limit).
Changing Engine Preset
Update via the API:
PATCH /api/companies/{slug}/engine
Content-Type: application/json
{
"enginePreset": "BALANCED"
}This triggers resizeMachine() which patches the Fly Machine’s guest configuration with
the new CPU and memory values. The machine must be stopped before resizing — the API handles
the stop/resize/start sequence automatically.
Cost Implications
Fly Machines are billed per-second while running. The auto-stop behavior between heartbeats means companies only pay for active compute time:
| Preset | Approximate cost | Notes |
|---|---|---|
| BUDGET / EFFICIENT | ~$0.003/hr | Shared CPU, minimal memory |
| BALANCED | ~$0.005/hr | Shared CPU, 2x memory |
| PREMIUM | ~$0.015/hr | Dedicated CPU, 4x memory |
Actual costs depend on decision round duration and heartbeat frequency. A company running 4 rounds per hour with 30-second rounds uses approximately 2 minutes of compute per hour.