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.
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.
None)Who the call acts for. Defaults to the user set by noclick.as_user (none: the account itself).
The client to send with; defaults to the module client built from NOCLICK_API_KEY.
None)Each machine or sandbox: its kind, status, size, price an hour and what runs on it.
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 ComputeItemA machine, an agent's sandbox or a sandbox, as it runs now.
| kind | str |
|
| id | str | Its id (an agent's sandbox: its name). |
| name | str | None | The machine's name, the agent's, or a sandbox's image. |
| status | str | None | |
| user_id | str | None | |
| region | str | None | |
| cpu | float | None | |
| memory_gb | float | None | |
| started_at | Any | |
| usd_per_hour | float | None | What an hour of it costs (a machine: its month's price over 730 hours). |
| usd_per_month | float | None | A machine's price a month. |
| spent_usd_today | float | None | What an agent's sandbox charged since midnight UTC. |
| running | list[ComputeRun] | |
| raw | dict[str, Any] | The response JSON exactly as the API sent it. |
ComputeRun
class ComputeRunA conversation running on a machine or in an agent's sandbox.
| agent_id | str | None | |
| agent_name | str | None | |
| conversation | str | None | The agent's conversation, as |
| harness | str | None | |
| state | str |
|