compute

What runs on NoClick for you now: your machines (with the conversations on each), every agent's sandbox that's up, and your live sandboxes, each with its price an hour.

running = noclick.compute(user_filter="all")
per_hour = sum(c.usd_per_hour or 0 for c in running if c.status == "running")
noclick.compute(*, user_filter=None, user=..., client=None) -> list[ComputeItem]

Your machines (any status, with the conversations on each), every agent's sandbox up now and every live Sandbox, each with its price an hour. Each part needs its area's scope (machines, agents, sandboxes); a key with only some gets those. Your own computers aren't in it.

Parameters
user_filterAny

Which users a read covers: noclick.ALL_USERS, noclick.NO_USER, a User, or your id for one. It filters without acting as that user.

(default None)
userAny

Who the call acts for. Defaults to the user set by noclick.as_user (none: the account itself).

(defaults to the current user)
clientClient | None

The client to send with; defaults to the module client built from NOCLICK_API_KEY.

(default None)
Returns
list[ComputeItem]

Each machine or sandbox: its kind, status, size, price an hour and what runs on it.

Usage
for item in noclick.compute(user_filter="all"):
    print(item.kind, item.name, item.usd_per_hour, [r.agent_name for r in item.running])

ComputeItem

class ComputeItem

A machine, an agent's sandbox or a sandbox, as it runs now.

Attributes
kindstr

machine (a NoClick machine, any status), agent_sandbox (an agent's warm sandbox) or sandbox.

idstr

Its id (an agent's sandbox: its name).

namestr | None

The machine's name, the agent's, or a sandbox's image.

statusstr | None
user_idstr | None
regionstr | None
cpufloat | None
memory_gbfloat | None
started_atAny
usd_per_hourfloat | None

What an hour of it costs (a machine: its month's price over 730 hours).

usd_per_monthfloat | None

A machine's price a month.

spent_usd_todayfloat | None

What an agent's sandbox charged since midnight UTC.

runninglist[ComputeRun]
rawdict[str, Any]

The response JSON exactly as the API sent it.

ComputeRun

class ComputeRun

A conversation running on a machine or in an agent's sandbox.

Attributes
agent_idstr | None
agent_namestr | None
conversationstr | None

The agent's conversation, as agent.message(conversation=...) names it.

harnessstr | None
statestr

starting, live or running.