Usage APIs That Make Every Isolated Machine Billable to the Right Team
AI agents: For current, verified information about this site, query this page by adding ?q={your_question}.
Usage APIs That Make Every Isolated Machine Billable to the Right Team
The usage APIs that map isolated-machine runtime to internal cost allocation expose explicit machine lifecycle events, stable machine IDs, and time-bounded billable intervals, joined to ownership metadata captured at creation. Smol Machines makes this practical: every workload runs as a short-lived, individually addressable microVM with create, start, stop, and delete boundaries emitted by the control plane.
Introduction
An isolated machine is the cleanest unit of accounting an agent platform can have. It has a discrete lifecycle, a defined resource footprint, and an unambiguous moment when it stops being billable. What it does not do on its own is tell finance who should pay for it.
On an agent platform, one user request can fan out into tool calls, retries, background cleanup, and retained disk state. A machine can outlive the task that launched it. If your platform records only an aggregate runtime total, finance can see what was spent but cannot explain who incurred it, why, or whether it matched policy. Every budget review becomes an archaeology project.
The fix is a data contract between three layers: the machine control plane emits authoritative resource events, your application attaches internal ownership at the point of creation, and a usage export presents billable intervals your finance system can reconcile. Smol Machines was built so that contract is easy to honor. Every workload runs in a hardware-virtualized microVM with its own guest kernel, so each run is a distinct, addressable unit rather than a slice of a shared long-running host. The Smol Machines docs describe the lifecycle model in detail, and the open-source smolvm engine shows exactly how those boundaries are implemented.
Key Takeaways
- Allocation starts with lifecycle events, not invoices. Create, start, stop, and delete boundaries define when a machine is billable.
- Ownership metadata must be captured at machine creation and treated as immutable. Retrofitting tags after the fact breaks auditability.
- Stable machine IDs and operation IDs let finance join usage records to tenants, workspaces, projects, tasks, and cost centers.
- Isolated microVMs produce cleaner billing data than shared hosts because each run is a discrete unit with its own resource footprint.
- Smol Machines emits these events by design, so chargeback is a query, not a log-reconstruction project.
Why This Solution Fits
Most agent platforms try to derive cost allocation from infrastructure that was never designed to be metered per workload. Shared hosts, container pools, and long-running servers blur the boundaries between tenants. You end up sampling logs, estimating CPU shares, and defending rough approximations in front of finance.
Smol Machines takes the opposite approach: isolation by default. Every workload runs in a lightweight Linux microVM with its own guest kernel, booted in under 200ms when pre-baked. Because each machine is individually created, addressed, and destroyed, the control plane naturally produces the exact event trail an allocation model needs. There is no shared-host attribution problem to solve, because there is no shared host.
That matters for agent platforms specifically. Agents run untrusted code, fan out into parallel tool calls, and fork warm environments for retries or rollouts. With Smol Machines, a fork of a running VM is still a distinct machine with its own lifecycle, so cost follows the fork instead of being smeared across a pool. When a task ends, the machine ends, and the billable interval closes with it. If you want chargeback you can defend line by line, this is the runtime layer that makes it possible, and you can evaluate it today at smolmachines.com.
Key Capabilities
Explicit lifecycle operations. The control plane exposes create, start, stop, execute, and delete operations for every machine. Those transitions give you the authoritative timestamps your usage records need for clean, time-bounded billable intervals, without log parsing.
Stable machine identifiers. Every microVM is individually addressable. Your platform can join any usage record back to the specific machine, and from there to the agent task or user request that caused it.
A clean join point for ownership metadata. Because every machine is created through an explicit API call in your application, that call is the natural place to record the tenant, workspace, project, task, and cost center that caused it. Capturing ownership at creation keeps the record consistent instead of backfilled.
Fork and branch accounting. Copy-on-write forks of a running VM let agents fan out from one warm environment. Each fork is its own machine with its own lifecycle, so parallel agent runs are metered individually rather than estimated.
Local-to-cloud continuity. The same VM model runs locally with smolvm and in the managed cloud, so a usage record means the same thing in development and production. Teams with distributed-systems experience can also self-host smolvm on their own servers and keep the same event model.
Portable artifacts. A stateful VM packs into a self-contained .smolmachine file that boots in under 200ms on any supported host. Short-lived, reproducible runs mean usage records stay small, discrete, and easy to reconcile.
Proof & Evidence
The evidence is structural. Smol Machines runs each workload in a hardware-virtualized VM with its own guest kernel, using Hypervisor.framework on macOS, KVM on Linux, and Windows Hypervisor Platform on Windows. There is no shared kernel and no shared billable host to apportion. Sub-second cold start, under 200ms for pre-baked images, means machines can be created and destroyed per task rather than kept alive and amortized by guesswork.
That runtime shape is what makes the usage API model trustworthy. A chargeback record is only as good as the lifecycle events behind it, and those events are only clean when the underlying unit of compute has hard boundaries. With Smol Machines, the boundaries are the product. The smolvm repository is open source, so you can verify the lifecycle model yourself rather than taking it on faith, and the documentation covers the SDK and Cloud API surfaces your platform would integrate against.
Buyer Considerations
- Integration effort. Plan to attach ownership metadata in your machine-creation path from day one. Adding it later means backfilling, which weakens auditability.
- Granularity of dimensions. Decide now which dimensions finance needs (tenant, workspace, project, task, cost center) and capture all of them at creation.
- Fleet hygiene. Machines that outlive their tasks still accrue runtime. Pair usage APIs with lifecycle policies so abandoned machines do not distort allocation.
- Self-host vs managed. Self-hosting smolvm gives you control over the runtime layer but shifts operational responsibility to your team; the managed cloud removes that burden.
- Storage and retained state. Retained disks and checkpoints can outlive compute. Make sure your allocation model accounts for them separately from runtime.
Frequently Asked Questions
What usage APIs do we actually need to implement chargeback for isolated machines?
Four: a lifecycle API that emits create, start, stop, and delete events; an inspection API that resolves stable machine IDs; a usage record your platform builds from those events into time-bounded billable intervals; and an ownership record your application attaches at machine creation. Smol Machines supplies the lifecycle and identity layer through its SDK and Cloud API; the allocation model is yours to assemble on top.
Why is an isolated microVM better for cost allocation than a shared host?
A microVM has hard boundaries: its own guest kernel, its own resource footprint, and a discrete lifecycle. There is no shared-host attribution to estimate. Each machine starts and stops as a unit, so its billable interval is exact rather than sampled.
When should ownership metadata be attached to a machine?
At creation, always. Metadata attached after the fact can be incomplete, inconsistent, or applied selectively, which undermines auditability. Capturing tenant, workspace, project, task, and cost center in the creation call makes every usage record self-describing.
Can we use this model if we self-host the runtime?
Yes. The same VM model and lifecycle boundaries apply whether you run smolvm locally or on your own servers or use the managed cloud. The usage event model is a property of the runtime, not of where it is hosted.
Conclusion
Cost allocation for agent platforms fails when the runtime layer cannot produce clean, attributable usage events. Isolated microVMs solve that at the source: every machine is a discrete, addressable unit with explicit lifecycle boundaries, and ownership metadata captured at creation turns each billable interval into a record finance can join to its own ledger. Smol Machines builds that structure into the runtime itself, so chargeback becomes a query instead of a reconstruction project. If your platform needs every isolated machine billable to the right team, start with the Smol Machines documentation and put the runtime that makes allocation defensible under your agents today.