Connection

Connections: named links to your users' accounts on other services, and what those services can do.

gmail = noclick.Connection.from_name("gmail", integration="gmail", create_if_missing=True)
if not gmail.connected:
    send_to_user(gmail.connect_url)
gmail.wait()
gmail.run("send_email_message", {...})

A connection is a name in one scope (a user, or your account's own). Code, toolkits and agents name it, so they always act in exactly that account; two accounts on one service are two connections. Reconnecting keeps the name.

An operation that needs no account (exa's web search) needs no connection either: noclick.run("exa.search", {...}) and tools=["exa.search"] run it on NoClick's key, for every user. A connection named exa holding your own key takes over the same refs. Connection.integrations() finds a service, and operations() says what a connection's service can do.

class Connection

A named connection to an account on another service. Secrets never come back; token() mints an OAuth access token when the key has credentials:token.

status is pending until someone connects an account at connect_url, connected after, and disconnected once the account is revoked (connect_link() mints a link to reconnect it). Operations that need no account run on NoClick's key even while it's pending.

The accounts connected in the NoClick app are connections too, in your account's own scope: origin is "app" and the id is credential:<id> (their name is the app's, so refer to them by id). They run, look up, verify and take require_approval like any connection, and an account agent takes one as a tool (the Connection, or "credential:<id>", "credential:<id>.operation"; a user's agent can't); the app connects them, and delete() removes one as the app does. A connect link (connect_link(), request()) reconnects one in place: a key typed there replaces its own in the same credential, so everything using it keeps working; its owner makes the link, or someone it's shared with to edit. One shared with your account has access "view" or "edit": it runs, but its token, approval rules and deletion stay its owner's. A Claude or ChatGPT plan you signed in to in the app is one too, an account agent's model_connection; a plan shared with you, or filled in by someone else, isn't.

One a teammate shared with a team workspace you're in is that team's to use, in its workspace only: name the workspace (organization_id=) to list, find and run it there. A connection read in a team workspace carries it (organization_id), and everything it does goes there, as the team's work.

An app's preview only reads through a connection: an operation that writes in its account is refused (noclick.PermissionDenied) unless the connection is a test account (mark_test_account()).

Attributes
idstr
namestr
integrationstr | None

Its integration (gmail); None for what the app keeps that is no app's account (in_app_only).

credential_typestr | None
user_idstr | None
statusstr
originstr

api for a named connection, app for an account connected in the app.

in_app_onlybool

Kept in the NoClick app for its steps, never a connection: an agent's environment variables, an MCP server's key, a plan shared with your account. It's listed, read, renamed and deleted, but never runs, is never checked, and names nothing as an agent's or a step's connection.

accessstr

Your account's access: owner, or edit/view on one shared with it.

organization_idstr | None

The team workspace it was read in (organization_id=), where it runs; None in your account's own.

approval_operationslist[str]

Operations its owner approves call by call wherever it runs (*: all of them); require_approval adds to them and lift_approval lifts them.

accountstr | None

The account it reaches, as the app's Connections list names it: its login, else its email, else who a check verified it as, else the number it links; an agent's environment variables by their names, an MCP server's key by its server's host; None when none is known.

variableslist[str] | None

An agent's environment variables by name (never their values); None for anything else.

server_urlstr | None

The MCP server an MCP sign-in is for; None for anything else (a server's key gives its host as account, since its address may carry a secret).

credential_idstr | None

The id of the account it holds, as a workflow step's connections names it, so a step's account is matched to its connection; None while none is connected.

test_accountbool

Whether it's a test account, which an app's preview writes through as well as reads.

used_bylist[dict[str, Any]]

What holds it: agents (in their tools, as their model_connection, given it by their user, or with a trigger on it), channels and workspaces subscribed to its events, hosted MCP servers with it in their tools, apps that bind it or whose code made it, numbers connected through it, and the automations whose steps use its account (yours, and for an account yours owns, those in its workspace). Each is kind (agent, channel, workspace, mcp_server, project, phone_number or workflow), id, name, user_id, an app's binding name and an automation's marks (the node types its steps are, by which the app draws it; null for anything else).

connected_atAny
created_atAny
updated_atAny
connectedbool
connect_urlstr | None

The open link where someone connects (or reconnects) the account, if one is open.

verificationVerification | None
sharedConnectionShared | None

How one connected in the app and shared with your account reaches it, and who shared it; None for your own and for a named connection.

healthConnectionHealth | None

The provider's live word on a linked session (a WhatsApp number's, a Discord install's), read with the connection; None where there's nothing to ask or no telling.

planPlan | None

A Claude or ChatGPT plan's tier, what it runs and why it runs none; None on anything but a plan.

usage_summaryPlanUsageSummary | None

A plan's usage as last read, over every window; None on anything but a plan, or one never read. usage() reads it in full, for a model.

console_urlstr | None

This connection's kind in the developer console (None off the hosted API).

from_nameclassmethod

noclick.Connection.from_name(
    name, *, integration=None, create_if_missing=False, credential_type=None,
    data=None, redirect_url=None, reason=None, send_to=None, user=..., client=None
) -> Connection

A lazy reference to the connection called name in the current (or given) user. With create_if_missing=True it's created on first use, for integration (a name, or an IntegrationInfo): holding data when given (a key you hold), else pending with a connect link (the link options are create's). An existing connection is used as it is: data and the link options apply only when it's created. integration and credential_type say what the connection is, so they're checked, with or without create_if_missing: one of another integration or credential type raises noclick.Conflict naming it. operations(), operation() and events() read integration's catalog without loading or creating it.

Parameters
namestrrequired
integrationAnydefault None
create_if_missingbooldefault False
credential_typestr | Nonedefault None
datadict[str, Any] | Nonedefault None
redirect_urlstr | Nonedefault None
reasonstr | Nonedefault None
send_toAnydefault 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
Connection

A connection that loads, or is created, the first time it's used. Nothing is sent yet.

Usage

Refer to a connection that already exists:

gmail = noclick.Connection.from_name("gmail", user="user_42")
print(gmail.status)   # loads it now; noclick.NotFound if there's none

Or create it the first time it's used, pending with a link for the user. The same line works for a new user and a returning one:

with noclick.as_user("user_42"):
    gmail = noclick.Connection.from_name(
        "gmail", integration="gmail", create_if_missing=True,
        reason="to send your weekly summaries",
    )
    print(gmail.status, gmail.connect_url)   # pending https://noclick.com/credential/provide/...

With a key you already hold, it's created holding that key (and never overwrites one):

crm = noclick.Connection.from_name(
    "crm", integration="affinity", data={"api_key": "..."},
    create_if_missing=True, user="user_42",
)

from_idclassmethod

noclick.Connection.from_id(
    connection_id, *, organization_id=None, client=None, user=...
) -> Connection

A lazy reference to a connection by NoClick id, in the current (or given) user; credential:<id> for an account connected in the app. organization_id names a team workspace you're in, where one shared with that team is used.

Parameters
connection_idstrrequired
organization_idstr | Nonedefault None
clientClient | None

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

(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)
Returns
Connection

A connection that loads the first time you read a field. Nothing is sent yet.

Usage
connection = noclick.Connection.from_id("3f1d2c4b-8a7e-4f6d-9b2a-1c5e7d9f0a31", user="user_42")
print(connection.name, connection.status)

slack = noclick.Connection.from_id("credential:9b2a1c5e-7d9f-4a31-8f6d-3f1d2c4b8a7e")
slack.run("send_message", {"channel": "#ops", "text": "Deployed."})

createclassmethodasync

noclick.Connection.create(
    name, *, integration=None, credential_type=None, data=None, redirect_url=None,
    reason=None, send_to=None, allow_existing=False, origin=None, server_url=None,
    user=..., client=None
) -> Connection

Create a connection called name (unique per user; a duplicate raises noclick.Conflict with existing_id). With allow_existing=True a taken name returns the connection already there, as it is: its credential isn't replaced and no link is made. One of another integration still raises the Conflict. With data it holds that credential at once (validated and probed first); without, it's pending and connect_url is where someone connects it. send_to ("user", an email, or a dict) also delivers the link.

Parameters
namestrrequired
integrationAnydefault None
credential_typestr | Nonedefault None
datadict[str, Any] | Nonedefault None
redirect_urlstr | Nonedefault None
reasonstr | Nonedefault None
send_toAnydefault None
allow_existingbooldefault False
originstr | Nonedefault None
server_urlstr | Nonedefault 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
Connection

The new connection: pending with its connect_url, or connected (with its verification) when you passed data.

Usage

Create a pending connection and show the user its link:

with noclick.as_user("user_42"):
    slack = noclick.Connection.create("slack", integration="slack", reason="to post your team's standup")
    print(slack.connect_url)

Or create it holding a key you already have. A key the provider rejects raises noclick.InvalidRequest and saves nothing:

crm = noclick.Connection.create("crm", integration="affinity", data={"api_key": "..."}, user="user_42")
print(crm.status)   # connected

A model provider's connection is what an agent on a CLI harness thinks with (its model_connection). Pass a key as api_key; a Claude or ChatGPT plan is signed in only at the link, by the person it belongs to, on your account's connection as on a user's:

claude = noclick.Connection.create("claude", integration="anthropic", data={"api_key": "sk-ant-..."})
with noclick.as_user("user_42"):
    plan = noclick.Connection.create("claude", integration="anthropic")
    print(plan.connect_url)   # "Paste a Claude key" or "Sign in with Claude"

If the name may be taken, take the connection already there as it is:

slack = noclick.Connection.create("slack", integration="slack", user="user_42", allow_existing=True)
if not slack.connected:
    print(slack.connect_url)

origin="app" saves an account connected in the app instead, as the app's own forms do: your account's own (credential:<id>), its credential_type and data both given, named as you like, judged and proven first. An agent's environment variables and an MCP server's key (server_url: the server it's for) are saved this way too:

env = noclick.Connection.create("Deploy variables", origin="app", credential_type="agent_env",
                                data={"env": {"STRIPE_KEY": "sk_live_..."}})
print(env.variables)   # ["STRIPE_KEY"]

sign_inclassmethodasync

noclick.Connection.sign_in(
    provider, *, code=None, redirect_uri=None, code_verifier=None, scopes=None,
    name=None, inputs=None, oauth_app=None, reconnect=None, credential_type=None,
    server_url=None, client=None
) -> SignIn

Sign your account in to an app. With code: finish a sign-in whose authorize step a page of yours ran, the provider having handed its callback that code for redirect_uri (one it has registered for that page), with the PKCE code_verifier the page made where the provider takes one. Without one: start a sign-in that finishes on the provider's page, an agent plan's ("codex" for ChatGPT, "claude_code", "github_copilot", "xai") or a provider's device code. The provider's own sign-in runs, as the NoClick app's does, and stores the account's credential (credential:<id>); inputs carries what its connect form takes beside the code (a shop, a subdomain, a site), oauth_app an OAuth app of your own the sign-in ran on (client_id, client_secret), reconnect a connection a Claude plan's sign-in renews in place. An MCP server's sign-in is "mcp", with an integration's MCP credential_type ("canva_mcp") or any server's server_url, and the redirect_uri of your page its callback returns to: it waits on that callback (authorize_url; finish with its code and state), or on a key the server takes instead (way key; finish(api_key=...)). WhatsApp's is "whatsapp": a QR (qr_code, a PNG in base64) the person scans with their phone, which finish() (or wait()) asks about, answering the code WhatsApp rotated to meanwhile; reconnect re-scans into a number whose link ended. A connect link (connect_link()) runs the whole sign-in on NoClick's page instead, and is how one of your users signs in: this is your account's own.

Parameters
providerstrrequired
codestr | Nonedefault None
redirect_uristr | Nonedefault None
code_verifierstr | Nonedefault None
scopesSequence[str] | str | Nonedefault None
namestr | Nonedefault None
inputsdict[str, Any] | Nonedefault None
oauth_appdict[str, str] | Nonedefault None
reconnectstr | Nonedefault None
credential_typestr | Nonedefault None
server_urlstr | Nonedefault None
clientClient | None

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

(default None)
Returns
SignIn

The SignIn: connected with its credential (and connection), choose (a Supabase project, an Instagram account) with the choices to finish it with, or waiting with what the person does (user_code at verification_url, or authorize_url whose code you finish with). A code the provider refuses raises noclick.InvalidRequest in its words (Atlassian's names the sites it signs in to).

Usage
signed_in = noclick.Connection.sign_in("linear", code=code, redirect_uri="https://app.example/oauth/cb")
print(signed_in.connection.id, signed_in.account.get("email"))

supabase = noclick.Connection.sign_in("supabase", code=code, redirect_uri=callback, code_verifier=verifier)
if supabase.status == "choose":
    supabase = supabase.finish(supabase.choices[0]["id"])

chatgpt = noclick.Connection.sign_in("codex")
print(f"Enter {chatgpt.user_code} at {chatgpt.verification_url}")
chatgpt = chatgpt.wait()

claude = noclick.Connection.sign_in("claude_code")
print(f"Open {claude.authorize_url} and paste the code it shows")
claude = claude.finish(code=input("Code: "))

finish_sign_inclassmethodasync

noclick.Connection.finish_sign_in(
    sign_in_id, choice=None, *, code=None, state=None, api_key=None, client=None
) -> SignIn

Finish a sign-in that waits on the person by its id alone, as its answer may come back in another request than the one that started it: the id of the choice they picked (choose), the code they copied from the provider's page (a Claude plan) or the code and state an MCP sign-in's callback got, the api_key an MCP server takes in place of a sign-in, or nothing, to ask whether they've signed in (a device code).

Parameters
sign_in_idstrrequired
choicestr | Nonedefault None
codestr | Nonedefault None
statestr | Nonedefault None
api_keystr | Nonedefault None
clientClient | None

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

(default None)
Returns
SignIn

The SignIn: connected, or still waiting for the person; one finished, lapsed or another account's raises noclick.NotFound.

Usage
signed_in = noclick.Connection.finish_sign_in(request.args["sign_in"], request.args["project"])
print(signed_in.connection.id)

getclassmethodasync

noclick.Connection.get(
    ref, *, organization_id=None, user=..., client=None
) -> Connection

Load the connection with this id or name now; an unknown one raises noclick.NotFound. organization_id names a team workspace you're in, where one shared with that team is found.

Parameters
refstrrequired
organization_idstr | Nonedefault 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
Connection

The connection, loaded.

Usage
with noclick.as_user("user_42"):
    gmail = noclick.Connection.get("gmail")
    print(gmail.status, gmail.account)

listclassmethodasync

noclick.Connection.list(
    *, integration=None, origin=None, organization_id=None, include_in_app_only=False,
    limit=None, user_filter=None, user=..., client=None
) -> list[Connection]

The current user's connections (the account's own outside as_user), or those user_filter covers: named ones newest first, then, in the account's own scope, the accounts connected in the app. include_in_app_only adds everything else the app keeps there (in_app_only), as its Connections page lists them. origin keeps only "api" or "app" ones; organization_id reads in a team workspace you're in, where those shared with that team are listed too (and each runs there).

Parameters
integrationAnydefault None
originstr | Nonedefault None
organization_idstr | Nonedefault None
include_in_app_onlybooldefault False
limitint | None

Return at most this many.

(default None)
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[Connection]

Every matching connection (or the first limit), fetched page by page.

Usage
with noclick.as_user("user_42"):
    for connection in noclick.Connection.list():
        print(connection.name, connection.integration, connection.status)

every_gmail = noclick.Connection.list(integration="gmail", user_filter=noclick.ALL_USERS)
from_the_app = noclick.Connection.list(origin="app")
the_teams = noclick.Connection.list(organization_id="5c0d9e4a-7b1f-4e2a-9c3d-8f6b2a1e4d70")
everything = noclick.Connection.list(origin="app", include_in_app_only=True)

list_pageclassmethodasync

noclick.Connection.list_page(
    *, cursor=None, limit=None, integration=None, origin=None, organization_id=None,
    include_in_app_only=False, user_filter=None, user=..., client=None
) -> Page

One page of connections; pass next_cursor back as cursor.

Parameters
cursorstr | None

The next_cursor of the page before; omit it for the first page.

(default None)
limitint | None

Return at most this many.

(default None)
integrationAnydefault None
originstr | Nonedefault None
organization_idstr | Nonedefault None
include_in_app_onlybooldefault False
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
Page

A page whose data holds the connections and whose next_cursor is None on the last page.

Usage
page = noclick.Connection.list_page(limit=50, user_filter=noclick.ALL_USERS)
while True:
    for connection in page.data:
        print(connection.user_id, connection.name, connection.status)
    if page.next_cursor is None:
        break
    page = noclick.Connection.list_page(limit=50, user_filter=noclick.ALL_USERS, cursor=page.next_cursor)

integrationsclassmethodasync

noclick.Connection.integrations(
    query=None, *, kind=None, client=None
) -> list[IntegrationInfo]

The services NoClick can operate and the model providers its agents think with: every one, or those whose name or label contains query (ignoring case). kind="app" keeps the services, whose operations are tools; kind="model" keeps the model providers (anthropic, openai, openrouter, ...), which an agent names as its model_connection. The catalog is your account's, the same for every user.

Parameters
querystr | Nonedefault None
kindstr | Nonedefault None
clientClient | None

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

(default None)
Returns
list[IntegrationInfo]

Each one's name (what integration= takes), label, kind, operation_count, account_free_operation_count (how many run with no account, by the service's name), connect_with (how a person connects an account), events (the app events an OnEvent trigger takes from it, empty for one that only acts) and subscription (whether its link also offers signing in with a Claude or ChatGPT plan).

Usage

Find a service, then make a connection to it:

[crm] = noclick.Connection.integrations("affinity")
print(crm.label, crm.connect_with)   # Affinity ['key']
with noclick.as_user("user_42"):
    affinity = noclick.Connection.from_name("crm", integration=crm, create_if_missing=True)
    print(affinity.connect_url)

Or list every service a person connects by signing in:

for service in noclick.Connection.integrations():
    if "oauth" in service.connect_with:
        print(service.name, service.label)

Or the services with operations that need no account, which run by the service's name with no connection (noclick.run("exa.search", ...)):

for service in noclick.Connection.integrations():
    if service.account_free_operation_count:
        print(service.name, service.account_free_operation_count)   # exa 4

Or whether a service can wake an agent at all, before you build on it:

[tiktok] = noclick.Connection.integrations("tiktok")
print(tiktok.events)   # [] : it publishes, and no OnEvent hears it

Or the model providers an agent's model_connection can name:

for provider in noclick.Connection.integrations(kind="model"):
    print(provider.name, provider.connect_with, provider.subscription)   # anthropic ['key'] True

only

connection.only(*operations) -> ConnectionOperations

A tool ref to some of its operations, for tools= (gmail.only("send_email_message")); a lazy create_if_missing connection is still created first.

Parameters
*operationsstr
Returns
ConnectionOperations

A ref to just those operations of this connection, to list in tools=; bind(...) on it fixes arguments the model mustn't choose.

Usage

A large integration doesn't fit an agent whole, so name the operations it needs:

with noclick.as_user("user_42"):
    stripe = noclick.Connection.from_name("stripe", integration="stripe", create_if_missing=True)
    support = noclick.Agent.from_name(
        "support", create_if_missing=True,
        instructions="You answer the user's billing questions.",
        tools=[stripe.only("list_invoices", "search_charges"), "search"],
    )

checkout

connection.checkout(repository, *, branch=None, path=None, push=None) -> RepoCheckout

One of this connection's repositories (owner/name on its git host; a github connection) checked out in an agent's workspace, for Agent(repos=[...]): cloned into /workspace/<path> (the repository's name when omitted) at a conversation's first turn, on branch (its default when omitted). The agent's git reaches this repository only, through NoClick, with a key made for its sandbox and revoked when the sandbox ends; the connection's own token never enters it. push is the branches it may push to, as globs: NoClick refuses a push to any other ref, and without push the checkout is read-only. gh reads the repository (gh api repos/<owner>/<name>/...) and nothing more, since its writes could move a branch past push: give the agent the connection's operations (github.only("create_pull_request")) for pull requests and issues, which your policy judges. Sends nothing; a lazy create_if_missing connection is created when the agent is saved, and the connection must be connected before a turn can clone.

Parameters
repositorystrrequired
branchstr | Nonedefault None
pathstr | Nonedefault None
pushstr | Sequence[str] | Nonedefault None
Returns
RepoCheckout

A RepoCheckout to list in an agent's repos.

Usage

A docs agent that pushes only to branches it names noclick/...:

github = noclick.Connection.from_name("github", integration="github", create_if_missing=True)
writer = noclick.Agent.from_name(
    "docs-writer",
    create_if_missing=True,
    instructions="You fix the docs issues you're given in /workspace/docs and open a pull request.",
    harness="claude_code",
    model_connection="claude",
    tools=[github.only("create_pull_request")],
    repos=[github.checkout("acme/docs", push="noclick/*")],
)

Read-only, on a branch, in a folder of your choosing:

github = noclick.Connection.from_name("github")
reference = github.checkout("acme/api", branch="release-2.4", path="api")

operationsasync

connection.operations(search=None) -> list[IntegrationOperation]

The operations of this connection's integration: every one, or those whose name or description contains search (ignoring case).

Parameters
searchstr | Nonedefault None
Returns
list[IntegrationOperation]

Each operation's name, description, the JSON schema of its parameters, needs_account (False when it runs on NoClick's key, with no connection or on a pending one) and read_only, a hint from its name rather than a guarantee.

Usage

See what a user's Slack can do before anyone has connected it. With integration= nothing is loaded or created to answer:

with noclick.as_user("user_42"):
    slack = noclick.Connection.from_name("slack", integration="slack", create_if_missing=True)
    for op in slack.operations(search="message"):
        print(op.name, op.read_only, op.description)

Find the operations that need no account. They run by the integration's name with no connection at all (noclick.run("exa.search", ...)), and reading them creates nothing:

exa = noclick.Connection.from_name("exa", integration="exa")
keyless = [op.name for op in exa.operations() if not op.needs_account]

operationasync

connection.operation(name) -> IntegrationOperation

One operation of this connection's integration; an unknown name raises noclick.NotFound.

Parameters
namestrrequired
Returns
IntegrationOperation

The operation, with the JSON schema of the parameters that run takes for it.

Usage

Read an operation's parameters before running it:

slack = noclick.Connection.from_name("slack", integration="slack", user="user_42")
send = slack.operation("send_message_to_channel")
print(send.description, send.parameters["required"])
slack.run("send_message_to_channel", {"channel": "#general", "text": "Standup in 5"})

eventsasync

connection.events() -> list[IntegrationEvent]

The app events this connection's integration can wake an agent with, for noclick.OnEvent. A poll (new mail in Gmail, say) is no event here: only what the app pushes as it happens.

Returns
list[IntegrationEvent]

Every event, with its description and the filters it takes (channel for a Slack message, repository for a GitHub issue).

Usage
slack = noclick.Connection.from_name("slack", integration="slack", user="user_42")
for event in slack.events():
    print(event.name, event.description, list(event.filters))

integration_eventsstaticasync

noclick.Connection.integration_events(
    integration, *, client=None
) -> list[IntegrationEvent]

The app events an integration (gmail, slack, ...) can wake an agent with, for noclick.OnEvent, read by its name: no connection needed.

Parameters
integrationstrrequired
clientClient | None

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

(default None)
Returns
list[IntegrationEvent]

Every event, with its description, the filters it takes and what its data has held in your account's own events.

Usage
for event in noclick.Connection.integration_events("slack"):
    print(event.name, list(event.filters))

chat_profilesasync

connection.chat_profiles(jids, *, user=...) -> list[ChatProfile]

Each chat's profile on a WhatsApp number linked by QR code: its picture (avatar_url, a lasting link to NoClick's copy) and a group's name, None where it has none, hides it, or isn't known yet (a later read has it). jids are chat ids as its messages give them (12025550101@c.us, an @lid, a group's @g.us), up to 100. Personal data: show them only to people who may read this connection.

Parameters
jidsSequence[str]required
userAny

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

(defaults to the current user)
Returns
list[ChatProfile]

Each chat's ChatProfile.

Usage
whatsapp = noclick.Connection.from_name("whatsapp")
for chat in whatsapp.chat_profiles(["12025550101@c.us"]):
    print(chat.jid, chat.name, chat.avatar_url)

login_mailasync

connection.login_mail(*, user=...) -> LoginMail

On a website login NoClick signed up for: its own email address (the account's email at the site) and the mail the site sent there, newest first, each kept 7 days. NoClick types its codes and opens its verification links for the browser signing in; this is for a person reading the login's page, never a model.

Parameters
userAny

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

(defaults to the current user)
Returns
Usage
login = noclick.Connection.from_name("acme-com")
mail = login.login_mail()
for message in mail.messages:
    print(message.subject, message.kind)

requestasync

connection.request(*, reason=None, send_to='user', redirect_url=None) -> ConnectLink

Ask the user (or send_to) to connect it: a new connect link, emailed. A connection of your account's own has no user: send it to "owner" (your account's owner) or an email.

Parameters
reasonstr | Nonedefault None
send_toAnydefault 'user'
redirect_urlstr | Nonedefault None
Returns
ConnectLink

The link, already sent: delivered_via says where it went, and .wait() on it returns the connected Connection.

Usage
gmail = noclick.Connection.from_name("gmail", user="user_42")
if gmail.refresh().status == "disconnected":
    link = gmail.request(reason="Gmail stopped working. Reconnect it to keep your summaries coming.")
    print(link.delivered_via)   # ['email']

waitasync

connection.wait(timeout=None) -> Connection

Block until an account is connected (returns at once when it is). It follows the connection, not one link: an account connected through any of its links ends the wait, and a link that lapses after a fresh one was made (connect_link() or request(), from anywhere) hands the wait to the fresh one. Raises noclick.OperationExpired when the open link lapses with no fresh one, or noclick.OperationTimeout after timeout seconds.

Parameters
timeoutfloat | Nonedefault None
Returns
Connection

This connection, connected. After a wait it's reloaded, so account names the account when the provider says who it is.

Usage

Wait in a background job, not while a web request is open:

gmail = noclick.Connection.from_name("gmail", user="user_42")
gmail.wait(timeout=3600)
print(gmail.account)   # ana@example.com

If the link lapses first, send a fresh one and keep waiting:

gmail = noclick.Connection.from_name("gmail", user="user_42")
try:
    gmail.wait()
except noclick.OperationExpired:
    gmail.request(reason="to send your weekly summaries")
    gmail.wait()

import_async

connection.import_(data, *, credential_type=None) -> Connection

Replace the connection's credential with one you hold (a rotated key), validated and probed first. credential_type, when the integration takes more than one, is one of its credential_types (Connection.integrations()). An account connected in the app keeps its id and its kind: its owner, or someone it's shared with to edit, gives it the new key in place, so whatever uses it keeps working.

Parameters
datadict[str, Any]required
credential_typestr | Nonedefault None
Returns
Connection

This connection, holding the new key, with the probe's verification. The key it replaced is deleted.

Usage

Rotate a key:

crm = noclick.Connection.from_name("crm", user="user_42")
crm.import_({"api_key": "..."})
print(crm.status, crm.verification)

Or bring your own key for a service whose operations need no account: a connection named after it runs its refs ("exa.search") on your key instead of NoClick's:

exa = noclick.Connection.from_name("exa", integration="exa", create_if_missing=True)
exa.import_({"api_key": "..."})
print(exa.verification)

runasync

connection.run(operation, arguments=None, *, approval_id=None) -> Any

Run one of the integration's operations in this account. An operation that needs no account (needs_account False in operations()) runs on NoClick's key while the connection is pending, and needs no connection at all through noclick.run; any other raises noclick.NeedsConnection until it's connected and noclick.CredentialDisconnected once revoked (both carry connect_url). A connection holding your own key runs every operation on it. Policy may raise noclick.PolicyDenied or noclick.ApprovalRequired (retry with its approval_id= once .operation.wait() is True). When the service refuses the call, it raises noclick.UpstreamError in the service's own words, with its HTTP status in upstream_status.

Parameters
operationstrrequired
argumentsdict[str, Any] | Nonedefault None
approval_idstr | Nonedefault None
Returns
Any

The operation's data, as plain data (what the service answered).

Usage

Run an operation in the user's account:

gmail = noclick.Connection.from_name("gmail", user="user_42")
gmail.run("send_email_message", {
    "to": ["ana@example.com"],
    "subject": "Your weekly summary",
    "body": "Three invoices were paid this week.",
})

A pending connection runs the operations that need no account at once, on NoClick's key:

exa = noclick.Connection.from_name("exa", integration="exa", create_if_missing=True)
results = exa.run("search", {"query": "invoice automation for small businesses"})

If nothing is connected yet, send the user the link and retry once they've connected:

gmail = noclick.Connection.from_name("gmail", user="user_42")
args = {"to": ["ana@example.com"], "subject": "Your weekly summary", "body": "..."}
try:
    gmail.run("send_email_message", args)
except noclick.NeedsConnection as err:
    notify_user(err.connect_url)
    gmail.wait()
    gmail.run("send_email_message", args)

When your policy holds the call for a person's approval, wait for it and repeat the identical call with the approval's id:

gmail = noclick.Connection.from_name("gmail", user="user_42")
args = {"to": ["ana@example.com"], "subject": "Your weekly summary", "body": "..."}
try:
    gmail.run("send_email_message", args)
except noclick.ApprovalRequired as pending:
    if pending.operation.wait():
        gmail.run("send_email_message", args, approval_id=pending.approval_id)

lookupasync

connection.lookup(
    field, arguments=None, *, search=None, page_token=None
) -> LookupOptions

List the allowed values of an ID-like field (channels, repos, sheets) in this account.

Parameters
fieldstrrequired
argumentsdict[str, Any] | Nonedefault None
searchstr | Nonedefault None
page_tokenstr | Nonedefault None
Returns
LookupOptions

One page of options, each with a value to pass and a label to show; next_page_token is set when there are more.

Usage

Fill a picker from the user's own Slack:

slack = noclick.Connection.from_name("slack", user="user_42")
for option in slack.lookup("channel", search="gen"):
    print(option.value, option.label)

A lookup that depends on another argument (a sheet inside a spreadsheet) takes it in arguments; pass next_page_token back as page_token for more:

sheets = noclick.Connection.from_name("sheets", user="user_42")
spreadsheet = {"spreadsheet_id": "1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upms"}
tabs = sheets.lookup("sheet_name", spreadsheet)
if tabs.next_page_token:
    more = sheets.lookup("sheet_name", spreadsheet, page_token=tabs.next_page_token)

usageasync

connection.usage(model=None, *, fresh=False) -> PlanUsage

How much of a Claude or ChatGPT plan is used.

Args: model: Only the windows that can stop this model ("claude-opus-5-5"): a per-model window of another model is left out. None: every window. fresh: Ask the provider when the last reading is a few minutes old (2 for ChatGPT, 5 for Claude); else the last reading NoClick kept, whether a provider's or what a harness reported after a turn.

Parameters
modelstr | Nonedefault None
freshbooldefault False
Returns
PlanUsage

Its state (ok, near from 80% used, used_up, unknown), its windows, the one that stops it first (tightest), when a used-up plan runs again (available_at) and what to do meanwhile (next_steps). Raises InvalidRequest for a connection that isn't a plan.

Usage
plan = noclick.Connection.from_id("credential:3f2a...")
used = plan.usage(model="claude-opus-5-5", fresh=True)
print(used.state, used.tightest.label, used.tightest.left)   # near  5-hour  0.09

check_accessasync

connection.check_access() -> dict[str, Any]

Whether the account may use the provider's API at all, where a provider can refuse it after a sign-in (Google Business Profile gives a new project no quota). An integration with no such check answers valid.

Returns
dict[str, Any]

valid (None where the provider couldn't say), the provider's error and where to fix it (help_url).

Usage
access = noclick.Connection.get("credential:...").check_access()
if access["valid"] is False:
    print(access["error"], access["help_url"])

access_forasync

connection.access_for(*, node_type=None, workflow=None) -> ConnectionAccessCheck

Whether its account works where the app is about to use it: with node_type, that step type's own check of the provider's access (as check_access() runs it); with workflow, whether that workflow's automatic runs can use the account as its owner. Never a secret.

Parameters
node_typestr | Nonedefault None
workflowAnydefault None
Returns
ConnectionAccessCheck

runs_for_owner and reason for a workflow, valid and error for a step type (None for what wasn't asked).

Usage
access = noclick.Connection.get("credential:...").access_for(workflow="6f1c…")
if access.runs_for_owner is False:
    print(access.reason)

number_agentasync

connection.number_agent() -> NumberAgent

The agent answering a WhatsApp number your account linked by QR code (a "whatsapp" sign-in), and whether your account can put one on it. Linking a number makes no agent on its own.

Returns
NumberAgent

The NumberAgent: its agent_id, name and channel, all None while no agent answers the number, and available.

Usage
number = noclick.Connection.get("credential:...")
print(number.number_agent().name)   # WhatsApp, or None while no agent answers it

make_number_agentasync

connection.make_number_agent() -> NumberAgent

Put NoClick's WhatsApp agent on a number your account linked by QR code, as the app offers it once a number is linked: an agent from the WhatsApp template, in a channel of its own that opens asking you whom it answers. One that already answers the number is kept (created False). Your account's owner or one of its own keys does this; an agent or an MCP client makes one with noclick.Agent.create and the whatsapp template.

Returns
NumberAgent

The NumberAgent answering the number, created when this call made it.

Usage
made = noclick.Connection.get("credential:...").make_number_agent()
print(made.name, made.channel_name)   # WhatsApp whatsapp

verifyasync

connection.verify() -> Verification | None

Re-check the account against the provider. Each check asks the provider, so an account makes at most 20 a minute (noclick.RateLimited past them).

Returns
Verification | None

The provider's verdict, also kept as verification: reachable is True when it accepted the account, False when it refused it, and None when NoClick can't tell; message says what was found, and samples, noun, total, account_label and error what the provider showed or said.

Usage
gmail = noclick.Connection.from_name("gmail", user="user_42")
check = gmail.verify()
print(check.reachable, check.message)   # True  Signed in as ana@example.com.

require_approvalasync

connection.require_approval(*operations) -> Connection

From now on its owner approves each call of these operations, wherever it runs: your code, agents, and the app's workflows. "*" means every operation. It only ever adds to approval_operations (lift_approval lifts). On one shared with your account, noclick.PermissionDenied.

Parameters
*operationsstr
Returns
Connection

The connection, with its approval_operations.

Usage
gmail = noclick.Connection.from_name("gmail")
gmail.require_approval("send_email_message", "delete_message")
print(gmail.approval_operations)   # ['delete_message', 'send_email_message']

lift_approvalasync

connection.lift_approval(*operations) -> list[PolicyChange]

Let calls of these operations run without its owner's OK again: each named as approval_operations names it, or none to lift every one ("*" lifts the rule for every operation, leaving any named on their own). Signed in as your account's owner it applies at once, and so it does from your agent (NoClick's assistant, or any agent of yours) on a turn your own message started, recorded as yours. One a model makes on its own (a turn no message of yours started, a connected app, a key used through MCP) waits for your approval. From a key it needs one naming the approvals:policy scope (a key with every scope, *, holds it only when it's named too) and credentials:use, and it waits a 10-minute undo window, in which noclick.ApprovalPolicy.undo(change.id) takes it back; the owner is told. Requiring approval for one of them again meanwhile takes it back too.

Parameters
*operationsstr
Returns
list[PolicyChange]
The change it made: ``pending`` while it waits, ``effective_at`` when it takes effect.
The connection's ``approval_operations`` read as they stand.

Raises: noclick.PermissionDenied: a key without approvals:policy, a call acting for one of your users, an app's code, or one shared with your account. noclick.InvalidRequest: an operation it asks no approval for. noclick.Conflict: it asks no approval at all, or a lift of the same operation already waits.

Usage
gmail = noclick.Connection.from_name("gmail")
[change] = gmail.lift_approval("send_email_message")
print(change.pending, change.effective_at)   # True 2026-11-22 09:10:00+00:00

renameasync

connection.rename(name) -> Connection

Rename an account connected in the app (origin app): the name your account and the app see, which nothing finds it by. Its owner renames it, or someone it's shared with to edit (noclick.PermissionDenied otherwise). A named connection's name is how code finds it, so it isn't renamed (noclick.InvalidRequest).

Parameters
namestrrequired
Returns
Connection

The connection, with its new name.

Usage
inbox = noclick.Connection.get("credential:...")
inbox.rename("Sales inbox")
print(inbox.name)   # Sales inbox

mark_test_accountasync

connection.mark_test_account(test_account=True) -> Connection

Mark it as a test account (or, with False, not one). An app's preview only reads through a connection; through a test account it writes as well, as production does. Only the account that connected it marks it (noclick.PermissionDenied on one shared with yours), and it must hold an account (noclick.InvalidRequest while pending).

Parameters
test_accountbooldefault True
Returns
Connection

The connection, with test_account set.

Usage
slack = noclick.Connection.from_name("slack-sandbox")
slack.mark_test_account()
print(slack.test_account)   # True

tokenasync

connection.token() -> Token

Mint a fresh OAuth access token for calling the provider yourself. A model provider's connection never hands out its key or plan token (noclick.PermissionDenied).

Returns
Token

The access token, its token_type and when it expires_at; never a refresh token or an API key.

Usage
gmail = noclick.Connection.from_name("gmail", user="user_42")
token = gmail.token()
headers = {"Authorization": f"{token.token_type} {token.access_token}"}

deleteasync

connection.delete() -> None

Delete the connection, revoking its account at the provider where possible.

Usage
noclick.Connection.from_name("gmail", user="user_42").delete()

ChatProfile

class ChatProfile

A chat's profile on a WhatsApp number linked by QR code: its jid (as its messages give it), its picture (avatar_url) and, a group's, its name.

Attributes
jidstr
namestr | None
avatar_urlstr | None
rawdict[str, Any]

The response JSON exactly as the API sent it.

LoginMail

class LoginMail

A website login's own address (None for one a person added) and the messages sent there.

Attributes
addressstr | None
messageslist[LoginMessage]
rawdict[str, Any]

The response JSON exactly as the API sent it.

LoginMessage

class LoginMessage

A message a site sent a website login's own address: who from (sender), its subject and text, what it carried (kind: code, link or mail), and when it came and goes.

Attributes
idstr
senderstr
subjectstr | None
textstr
kindstr
received_atstr | None
expires_atstr | None
rawdict[str, Any]

The response JSON exactly as the API sent it.

run

noclick.run(ref, arguments=None, *, approval_id=None, user=..., client=None) -> Any

Run one operation by its ref, "name.operation", as tools= names it. name is a connection in the scope the call acts for (the user's, else the account's), else an integration whose operation needs no account, which then runs on NoClick's key with no connection at all. A connection named like the integration (exa, holding your own key) wins, so the same ref then runs on your key. An account connected in the app is "credential:<id>.operation".

It raises like connection.run: noclick.NeedsConnection (or noclick.CredentialDisconnected) with the connect_url when the connection has no working account, noclick.InvalidRequest when the operation needs an account and no connection has that name, noclick.NotFound when name is neither a connection nor an integration, noclick.PolicyDenied or noclick.ApprovalRequired (retry with its approval_id= once .operation.wait() is True), and noclick.UpstreamError when the service refuses the call (its own words, its HTTP status in upstream_status).

Parameters
refstrrequired
argumentsdict[str, Any] | Nonedefault None
approval_idstr | Nonedefault 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
Any

The operation's data, as plain data (what the service answered).

Usage

Search the web with nothing to create or connect, on NoClick's key:

results = noclick.run("exa.search", {"query": "invoice automation for small businesses"})

A name that is a connection runs through it, here the user's own Gmail:

with noclick.as_user("user_42"):
    noclick.run("gmail.send_email_message", {
        "to": ["ana@example.com"],
        "subject": "Your weekly summary",
        "body": "Three invoices were paid this week.",
    })

Bring your own key: a connection named exa holding it takes over the same ref:

noclick.Connection.create("exa", credential_type="exa_api_key", data={"api_key": "..."})
results = noclick.run("exa.search", {"query": "invoice automation for small businesses"})

When your policy holds the call for a person's approval, wait for it and repeat the identical call with the approval's id:

args = {"to": ["ana@example.com"], "subject": "Your weekly summary", "body": "..."}
try:
    noclick.run("gmail.send_email_message", args, user="user_42")
except noclick.ApprovalRequired as pending:
    if pending.operation.wait():
        noclick.run("gmail.send_email_message", args, user="user_42", approval_id=pending.approval_id)

ConnectionOperations

class ConnectionOperations

Some of a connection's operations as tools (connection.only(...)), with the arguments bind(...) fixed.

Attributes
connectionConnection
operationslist[str]
bindingsdict[str, Any]

The arguments NoClick fills on every call, out of the model's reach.

bind

connection_operations.bind(**arguments) -> ConnectionOperations

Fix arguments of these operations: a bound parameter leaves the tool's schema, so the model never sees or sets it, and NoClick fills it on every call. A value may name the user the call acts for: {{user.id}}, {{user.email}}, {{user.name}} or {{user.metadata.<key>}}. A bound value always wins, over what a model passes through in an operation's free-form parameters too; a tool whose binding can't be filled (a user with no email, say) isn't offered that turn. Policy judges the call's final arguments. Every operation listed must take each bound parameter. Works wherever tools do: agents, toolkits and hosted MCP servers. Sends nothing.

Parameters
**argumentsAny
Returns
ConnectionOperations

A new ref with these arguments bound on top of any bound before.

Usage

An assistant that can email only its own user, whatever a message it reads says:

with noclick.as_user("user_42"):
    gmail = noclick.Connection.from_name("gmail", integration="gmail", create_if_missing=True)
    assistant = noclick.Agent.from_name(
        "assistant",
        create_if_missing=True,
        instructions="You summarize the user's inbox and email them the summary.",
        tools=[gmail.only("fetch_emails_from_inbox"), gmail.only("send_email_message").bind(to="{{user.email}}")],
    )

Pin a shared account connection to each user's own records:

hubspot = noclick.Connection.from_name("hubspot")
crm = hubspot.only("search_contacts").bind(owner_id="{{user.metadata.hubspot_owner}}")
toolkit = noclick.Toolkit([crm, "search"])

CredentialRequest

class CredentialRequest

A request for someone to connect an account of theirs (ConnectLink.create): who it went to (or none, for a link to copy), what it asks for, and the page they connect on. The account they connect is theirs.

Attributes
idstr
urlstr | None

The page they connect on.

credential_typestr
target_emailstr | None
statusstr

pending, fulfilled, cancelled or expired.

expires_atAny
rawdict[str, Any]

The response JSON exactly as the API sent it.

ConnectionAccessCheck

class ConnectionAccessCheck

What connection.access_for() answers: each part only when it was asked for.

Attributes
runs_for_ownerbool | None

With a workflow: whether its automatic runs can use the account as its owner.

reasonstr | None

Why they can't, when they can't.

validbool | None

With a step type: whether the provider lets the account in (its own check).

errorstr | None

The provider's words when it doesn't.

rawdict[str, Any]

The response JSON exactly as the API sent it.

SignIn

class SignIn

A sign-in to an app (Connection.sign_in): status connected with the credential it stored and the connection it is (none for a plan the platform's agents don't run on: GitHub Copilot, xAI); choose when the provider asks the person to pick (what: a project, an instagram_account) from choices (each with its id); or waiting while the person signs in on the provider's page (way device: enter user_code at verification_url, then wait; code: open authorize_url and finish with the code it shows; an MCP server's redirect: open authorize_url and finish with the code and state your callback got, or key: finish with the key it takes). account is what the provider says of the account signed in to (an email, a team, a site); never a token.

Attributes
idstr | None
statusstr
providerstr
connectionConnection | None
credentialdict[str, Any] | None
accountdict[str, Any]
waystr | None
user_codestr | None
verification_urlstr | None
verification_url_completestr | None
authorize_urlstr | None
intervalint | None
qr_codestr | None

WhatsApp's QR to scan (way qr): a PNG in base64, which WhatsApp rotates while it waits.

statestr | None

An MCP sign-in's state, which its callback returns with the code.

server_namestr | None

Who an MCP server says signs it in.

verificationVerification | None

An MCP server's proof of the account it signed in to (the tools it lists for it).

expires_atAny
whatstr | None
choiceslist[dict[str, Any]]
rawdict[str, Any]

finishasync

sign_in.finish(choice=None, *, code=None, state=None, api_key=None) -> SignIn

Finish a sign-in that waits on the person: with the id of the choice they picked, the code they copied from the provider's page, or nothing, to ask whether they've signed in.

Parameters
choicestr | Nonedefault None
codestr | Nonedefault None
statestr | Nonedefault None
api_keystr | Nonedefault None
Returns
SignIn

The SignIn: connected, or still waiting.

Usage
if signed_in.status == "choose":
    signed_in = signed_in.finish(signed_in.choices[0]["id"])

waitasync

sign_in.wait(*, timeout=900) -> SignIn

Ask, every interval seconds, whether the person has entered user_code (a device code's sign-in) or scanned the QR (WhatsApp's), until they have, or timeout seconds pass (noclick.OperationTimeout). WhatsApp rotates its QR while it waits: to show the newest, ask with finish() instead, which answers it as qr_code.

Parameters
timeoutfloatdefault 900
Returns
SignIn

The SignIn, connected; a refusal (the code expired, the person declined) raises noclick.InvalidRequest.

Usage
chatgpt = noclick.Connection.sign_in("codex")
print(f"Enter {chatgpt.user_code} at {chatgpt.verification_url}")
chatgpt = chatgpt.wait()

NumberAgent

class NumberAgent

The agent answering a WhatsApp number of your account's (Connection.number_agent): agent_id and name, with the channel the owner talks to it in (channel_id, channel_name), all None while no agent answers it; available whether your account can put one on it (it has agents of its own), and created whether make_number_agent made it just now.

Attributes
availablebool
agent_idstr | None
namestr | None
channel_idstr | None
channel_namestr | None
createdbool
rawdict[str, Any]

The response JSON exactly as the API sent it.

Verification

class Verification

Whether the provider accepted the credential (reachable None = cannot judge): things of the account's own as the provider sees them (samples, which are noun, total of them when more), who it signs in as (account_label), whether that proves the account (proves account) or only that the key was accepted (reachability), and a refusal in the provider's own words (error).

Attributes
reachablebool | None
sampleslist[Any]
messagestr | None
hintstr | None
nounstr | None
totalint | None
account_labelstr | None
provesstr | None
errorstr | None
rawdict[str, Any]

The response JSON exactly as the API sent it.

ConnectionShared

class ConnectionShared

How an account shared with yours reaches it: shared with your account's person (with_ you) or with the team workspace it's read in (workspace), and who shared it (by_name, by_email).

Attributes
with_str
by_namestr | None
by_emailstr | None
rawdict[str, Any]

The response JSON exactly as the API sent it.

ConnectionHealth

class ConnectionHealth

A provider's live word on a linked session (a WhatsApp number's, a Discord install's): healthy, the provider's own word for its state (status) and, when it isn't healthy, what to do (hint).

Attributes
healthybool
statusstr
hintstr | None
rawdict[str, Any]

The response JSON exactly as the API sent it.

Token

class Token

A short-lived OAuth access token (never a refresh token or API key).

Attributes
access_tokenstr
token_typestr | None
expires_atAny
rawdict[str, Any]

The response JSON exactly as the API sent it.

LookupOption

class LookupOption
Attributes
valueAny
labelstr | None
rawdict[str, Any]

The response JSON exactly as the API sent it.

LookupOptions

class LookupOptions(list[LookupOption])

A page of options; pass next_page_token back as page_token.

Attributes
next_page_tokenstr | None

Plan

class Plan

A Claude or ChatGPT plan's tier: tier as NoClick names it ("max_20x", "plus", "free") and label as its provider does ("Ultra", "Plus"), both None until NoClick has read them; the harnesses it runs (runs), and why it runs none (refusal: "ChatGPT Free doesn't include Codex.").

Attributes
tierstr | None
labelstr | None
runslist[str]
refusalstr | None
rawdict[str, Any]

The response JSON exactly as the API sent it.

PlanWindow

class PlanWindow

One of a plan's limits: kind (five_hour, weekly, weekly_model, other), label ("5-hour", "Opus weekly"), the models it limits (empty: every model), how much of it is used and left (0 to 1), when it resets_at, and its state (ok, near from 80% used, used_up).

Attributes
kindstr
labelstr
modelslist[str]
usedfloat
leftfloat
resets_atAny
statestr
rawdict[str, Any]

The response JSON exactly as the API sent it.

PlanUsage

class PlanUsage(PlanUsageSummary)

How much of a plan is used: PlanUsageSummary's fields over the windows that can stop the model asked about, what to do meanwhile (next_steps), where the reading came from (source: provider or harness), the plan, the connection it's of and its provider (integration: anthropic or openai).

Attributes
windowslist[PlanWindow]
next_stepslist[PlanNextStep]
sourcestr | None
planPlan | None
connectionstr | None
integrationstr | None

PlanUsageSummary

class PlanUsageSummary

A plan's usage as a list shows it, over every window: its state (ok, near, used_up, unknown), the window that stops it first (tightest), when a used-up plan is back (available_at) and when it was read (as_of).

Attributes
statestr
tightestPlanWindow | None
available_atAny
as_ofAny
rawdict[str, Any]

The response JSON exactly as the API sent it.

PlanNextStep

class PlanNextStep

What to do while a plan is near or past its limit: wait until it's back (until), run on another connection (a key pays per_use), run on NoClick's key (noclick_key, at_cost), or connect another. state is another plan's own for the model asked about (near: nearly used too); None for a key.

Attributes
kindstr
labelstr
untilAny
connectiondict[str, Any] | None
paysstr | None
rawdict[str, Any]

The response JSON exactly as the API sent it.

statestr | None

IntegrationInfo

class IntegrationInfo

A service NoClick can operate, such as gmail, or a model provider an agent thinks with, such as anthropic: one of Connection.integrations(). Its name is what integration= takes.

Attributes
namestr
labelstr | None
kindstr

"app", a service whose operations are tools, or "model", a model provider whose connection an agent names as its model_connection (never in tools=).

subscriptionbool

Whether its connect link also offers signing in with the provider's plan (a Claude or ChatGPT subscription) instead of pasting a key, signed in by the person it belongs to.

connect_withlist[str]

How a person connects an account: "oauth" (signing in), "key" (pasting a key or token), "qr" (scanning a code) or "purchase" (a phone number, bought rather than connected).

operation_countint | None
account_free_operation_countint

How many of its operations need no account (0 for most): noclick.run and tools= run them on NoClick's key by the integration's name ("exa.search"), with no connection.

credential_typeslist[str]

The exact credential types it takes, for credential_type= when you import a key you hold (connection.import_, Connection.create).

eventslist[str]

The app events an OnEvent trigger takes from it (connection.events() has their filters). Empty for one that only acts: nothing it does wakes an agent.

rawdict[str, Any]

The response JSON exactly as the API sent it.

IntegrationOperation

class IntegrationOperation

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

Attributes
namestr
descriptionstr | None
parametersdict[str, Any]
read_onlybool | None

A hint from the operation's name (reads start with list_, get_ and the like), not a guarantee.

scopeslist[str]

The OAuth scopes it needs, where NoClick knows them.

needs_accountbool

False when it runs on NoClick's key with no account at all (web search, public data), so it runs with no connection ("exa.search") and on a pending one; True otherwise, also when the need depends on its arguments.

rawdict[str, Any]

The response JSON exactly as the API sent it.

IntegrationEvent

class 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). shape is what its data holds, each field's type ("string", "integer", "boolean", "null", an object, [...] for a list) as the event has reached your account, and sample that shape with a placeholder for each value (what subscription.test() sends as data); both None until one has. Another account's events never show here.

Attributes
namestr
descriptionstr | None
filtersdict[str, str]
shapedict[str, Any] | None
sampledict[str, Any] | None
rawdict[str, Any]

The response JSON exactly as the API sent it.