Python SDK reference

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

pip install noclick

Version 0.2.0. New here? Start with the guide.

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).

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

NameDescription
Client

Connection settings for the platform API.

configure

Replace the default client, e.g. noclick.configure(api_key="nk_live_...").

default_client

Get the client used when no client= is given, built from the environment on first use.

Page

One page of a listing; pass next_cursor back as cursor for the next (None = the last page).

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).

Region

A place NoClick runs resources and keeps their data; region= takes its name.

Your users

NameDescription
User

One of your users, a person or a company, known by your own id for it.

Spending

Whether a user can spend right now, as user.spending reads it.

as_user

Act for user inside the block: a User, your id for the user, or None for the account itself.

Session

A token pinned to one user with a subset of the minting key's scopes.

Brand

One per account; rendered on /h/ pages and human emails.

Their accounts

NameDescription
Connection

A named connection to an account on another service.

run

Run one operation by its ref, "name.operation", as tools= names it.

ConnectLink

A connect page URL that is also the operation tracking it.

IntegrationInfo

A service NoClick can operate, such as gmail, or a model provider an agent thinks with, such as anthropic: one of Connection.integrations().

IntegrationOperation

One operation of a connection's integration, with the JSON schema of the parameters connection.run takes for it.

IntegrationEvent

An app event a connection's integration can deliver to an agent's noclick.OnEvent trigger or a channel's subscription: 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

NameDescription
Agent

A hosted agent.

HarnessInfo

What can run an agent: one of Agent.harnesses().

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.

AgentGrant

A connection the agent's user gave it at run time (it asked with its request_connection tool, within can_request).

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.

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).

OnEvent

An app event from one of the agent's connections, such as a Slack message or a new HubSpot contact.

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.

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.

AgentTrigger

One thing that wakes an agent, as agent.triggers() reads it.

AgentMemory

agent.memory: named notes the agent keeps across conversations.

Memory

Named notes any agent of its scope can attach: the account's (every user's agents may read them) or one user's.

AgentWorkspace

The files an agent works on in one conversation: what it writes with its shell or its tools, and what you put there for it.

ShareLink

An agent's public chat page.

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).

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.

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").

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.

Agents

The agents capability, for an agent's tools: the same as the string "agents", narrowed with Agents.only(...).

Platform

NoClick itself, for an agent's tools: the same as the string "noclick", narrowed with Platform.only(...).

Attachment

A file on a message, kept as an account file at url.

Channel

A conversation between members.

Subscription

Events a channel, or a whole noclick.Workspace's channels, hear: an app's events through a connection, a webhook URL, or NoClick's own events.

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.

A2AMember

A remote agent reached over A2A.

Tools for your own LLM

NameDescription
Toolkit

A set of tools for your LLM.

ToolResult

The outcome of one tool call.

McpServer

Your tools at one URL, for Claude, ChatGPT, Cursor or any MCP client.

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

NameDescription
Human

A person to reach.

HumanOperations

Some of a person's tools for an agent (human.only(...)), for tools=.

HumanRequest

A request to a person; also the operation that finishes when they answer.

Policy

The account's policy, or one user's (user_id).

Acting in the world

NameDescription
Inbox

An email address that receives mail.

PhoneNumber

A number you own.

Browser

A running browser.

BrowserProfile

Saved sign-ins for one person.

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.

Cardinvite-only beta

A virtual card with a spending limit.

Sandbox

A running sandbox.

Machineinvite-only beta

An always-on computer of a fixed size in one region, billed a flat monthly price.

Build and host

NameDescription
Project

An app: a repo deployed to a URL.

Deployment

One build of a project at one commit.

Schedule

A project's cron job: NoClick POSTs path on the app on every tick of cron (read in tz).

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.

ProjectPayments

app.payments: take payments in the app without a payments account of your own.

ProjectSignIn

app.sign_in: accounts for the app's own users.

ProjectAI

app.ai: noclick.AI acting as the app, from the app's own code (Project.current()).

Repo

A git repository NoClick hosts.

Domain

A domain you bought through NoClick, transferred in, or connected from elsewhere, and what it serves.

DomainPurchase

A domain bought or renewed: the operation Domain.buy and domain.renew return.

Workflow

A workflow built in the NoClick app: its trigger, steps and outputs.

Data

NameDescription
Database

A SQL database: SQLite (engine="sqlite", the default, cheap while idle) or Postgres.

Bucket

A bucket of files by key.

Volume

A persistent filesystem: files by path, in folders, that outlive the sandbox or agent turn that wrote them.

Dict

A key-value store: string keys, JSON values, optional expiry per key.

Queue

A durable queue of JSON messages, delivered at least once.

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

NameDescription
Operation

A long-running piece of work.

TrashItem

Something deleted, restorable until purge_after.

Event

Something that happened: an operation finished, a person answered, a domain went live.

Webhook

An endpoint on your server that receives events, signed with its secret.

ToolCall

One recorded tool call.

ApiRequest

One logged request.

usage

Spend for period ("month"), optionally split group_by "user", "key", "agent" or "project" (each app), and narrowed to one agent (an Agent or its id).

Usage

What the account (or the current user) spent in period.

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).

feedback

Tell the NoClick team something: a bug, an idea, or anything (general).

Errors

NameDescription
Error

Base class for every NoClick platform error.

NeedsConnection

The connection has no account connected yet; send the person connect_url.

CredentialDisconnected

The connection's account was revoked or stopped working; send the person connect_url to reconnect it (same name).

ApprovalRequired

Policy wants a person to approve this call first.

SpendCapExceeded

A monthly spend cap (scope: key, user, agent, ...) is used up.

SpendingPaused

You paused this user's spending (user.pause_spending()), so nothing that costs money runs for them until user.resume_spending().

Conflict

It already exists (existing_id names it), or another call holds it, like a conversation mid-turn.

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.

Attributes
is_hydratedbool

Whether the server's view has been loaded.

rawdict[str, Any]

The server's JSON for this object (hydrates if needed).

hydrateasync

obj.hydrate() -> Self

Load the object from the server if it hasn't been yet.

Returns
Self

This object, loaded. It sends nothing if it already was.

Usage

Load an object now, so a missing one fails here rather than at first use:

agent = noclick.Agent.from_name("support").hydrate()
print(agent.model)

In async code, load it before reading its properties, so the first read doesn't block your event loop:

agent = noclick.Agent.from_name("support")
await agent.hydrate.aio()
print(agent.model)

refreshasync

obj.refresh() -> Self

Re-fetch the object's current state.

Returns
Self

This object, with the server's current fields.

Usage
op = noclick.Operation.from_id("3b9d6f2e-1c4a-4e8b-9f7d-2a6c5e8b1d40").hydrate()
print(op.status)   # running
op.refresh()
print(op.status)   # succeeded, once it has finished