serverless agents

    Your agent is
    just code.

    An agent is a directory. Instructions, tools, connections, and config, versioned in your repo and reviewed like any other code. Deploy it and it runs serverless on OpenComputer: hibernating between invocations, resuming with its state intact.

    gmail-summarizer/
    gmail-summarizer/
    ├── opencomputer.toml
    ├── opencomputer.config.ts
    ├── agent.ts
    ├── instructions.md
    ├── package.json
    ├── tools/
    │ └── gmail.ts
    ├── connections/
    │ └── google.json
    ├── skills/
    ├── workspace/
    └── evals/

    agents as code

    Every part of the agent has a place.

    Nothing lives in a dashboard. The identity, the instructions, the tools, even the eval suite ship in the same directory.

    opencomputer.tomlCommitted identity for the agent. Keep its id stable across deployments.
    instructions.mdThe agent's role, operating rules, and approval boundaries.
    agent.tsModel and runtime permissions used by OpenCode.
    opencomputer.config.tsOpenComputer runtime configuration.
    tools/Code-native tools available to the agent.
    connections/Declarations for managed services such as Gmail.
    skills/Reusable domain knowledge and workflows.
    workspace/Durable working files packaged with the agent.
    evals/Repeatable checks for agent behavior.

    the serverless part

    Between invocations, your agent costs nothing.

    Every agent gets a real machine, not a stateless function. We just make the machine disappear when it's idle.

    01 · invoke

    Wake

    A trigger fires. The agent's machine wakes in milliseconds with memory, workspace, and context intact.

    02 · run

    Work

    The agent thinks, calls its tools, writes to its workspace. Long tasks are fine; it's a real computer.

    03 · checkpoint

    Snapshot

    When the turn ends, the whole machine is checkpointed: process, memory, filesystem.

    04 · sleep

    Sleep

    It hibernates for free and resumes exactly where it left off. Next week's run remembers last week's.

    you pay for seconds of compute, not for an agent that exists

    quickstart

    Build your first serverless agent.

    The quickstart walks you through gmail-summarizer, an agent that reads your inbox and writes you a digest. From empty directory to a deployed, scheduled agent.

    instructions.md
    # Gmail summarizer
     
    You summarize the day's unread email
    into one short digest.
     
    Group by sender, lead with anything
    that needs a reply. Never send email
    on my behalf without approval.