# Python SDK reference

> The noclick package, generated from its own source: every class, method and error.

`pip install noclick` (version 0.2.2)

NoClick Platform SDK: users, sessions, connections, tools, humans,
agents and the agents they coordinate, policy, channels and workspaces,
inboxes, phone numbers, sandboxes, machines, browsers and cards; databases,
buckets, repos, apps and domains, each in a region; plus the activity they
leave (operations, events, tool calls, API requests, usage).

```python
import noclick

user = noclick.User.from_id("user_42", create_if_missing=True)
with noclick.as_user(user):
    gmail = noclick.Connection.from_name("gmail", integration="gmail", create_if_missing=True)
    print(gmail.connect_url)
```

Every method blocks by default; `await obj.method.aio(...)` is the async form.

## Configuration

| Name | Description |
| --- | --- |
| [`noclick.Client`](https://www.noclick.com/docs/reference/python/Client.md#Client) | Connection settings for the platform API. |
| [`noclick.configure`](https://www.noclick.com/docs/reference/python/Client.md#configure) | Replace the default client, e.g. `noclick.configure(api_key="nk_live_...")`. |
| [`noclick.default_client`](https://www.noclick.com/docs/reference/python/Client.md#default_client) | Get the client used when no `client=` is given, built from the environment on first use. |
| [`noclick.Page`](https://www.noclick.com/docs/reference/python/Page.md#Page) | One page of a listing; pass `next_cursor` back as `cursor` for the next (None = the last page). |
| [`noclick.Key`](https://www.noclick.com/docs/reference/python/Key.md#Key) | A platform secret key of your account's: its `id`, `name`, `scopes`, monthly cap, expiry, the user it's pinned to (`user_id`) and the key that made it (`minted_by`; `None` for one the owner made). |
| [`noclick.regions`](https://www.noclick.com/docs/reference/python/Region.md#regions) | Every region, or those that place `kind` (`"sandbox"`, `"agent"`, `"bucket"`, `"database"`, `"project"`, `"machine"`, `"browser"`, `"dict"` or `"queue"`; any other raises `noclick.InvalidRequest` naming those that are placed by region). |
| [`noclick.Region`](https://www.noclick.com/docs/reference/python/Region.md#Region) | A place NoClick runs resources and keeps their data; `region=` takes its `name`. |

## Your users

| Name | Description |
| --- | --- |
| [`noclick.User`](https://www.noclick.com/docs/reference/python/User.md#User) | One of your users, a person or a company, known by your own id for it. |
| [`noclick.Spending`](https://www.noclick.com/docs/reference/python/User.md#Spending) | Whether a user can spend right now, as `user.spending` reads it. |
| [`noclick.as_user`](https://www.noclick.com/docs/reference/python/as_user.md#as_user) | Act for `user` inside the block: a `User`, your id for the user, or None for the account itself. |
| [`noclick.Session`](https://www.noclick.com/docs/reference/python/Session.md#Session) | A token pinned to one user with a subset of the minting key's scopes. |
| [`noclick.Brand`](https://www.noclick.com/docs/reference/python/Brand.md#Brand) | One per account; rendered on `/h/` pages and human emails. |

## Their accounts

| Name | Description |
| --- | --- |
| [`noclick.Connection`](https://www.noclick.com/docs/reference/python/Connection.md#Connection) | A named connection to an account on another service. |
| [`noclick.run`](https://www.noclick.com/docs/reference/python/Connection.md#run) | Run one operation by its ref, `"name.operation"`, as `tools=` names it. |
| [`noclick.ConnectLink`](https://www.noclick.com/docs/reference/python/Connection.md#ConnectLink) | A connect page URL that is also the operation tracking it. |
| [`noclick.IntegrationInfo`](https://www.noclick.com/docs/reference/python/Connection.md#IntegrationInfo) | A service NoClick can operate, such as `gmail`, or a model provider an agent thinks with, such as `anthropic`: one of `Connection.integrations()`. |
| [`noclick.IntegrationOperation`](https://www.noclick.com/docs/reference/python/Connection.md#IntegrationOperation) | One operation of a connection's integration, with the JSON schema of the `parameters` `connection.run` takes for it. |
| [`noclick.IntegrationEvent`](https://www.noclick.com/docs/reference/python/Connection.md#IntegrationEvent) | An app event a connection's integration can deliver to an agent's `noclick.OnEvent` trigger, a channel's subscription or an app's: its `name` (`channel_message`, `contact_created`), what it means, and `filters`, the keyword arguments that narrow it, each with what it matches (one marked `Required.` must be given). |

## Hosted agents

| Name | Description |
| --- | --- |
| [`noclick.Agent`](https://www.noclick.com/docs/reference/python/Agent.md#Agent) | A hosted agent. |
| [`noclick.HarnessInfo`](https://www.noclick.com/docs/reference/python/Agent.md#HarnessInfo) | What can run an agent: one of `Agent.harnesses()`. |
| [`noclick.ModelUsage`](https://www.noclick.com/docs/reference/python/Agent.md#ModelUsage) | What an agent's model calls on your own key or plan (its `model_connection`) used: tokens in (`cached_tokens` of them read from the provider's cache), tokens out, and what they come to in US dollars at the provider's list price. |
| [`noclick.AgentGrant`](https://www.noclick.com/docs/reference/python/Agent.md#AgentGrant) | A connection the agent's user gave it at run time (it asked with its `request_connection` tool, within `can_request`). |
| [`noclick.Cron`](https://www.noclick.com/docs/reference/python/Triggers.md#Cron) | A schedule: a five-field cron expression (minute, hour, day of month, month, day of week: numbers, `*`, ranges, steps, lists and month or day names) read in a timezone, so `"0 9 * * 1-5"` with `tz="America/New_York"` means 9am New York time on weekdays, daylight saving included. |
| [`noclick.OnWebhook`](https://www.noclick.com/docs/reference/python/Triggers.md#OnWebhook) | A URL that wakes the agent: each POST to it is a turn, its body the message (a JSON body is passed as JSON). |
| [`noclick.OnEvent`](https://www.noclick.com/docs/reference/python/Triggers.md#OnEvent) | An app event from one of the agent's connections, such as a Slack message or a new HubSpot contact. |
| [`noclick.OnPlatformEvent`](https://www.noclick.com/docs/reference/python/Triggers.md#OnPlatformEvent) | One of NoClick's own events (the types `noclick.Event.types()` lists, as your webhooks receive them): an operation failing, a connection breaking, a channel halting, a workflow's run failing, an agent built in the app asking for you, a payment going through. |
| [`noclick.OnQueue`](https://www.noclick.com/docs/reference/python/Triggers.md#OnQueue) | Each message on a queue becomes a turn: the agent reads `message` (its standing instructions, if any) and then the message's JSON body. |
| [`noclick.AgentTrigger`](https://www.noclick.com/docs/reference/python/Triggers.md#AgentTrigger) | One thing that wakes an agent, as `agent.triggers()` reads it. |
| [`noclick.AgentMemory`](https://www.noclick.com/docs/reference/python/Agent.md#AgentMemory) | `agent.memory`: named notes the agent keeps across conversations. |
| [`noclick.Memory`](https://www.noclick.com/docs/reference/python/Memory.md#Memory) | Named notes any agent of its scope can attach: the account's (every user's agents may read them) or one user's. |
| [`noclick.Skill`](https://www.noclick.com/docs/reference/python/Skill.md#Skill) | An Agent Skills folder of the account's (every user's agents may use it) or one user's, versioned. |
| [`noclick.AgentWorkspace`](https://www.noclick.com/docs/reference/python/Agent.md#AgentWorkspace) | The files an agent works on: what it writes with its shell or its tools, and what you put there for it. |
| [`noclick.ShareLink`](https://www.noclick.com/docs/reference/python/Agent.md#ShareLink) | An agent's public chat page. |
| [`noclick.Wakeup`](https://www.noclick.com/docs/reference/python/Agent.md#Wakeup) | A turn an agent will take later, in one of its conversations: at a time, when an operation settles, on a NoClick event, or at each time of a schedule (`agent.wake`, or its own `wake_me` tool). |
| [`noclick.Job`](https://www.noclick.com/docs/reference/python/Agent.md#Job) | Work one agent gave another: a spawned child's task (kind `agent.task`), or a message a coordinator sent with its `agents` tools (kind `agent.message`), whose only update is `done`. |
| [`noclick.Before`](https://www.noclick.com/docs/reference/python/Agent.md#Before) | An update the parent requires before its child makes a tool call: `Before` with tool patterns written as policy writes them (`"gmail.send_email_message"`, `"stripe.*"`, `"code"`). |
| [`noclick.Every`](https://www.noclick.com/docs/reference/python/Agent.md#Every) | An update the parent requires at least this often while its child works: `Every` with an interval in seconds (or a `timedelta`), 60 seconds or more. |
| [`noclick.Agents`](https://www.noclick.com/docs/reference/python/Agent.md#Agents) | The `agents` capability, for an agent's `tools`: the same as the string `"agents"`, narrowed with `Agents.only(...)`. |
| [`noclick.Platform`](https://www.noclick.com/docs/reference/python/Agent.md#Platform) | NoClick itself, for an agent's `tools`: the same as the string `"noclick"`, narrowed with `Platform.only(...)`. |
| [`noclick.Attachment`](https://www.noclick.com/docs/reference/python/Agent.md#Attachment) | A file on a message, kept as an account file at `url`. |
| [`noclick.Terminal`](https://www.noclick.com/docs/reference/python/Agent.md#Terminal) | A coding agent's conversation as its harness's own terminal: `state` is `agent` (the agent has it), `taking_over` (its turn in flight finishes first), `person` (taken over) or `handing_back`. |
| [`noclick.AgentMove`](https://www.noclick.com/docs/reference/python/AgentMove.md#AgentMove) | A move from a laptop: `waiting` for its code to be redeemed, `moving` while what the agent carries arrives (`arrived`), `finishing` while the agent is made (`steps`), then `done` with `agent_id` and `conversation`; `failed` (finish again), `canceled` or `expired`. |
| [`noclick.Channel`](https://www.noclick.com/docs/reference/python/Channel.md#Channel) | A conversation between members. |
| [`noclick.Subscription`](https://www.noclick.com/docs/reference/python/Channel.md#Subscription) | Events a channel, a whole `noclick.Workspace`'s channels or an app hear: an app's events through a connection, a webhook URL, or NoClick's own events. |
| [`noclick.Workspace`](https://www.noclick.com/docs/reference/python/Channel.md#Workspace) | A home for channels and their members, like a workspace in a team chat: a company, a client or a team, with its people, its agents and its rooms. |
| [`noclick.A2AMember`](https://www.noclick.com/docs/reference/python/Channel.md#A2AMember) | A remote agent reached over A2A. |

## Tools for your own LLM

| Name | Description |
| --- | --- |
| [`noclick.Toolkit`](https://www.noclick.com/docs/reference/python/Toolkit.md#Toolkit) | A set of tools for your LLM. |
| [`noclick.ToolResult`](https://www.noclick.com/docs/reference/python/Toolkit.md#ToolResult) | The outcome of one tool call. |
| [`noclick.McpServer`](https://www.noclick.com/docs/reference/python/McpServer.md#McpServer) | Your tools at one URL, for Claude, ChatGPT, Cursor or any MCP client. |
| [`noclick.AI`](https://www.noclick.com/docs/reference/python/AI.md#AI) | Models paid from your NoClick balance, for code that isn't an agent: chat, embeddings, images, videos and transcription; and your agents as `agent:<name>` models. |

## People in the loop

| Name | Description |
| --- | --- |
| [`noclick.Human`](https://www.noclick.com/docs/reference/python/Human.md#Human) | A person to reach. |
| [`noclick.HumanOperations`](https://www.noclick.com/docs/reference/python/Human.md#HumanOperations) | Some of a person's tools for an agent (`human.only(...)`), for `tools=`. |
| [`noclick.HumanRequest`](https://www.noclick.com/docs/reference/python/Human.md#HumanRequest) | A request to a person; also the operation that finishes when they answer. |
| [`noclick.Approval`](https://www.noclick.com/docs/reference/python/Approval.md#Approval) | A call held for your account's owner's yes, as they see it on its page. |
| [`noclick.Policy`](https://www.noclick.com/docs/reference/python/Policy.md#Policy) | The account's policy, or one user's (`user_id`). |
| [`noclick.ConnectedApp`](https://www.noclick.com/docs/reference/python/ConnectedApp.md#ConnectedApp) | One connection, revoked or not: the client (`client_name`, and `client_id`, `noclick:` for one NoClick makes itself), the capability groups it holds (`read`, `build`, `deploy`, `spend`, `delete`), its monthly cap and the amount under which a purchase it makes goes through unasked (`None`: none of its own, and it asks before every one), what it spent this month, and the user it acts for (`None`: your account). |

## Acting in the world

| Name | Description |
| --- | --- |
| [`noclick.Inbox`](https://www.noclick.com/docs/reference/python/Inbox.md#Inbox) | An email address that receives mail. |
| [`noclick.PhoneNumber`](https://www.noclick.com/docs/reference/python/PhoneNumber.md#PhoneNumber) | A number you own, however you got it. |
| [`noclick.Browser`](https://www.noclick.com/docs/reference/python/Browser.md#Browser) | A running browser. |
| [`noclick.BrowserProfile`](https://www.noclick.com/docs/reference/python/Browser.md#BrowserProfile) | Saved sign-ins for one person. |
| [`noclick.BrowserLogin`](https://www.noclick.com/docs/reference/python/Browser.md#BrowserLogin) | A live-browser link where a person signs in to a site, and the operation that finishes once they have: `wait()` returns the `SiteLogin`. |
| [`noclick.Card`](https://www.noclick.com/docs/reference/python/Card.md#Card) (invite-only beta) | A virtual card with a spending limit. |
| [`noclick.Sandbox`](https://www.noclick.com/docs/reference/python/Sandbox.md#Sandbox) | A running sandbox. |
| [`noclick.Machine`](https://www.noclick.com/docs/reference/python/Machine.md#Machine) (invite-only beta) | An always-on computer of a fixed `size` in one `region`, billed a flat monthly price. |
| [`noclick.compute`](https://www.noclick.com/docs/reference/python/compute.md#compute) | 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. |

## Build and host

| Name | Description |
| --- | --- |
| [`noclick.Project`](https://www.noclick.com/docs/reference/python/Project.md#Project) | An app: a repo deployed to a URL. |
| [`noclick.Deployment`](https://www.noclick.com/docs/reference/python/Project.md#Deployment) | One build of a project at one commit. |
| [`noclick.Schedule`](https://www.noclick.com/docs/reference/python/Project.md#Schedule) | A project's cron job: NoClick POSTs `path` on the app on every tick of `cron` (read in `tz`). |
| [`noclick.ProjectEmail`](https://www.noclick.com/docs/reference/python/Project.md#ProjectEmail) | `app.email`: transactional email from the app's own address (receipts, booking confirmations), rate-capped and charged per recipient; a high bounce or complaint rate pauses sending. |
| [`noclick.ProjectPayments`](https://www.noclick.com/docs/reference/python/Project.md#ProjectPayments) | `app.payments`: take payments in the app without a payments account of your own. |
| [`noclick.ProjectSignIn`](https://www.noclick.com/docs/reference/python/Project.md#ProjectSignIn) | `app.sign_in`: accounts for the app's own users. |
| [`noclick.ProjectAI`](https://www.noclick.com/docs/reference/python/Project.md#ProjectAI) | `app.ai`: `noclick.AI` acting as the app, from the app's own code (`Project.current()`). |
| [`noclick.ProjectLive`](https://www.noclick.com/docs/reference/python/Project.md#ProjectLive) | `app.live`: edit the app in a live session. |
| [`noclick.Repo`](https://www.noclick.com/docs/reference/python/Repo.md#Repo) | A git repository NoClick hosts. |
| [`noclick.Domain`](https://www.noclick.com/docs/reference/python/Domain.md#Domain) | A domain you bought through NoClick, transferred in, or connected from elsewhere, and what it serves. |
| [`noclick.DomainPurchase`](https://www.noclick.com/docs/reference/python/Domain.md#DomainPurchase) | A domain bought or renewed: the operation `Domain.buy` and `domain.renew` return. |
| [`noclick.Workflow`](https://www.noclick.com/docs/reference/python/Workflow.md#Workflow) | A workflow built in the NoClick app: its trigger, steps and outputs. |
| [`noclick.estimate`](https://www.noclick.com/docs/reference/python/estimate.md#estimate) | What `items` would cost a month, before you make any of them. |
| [`noclick.Estimate`](https://www.noclick.com/docs/reference/python/estimate.md#Estimate) | What the items would cost a month: a usage-based estimate, priced for your account's plan. |

## Data

| Name | Description |
| --- | --- |
| [`noclick.Database`](https://www.noclick.com/docs/reference/python/Database.md#Database) | A SQL database: SQLite (`engine="sqlite"`, the default, cheap while idle) or Postgres. |
| [`noclick.Bucket`](https://www.noclick.com/docs/reference/python/Bucket.md#Bucket) | A bucket of files by key. |
| [`noclick.Volume`](https://www.noclick.com/docs/reference/python/Volume.md#Volume) | A persistent filesystem: files by path, in folders, that outlive the sandbox or agent turn that wrote them. |
| [`noclick.Dict`](https://www.noclick.com/docs/reference/python/Dict.md#Dict) | A key-value store: string keys, JSON values, optional expiry per key. |
| [`noclick.Queue`](https://www.noclick.com/docs/reference/python/Queue.md#Queue) | A durable queue of JSON messages, delivered at least once. |
| [`noclick.Secret`](https://www.noclick.com/docs/reference/python/Secret.md#Secret) | Named values, such as API keys, that the code you run reads from its environment: a sandbox's commands, an agent's shell, an app. |

## In production

| Name | Description |
| --- | --- |
| [`noclick.Operation`](https://www.noclick.com/docs/reference/python/Operation.md#Operation) | A long-running piece of work. |
| [`noclick.TrashItem`](https://www.noclick.com/docs/reference/python/TrashItem.md#TrashItem) | Something deleted, restorable until `purge_after`. |
| [`noclick.Event`](https://www.noclick.com/docs/reference/python/Webhook.md#Event) | Something that happened: an operation finished, a person answered, a domain went live. |
| [`noclick.Webhook`](https://www.noclick.com/docs/reference/python/Webhook.md#Webhook) | An endpoint on your server that receives events, signed with its secret. |
| [`noclick.watch`](https://www.noclick.com/docs/reference/python/watch.md#watch) | Follow your objects' changes until you stop reading. |
| [`noclick.ToolCall`](https://www.noclick.com/docs/reference/python/ToolCall.md#ToolCall) | One recorded tool call. |
| [`noclick.ApiRequest`](https://www.noclick.com/docs/reference/python/ApiRequest.md#ApiRequest) | One logged request. |
| [`noclick.usage`](https://www.noclick.com/docs/reference/python/usage.md#usage) | Spend for `period` (`"month"`), optionally split `group_by` `"user"`, `"key"`, `"agent"`, `"project"` (each app), `"person"` (who each charge was for: the person whose message, click or key started the work; the account's owner for work nobody else started) or `"workstream"` (the line of work it belongs to, as the agent that started it named it), and narrowed to one `agent` (an `Agent` or its id). |
| [`noclick.Usage`](https://www.noclick.com/docs/reference/python/usage.md#Usage) | What the account (or the current user) spent in `period`. |
| [`noclick.Notifications`](https://www.noclick.com/docs/reference/python/Notifications.md#Notifications) | Which kinds of email alert NoClick sends your account's owner: `categories` maps each kind (`run_failure`, `credits`, `spend_cap`, `digest`, ...) to whether it's on. |
| [`noclick.Popups`](https://www.noclick.com/docs/reference/python/Popups.md#Popups) | Which of the NoClick app's popups and banners your account's owner sees: `popups` maps each one (`run_results`, the outputs shown after a workflow runs; `invite_banner`, the nudge to share a workflow's live invite link; `publish_banner`, the nudge to publish an interface) to whether it shows. |
| [`noclick.AccountPhones`](https://www.noclick.com/docs/reference/python/AccountPhones.md#AccountPhones) | The numbers linked to your account. |
| [`noclick.BuilderSkill`](https://www.noclick.com/docs/reference/python/BuilderSkill.md#BuilderSkill) | A skill NoClick's builder loads: a description the builder reads to decide whether it needs it, plus text and, optionally, a workflow to follow. |
| [`noclick.ExportBundle`](https://www.noclick.com/docs/reference/python/ExportBundle.md#ExportBundle) | What an export produced: a zip at `url` (a link that works until `expires_at`, 7 days) of `size_bytes`, what's in it, and `remaining_dependencies`, what keeps needing NoClick while the account exists (`the agent runtime`, `channels`, `people's pending asks`, `app hosting`, `connections`). |
| [`noclick.feedback`](https://www.noclick.com/docs/reference/python/feedback.md#feedback) | Tell the NoClick team something: a `bug`, an `idea`, or anything (`general`). |

## Errors

| Name | Description |
| --- | --- |
| [`noclick.Error`](https://www.noclick.com/docs/reference/python/Error.md#Error) | Base class for every NoClick platform error. |
| [`noclick.NeedsConnection`](https://www.noclick.com/docs/reference/python/Error.md#NeedsConnection) | The connection has no account connected yet; send the person `connect_url`. |
| [`noclick.CredentialDisconnected`](https://www.noclick.com/docs/reference/python/Error.md#CredentialDisconnected) | The connection's account was revoked or stopped working; send the person `connect_url` to reconnect it (same name). |
| [`noclick.ApprovalRequired`](https://www.noclick.com/docs/reference/python/Error.md#ApprovalRequired) | Policy wants a person to approve this call first. |
| [`noclick.SpendCapExceeded`](https://www.noclick.com/docs/reference/python/Error.md#SpendCapExceeded) | A monthly spend cap (`scope`: key, user, agent, ...) is used up. |
| [`noclick.SpendingPaused`](https://www.noclick.com/docs/reference/python/Error.md#SpendingPaused) | You paused this user's spending (`user.pause_spending()`), so nothing that costs money runs for them until `user.resume_spending()`. |
| [`noclick.Conflict`](https://www.noclick.com/docs/reference/python/Error.md#Conflict) | It already exists (`existing_id` names it), or another call holds it, like a conversation mid-turn. |
| [`noclick.WebhookSignatureError`](https://www.noclick.com/docs/reference/python/Error.md#WebhookSignatureError) | A webhook delivery's `NoClick-Signature` doesn't match its body, or its timestamp is too old. |

## Every object

Live API objects: `User`, `Agent`, `Operation` and the rest.

An object can exist before the server has been asked about it
(`User.from_id(...)`, `Agent.from_name(...)`,
`Operation.from_id(...)`). It hydrates on first need: a method call, or a
property the local hints can't answer. `hydrate()` does it explicitly.
An object you got while acting for a user keeps acting for that user.
