Agent

Agents: hosted agents you message by name.

class Agent

A hosted agent. Agent.from_name("host", create_if_missing=True, instructions=...) is lazy; agent.message("hi").text talks to it.

An account-level agent is shared: each user that messages it (via as_user or user=) gets its own conversations. A user's own agent always acts for that user.

The agents built in the NoClick app are listed and messaged here too (origin app, an id like node:<workflow>:<node>): send and message reach them, and what they are is changed in the app.

Attributes
idstr
originstr | None

api for an agent made through the API, app for one built in the NoClick app.

namestr
modelstr | None

The model it runs, as its harness names it (sonnet, openrouter/...).

harnessstr | None

What runs it: sdk, claude_code, codex, opencode, hermes or openclaw.

model_connectionstr | None

The connection whose key or plan it thinks with, by name (None on sdk without one). Hidden, like instructions, from a user's session reading an account agent.

instructionsstr | None
toolslist[Any]

What it can use, as listed: refs, {tool, bind} for an operation with arguments bound and {human, tools} for a person.

tool_rulesdict[str, str]

What it may do with each app it reaches, {key: 'allow' | 'ask' | 'off'} (empty: everything its tools give is allowed). See create.

can_requestlist[str]

What it may ask its user to connect at run time.

user_idstr | None
workflow_idstr | None
node_idstr | None

An app agent's step in its workflow (None for an API agent).

workflow_namestr | None

An app agent's workflow, by name.

accessstr | None

An app agent's workflow as you hold it: owner, or editor or viewer when it was shared with you (only an owner's or an editor's takes messages).

enabledbool | None

Whether an app agent is switched on; a disabled one takes no messages.

app_urlstr | None

Where an app agent is changed: its workflow in the NoClick app.

parent_idstr | None
ttl_sint | None

Its time to live, in seconds (None if it isn't temporary); expires_at is when it runs out, sooner for a temporary parent's child.

expires_atAny

When a temporary agent's ttl_s runs out (None if it isn't temporary): then expired, taking no turns, readable for 30 days.

budget_usd_per_monthfloat | None
regionstr | None

The region its sandboxes run in (noclick.regions()), fixed when it was created; None: wherever NoClick has capacity.

machine_idstr | None

The Machine its harness runs on (None: a sandbox of its own; invite-only beta).

created_atAny
browser_profile_idstr | None

The browser profile its browser tool signs in with, of its own scope.

card_idstr | None

The Card it holds and pays with (None: none of its own; a spawned child may pay with its parent's; invite-only beta).

volumesdict[str, str] | None

The volumes its shell mounts, by mount path: {path: volume id}.

memory_idstr | None

Its own memory (agent.memory) as a Memory id, to attach to other agents.

skillslist[dict[str, Any]] | None

Its skills: each {id, pin}.

memorieslist[dict[str, Any]] | None

The memories it reads besides its own, in order: each {id, writes} (None for a user's session reading an account agent).

secret_idslist[str] | None

The secrets in its shell's environment, in order (a later one's key wins).

timezonestr | None

The IANA timezone each turn is told the date and time in (None: the acting user's, else UTC).

reposlist[dict[str, Any]] | None

Repositories cloned into its workspace at a conversation's first turn: a connection and repository, a NoClick repo_id or a git url (signed in with a secret's secret_key), each with its branch, path and the branch globs it may push to.

setuplist[str]

Commands its sandbox (its container, on a machine) runs as it starts (a coding harness only).

dockerbool

Whether Docker runs in its sandbox, a VM of sandbox_size (a coding harness only).

sandbox_sizestr | None

The VM a Docker agent works in: small (2 CPUs, 4 GB), medium (4 CPUs, 8 GB) or large (8 CPUs, 16 GB); None without Docker.

app_testingstr

How a coding agent may turn app testing on (Docker in its sandbox for a task that needs it): by_itself, ask_first or never.

app_testing_usd_per_hourfloat | None

What an hour of app testing costs where its sandbox runs; None without a sandbox of its own (an sdk agent, one on a machine).

moved_fromdict[str, Any] | None

Where a move from a laptop made it (move_id, host, folder, at); else None.

networkAny

What its shell and code reach: True (anywhere), False (only what it needs to work) or the hosts it may reach besides, as sent.

shellbool | None

Whether it has a shell, the code capability (False only on sdk).

turn_limitsdict[str, Any] | None

How far one of its turns goes, as set: steps, usd and minutes (None, or a limit left out: 200 steps, $1 and 30 minutes).

effortstr | None

Its conversations' reasoning effort (None: the model's own).

speedstr | None

fast: its conversations run in fast mode.

permission_modestr | None

Its conversations' permission mode unless one sets its own.

statusstr | None

working (a turn queued or running), waiting (its turns wait on a person: a question, a held call), idle, or expired (past its ttl_s: no turns, readable for 30 days). Pausing stops triggers, not work, so a paused agent can be working; paused says it's paused. None, like the activity fields below, for a user's session reading an account agent.

last_active_atAny

When one of its turns last started or ended (None: it never ran, or hidden like status).

running_turnsint | None

How many of its turns are queued, running or waiting on a person, any conversation (hidden like status).

child_countint | None

How many live (not expired) children it has; children() lists them (hidden like status).

job_idstr | None

The task it was spawned with, an agent.task operation (None if spawn didn't make it).

used_bylist[dict[str, Any]]

The apps that bind it: kind (project), id, name and the binding name (None for a user's session reading an account agent).

pausedbool

Whether pause() stopped its triggers (False too for a user reading an account agent).

helperbool

Whether it's one of NoClick's helpers, made for NoClick's own work rather than one of your agents: an app's coding agent (which NoClick hands each change to that app's code), or a child one of NoClick's own agents spawned.

noclickbool

Whether it's a NoClick, your account's own or one of your spaces', rather than one of your agents: NoClick's own app shows it as NoClick, never by the name it's found by (a space's is noclick-<the space's id>).

former_nameslist[str]

The names it went by before it was renamed, the latest first. Each still reaches it (agent:<old name>, from_name, an @mention in a channel) and stays reserved for it: no other agent of its scope takes one.

jobJob | None

The task it was spawned with, as a Job (wait() gives its last reply); None for an agent spawn didn't start.

trigger_kindslist[str]

Its triggers' kinds (cron, webhook, event, platform, queue, email, call): a listing tells automations (with cron) apart. Empty for a user reading an account agent.

console_urlstr | None

This agent in the developer console (None off the hosted API).

a2a_urlstr

The A2A JSON-RPC endpoint (message/send, tasks/get); callers authenticate with a platform key as a bearer token.

memoryAgentMemory

What it remembers across conversations: list, search, read, save and delete named entries (see AgentMemory).

createclassmethodasync

noclick.Agent.create(
    name, *, instructions, model=None, harness=None, model_connection=None, tools=None,
    tool_rules=None, ttl_s=None, parent_id=None, budget_usd_per_month=None,
    can_request=None, triggers=None, browser_profile=None, card=None, volumes=None,
    secrets=None, timezone=None, repos=None, network=None, shell=None, region=None,
    machine=None, memories=None, skills=None, turn_limits=None, effort=None,
    speed=None, permission_mode=None, setup=None, docker=None, sandbox_size=None,
    app_testing=None, allow_existing=False, user=..., client=None
) -> Agent

Create an agent (names are unique per account and user; a duplicate raises noclick.Conflict with existing_id). With allow_existing=True a taken name returns the agent already there, as it is: nothing about it changes, so it's made once and left alone after.

harness is what runs it: "sdk" (the default), NoClick's own agent loop, or a coding agent in a sandbox of its own with a shell and files: "claude_code", "codex", "opencode", "hermes" or "openclaw" (Agent.harnesses() lists them). model is the harness's own: an OpenRouter id with the openrouter/ prefix on sdk, an alias such as "sonnet" on claude_code, a provider/model on opencode, hermes and openclaw; omitted, the harness's default. model_connection is the connection whose key or plan it thinks with (a Connection of a kind="model" integration such as anthropic, or its name, in the agent's own scope; a lazy create_if_missing one is created first): every CLI harness needs one, and it may still be pending. On sdk it's optional, and lets model name anthropic/... or openai/... on your own key. A Connection object from another scope, such as your account's key for a user's agent, stays that connection (invite-only beta): only a key acting for the whole account may set one, and it must hold a key, since a person's Claude or ChatGPT plan is never shared. model_connection="noclick" runs a codex or opencode agent on NoClick's own key, at the model's cost (HarnessInfo.noclick_key).

effort is how hard its model reasons in every conversation (one of its harness's efforts); speed="fast" runs its model in its harness's fast mode where it has one (speeds). permission_mode is how far its coding harness goes before asking a person in a conversation that sets none (one of its harness's permission_modes; a conversation's set_permission_mode wins). setup is commands a coding agent's sandbox (its container, on a machine) runs as it starts, in order, after its repos and with its secrets in the environment (a CLI installed, a config file written). docker=True runs Docker in a coding agent's sandbox, which is then a VM of sandbox_size ("small", 2 CPUs and 4 GB, unless it says "medium" or "large"), with dockerd running before its first turn: docker, docker compose and testcontainers work as on any Linux machine. The VM is billed at its cost for all of its size while it's up. app_testing is how a coding agent may turn Docker on for a task that needs it, without docker: "by_itself" (the default) turns it on when a task does and off once it's done, saying each in its chat; "ask_first" asks the account's owner in the chat each time; "never".

tools left out gives it everything in its scope ("everything"): every connection, ones connected later too, operations that need no account, the web and NoClick itself, plus the account's owner to notify and ask for an account agent. A list narrows it to connections (a Connection, or its name: every operation), one operation of one ("gmail.send_email_message"), the capabilities "search" and "fetch", a Toolkit, or a Database (its query, execute and schema, or db.only(...); invite-only beta), or a browser ("browser", or "browser.act" and the like), or a person (a Human, or human.only(...): tools that notify them, ask them and wait for the answer, or hand them the conversation), or the agents capability ("agents", or noclick.Agents.only(...): tools to spawn, message, ask and keep track of other agents), or NoClick itself ("noclick", or noclick.Platform.only(...): your account's API as tools, a purchase or a deletion waiting for your approval): at most 64 tools in all. A string names a connection in the agent's own user (the account for an account agent, whose "credential:<id>" names an account connected in the NoClick app), else an integration's operations that need no account (on NoClick's key), so tools=["exa.search"] (or "exa", all of them) needs no connection. A Connection object from another scope, another user's or the account's, stays that connection (a key acting for the whole account only). A lazy create_if_missing connection is created first. Every agent can also run shell commands (the code capability; a policy that denies code refuses them, and shell=False removes it). ttl_s makes it temporary: once that many seconds have passed it's expired, taking no turns (its pending wake-ups are canceled) and readable for 30 days, then deleted; parent_id (an Agent or id) makes it a child of that agent, with nothing started (parent.spawn also starts a task); budget_usd_per_month caps its spend: a child's is held out of what its parent has left, and a child without one draws on its parent's budget as it spends.

tool_rules says what it may do with each app it reaches, {key: "allow" | "ask" | "off"}: a key is an app as tools names it (a connection's name, "credential:<id>", an integration's, "noclick", "search", "fetch"), one action of it ("work-gmail.delete_email_message"; NoClick's are its groups, "noclick.spend"), or "*" for whatever the rest don't name. The most specific key naming a call decides it: allow runs it, ask holds it for the owner's yes, off refuses it; with none, it's allowed. With everything, {"*": "off", ...} keeps it to the apps the rules turn on, so an account connected later starts off. tool_access() shows them app by app.

can_request lets it ask its user to connect accounts at run time (a request_connection tool): integration names, single "integration.operation"s, or "*". What the user connects is a grant (grants()), kept apart from the agent's fields.

triggers wake it without a message: noclick.OnWebhook, OnEvent, OnPlatformEvent, Cron and OnQueue (see triggers()).

timezone (an IANA name) is the zone every turn is told the date and time in; without one, the acting user's timezone, else UTC. An account's own agent made without one starts in its owner's, where their NoClick assistant tells the time.

region (noclick.regions()) is where its sandboxes run, for good: a coding harness runs there whole, and an sdk agent's shell does while its loop runs in NoClick's own service. Without one it takes its parent's, else your account's default region, else runs wherever NoClick has capacity. region=db.region keeps an agent beside its data. machine (a Machine or id; invite-only beta) runs its harness on an always-on machine instead: no sandbox per conversation, nothing reaped when it's quiet, no per-minute sandbox charge, and it runs in the machine's region. A coding harness there reaches its model through NoClick's credential proxy, so its model_connection holds a Claude, ChatGPT or OpenRouter key, or your account's own plan: a Claude plan on claude_code or a ChatGPT plan on codex, its sign-in kept in that agent's own container (the answer's notes say so). Anyone else's plan raises noclick.NotAvailable; a machine runs at most 50 agents.

volumes mounts Volumes (or their ids or names: its user's own, then the account's) read-write in its shell at absolute paths ({"/data": vol}), in every conversation, up to 5; not at /workspace, /root or a system folder. An sdk agent's shell sees each as it was when the turn started and saves its writes when the turn ends; a coding harness's sandbox, from when it starts until it stops.

memories are the Memorys it reads besides its own (agent.memory), in order, up to 10: a Memory, its id or name (its user's own, then the account's), or another agent's memory. Each is read-only to it unless given as memory.writable(); a user's agent reads the account's memories but never writes them, and never another user's. Every turn starts with each entry's name and description, its own memory's first.

skills are the Skills it uses, in order, up to 20: a Skill (skill.pinned(n) to hold one version), its id or name (its user's own, then the account's). A coding harness finds them where it reads skills; an sdk agent sees each one's name and description every turn and reads one with skill__read.

repos clones repositories into its workspace, /workspace/<name>, at a conversation's first turn: connection.checkout(...) for one a github connection of its own scope reaches, or repo.checkout(...) for a NoClick Repo of its own scope, up to 10 (none with shell=False). Its git reaches those repositories only, through NoClick, with a key made for its sandbox; the connection's token never enters it. A push goes through only to the branches the checkout's push globs name (none: read-only): NoClick judges each push on its way to the git host, because a harness's own git push is no tool call your policy could judge. gh only reads a git host's there; pull requests and issues are the connection's operations, in tools.

secrets (Secrets, ids or names; up to 20) become environment variables in its shell on every turn, a later secret's key winning a clash (a change reaches its next turn): its user's and the account's, an account agent's the account's only. Its shell takes no model provider's key (OPENAI_API_KEY and the like belong on model_connection): a secret holding one raises noclick.InvalidRequest.

shell=False takes the shell (the code capability) away from an sdk agent, and from the children it spawns; a CLI harness refuses it with noclick.InvalidRequest, since its shell is the harness.

turn_limits is how far one turn of an sdk agent goes before it wraps up: {"steps": 100, "usd": 2, "minutes": 45}, each left out at its default ($1 of model calls and 30 minutes, with 200 model calls as a backstop; at most 200, $25 and 60). A turn its steps end stops there saying nothing and carries on by itself in a follow-up turn on the same conversation, up to 3 in a row, unless a message comes first; one its spend or minutes end says where the work stands and waits to be asked (reply.ended_by names the limit). A coding harness ends its own turns, and refuses it with noclick.InvalidRequest.

network says what its shell and code may reach: True (the default: anywhere), False, or up to 50 hosts ("pypi.org", or "*.example.com" for a domain and its subdomains), over HTTPS on port 443 only. What it needs to work stays reachable, and False leaves only that: an sdk agent's shell reaches NoClick's git proxy when it has repos (its model and tools run on NoClick); a coding harness reaches NoClick's API, NoClick's proxy for its model on a key and for git, and on a Claude or ChatGPT plan that provider's own hosts. Its tools run on NoClick, outside the limit. Without one it takes its parent's, else anywhere, and the children it spawns take its. Where NoClick can't keep to a limited network (a coding harness on a key other than Claude, ChatGPT or OpenRouter, say), it raises noclick.NotAvailable rather than widen it.

browser_profile (a BrowserProfile or id of its own user's, or your account's for an account agent) signs its browser tool in with that person's logins: each conversation gets a browser of its own for a turn, a step only a person can do holds the turn awaiting_human, and its calls follow policy as browser.*.

Invite-only beta: card (a Card or id of its own scope: a user's agent pays with that user's cards, an account agent with your account's; giving one takes the key's cards scope) is what it pays with: it holds the card (a card has one agent at a time) and gets the tools card__status (what it can spend now) and card__purchase (approve before paying: above the card's threshold the turn waits for a person, and their answer is its next turn), which policy names card.status and card.purchase. It never sees the number, and a turn answering someone outside its scope, or a test run, can't buy anything. A child it spawns pays with the same card only when given "card" (or one of the tools) in its tools.

Parameters
namestrrequired
instructionsstrrequired
modelstr | Nonedefault None
harnessstr | Nonedefault None
model_connectionAnydefault None
toolsSequence[Any] | Nonedefault None
tool_rulesMapping[str, str] | Nonedefault None
ttl_sint | Nonedefault None
parent_idAnydefault None
budget_usd_per_monthfloat | Nonedefault None
can_requestSequence[Any] | Nonedefault None
triggersSequence[Any] | Nonedefault None
browser_profileAnydefault None
cardAnyinvite-only betadefault None
volumesMapping[str, Any] | Nonedefault None
secretsSequence[Any] | Nonedefault None
timezonestr | Nonedefault None
reposSequence[Any] | Nonedefault None
networkbool | Sequence[str] | Nonedefault None
shellbool | Nonedefault None
regionstr | Nonedefault None
machineAnyinvite-only betadefault None
memoriesSequence[Any] | Nonedefault None
skillsSequence[Any] | Nonedefault None
turn_limitsMapping[str, Any] | Nonedefault None
effortstr | Nonedefault None
speedstr | Nonedefault None
permission_modestr | Nonedefault None
setupSequence[str] | Nonedefault None
dockerbool | Nonedefault None
sandbox_sizestr | Nonedefault None
app_testingstr | Nonedefault None
allow_existingbooldefault False
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
Agent

The new agent, loaded.

Usage

Outside as_user the agent is your account's, shared by every user that messages it:

support = noclick.Agent.create(
    "support",
    instructions="You answer questions about our product. Search the docs before answering.",
    tools=["search", "fetch"],
    budget_usd_per_month=50,
)

Inside as_user it's that user's own, and uses the user's connections:

with noclick.as_user("user_42"):
    gmail = noclick.Connection.from_name("gmail", integration="gmail", create_if_missing=True)
    assistant = noclick.Agent.create("assistant", instructions="You help the user with their email.", tools=[gmail])

An operation that needs no account needs no connection, for any agent, a user's included:

with noclick.as_user("user_42"):
    scout = noclick.Agent.create("scout", instructions="You research companies for the user.", tools=["exa.search"])

Run it on Claude Code, thinking with your Claude key. Its reply arrives whole, and a conversation's first turn starts its sandbox:

claude = noclick.Connection.from_name("claude", integration="anthropic", create_if_missing=True)
coder = noclick.Agent.create(
    "coder",
    instructions="You maintain our docs repo.",
    harness="claude_code",
    model="sonnet",
    model_connection=claude,
    tools=["github", "search"],
)
if not claude.connected:
    print(claude.connect_url)   # where someone pastes a Claude key

Make it once, and leave it alone after: a run that finds it returns it untouched, so an edit someone made in the app stays:

support = noclick.Agent.create(
    "support", instructions="You answer questions about our product.", allow_existing=True,
)

Give a coding agent a repository to work in, branches of its own to push to, and a clock in your team's timezone:

github = noclick.Connection.from_name("github", integration="github", create_if_missing=True)
fixer = noclick.Agent.create(
    "fixer",
    instructions="You fix failing tests in acme/web, push the fix to a branch and open a pull request.",
    harness="claude_code",
    model_connection="claude",
    timezone="Europe/Berlin",
    tools=[github.only("create_pull_request")],
    repos=[github.checkout("acme/web", push=["agent/*"])],
)

Keep a coding agent's sandbox in Europe, with everything it works on:

reviewer = noclick.Agent.create(
    "reviewer",
    instructions="You review pull requests for our EU customers' code.",
    harness="codex",
    model_connection="openai",
    region="eu",
)

An agent that builds whole sites in one go, with room for more steps a turn:

builder = noclick.Agent.create(
    "builder",
    instructions="You build and ship the sites you're asked for.",
    tools=["noclick"],
    turn_limits={"steps": 100},
)

An agent that only answers from its tools, with no shell:

faq = noclick.Agent.create("faq", instructions="You answer from our help center.", tools=["search"], shell=False)

Keep its shell to the package index it installs from, beside its data:

analyst = noclick.Agent.create(
    "analyst",
    instructions="You answer questions about our orders with pandas, from the data in /data.",
    volumes={"/data": noclick.Volume.from_name("orders", create_if_missing=True)},
    network=["pypi.org", "files.pythonhosted.org"],
)

from_nameclassmethod

noclick.Agent.from_name(
    name, *, create_if_missing=False, instructions=None, model=None, harness=None,
    model_connection=..., tools=None, tool_rules=None, ttl_s=None, parent_id=None,
    budget_usd_per_month=..., can_request=None, triggers=None, browser_profile=...,
    card=..., volumes=None, secrets=None, timezone=..., repos=None, network=None,
    shell=None, region=None, machine=None, memories=None, skills=None, turn_limits=...,
    effort=..., speed=..., permission_mode=..., setup=None, docker=None,
    sandbox_size=None, app_testing=None, user=..., client=None
) -> Agent

A lazy reference to the agent called name in the current (or given) user: inside as_user only their own, never an account agent of that name (reach that outside as_user and message it for them). Given fields, it's two steps, taken the first time the reference is used: get the agent, then set the fields you pass. create_if_missing only decides what happens when there's none: True creates it with the fields Agent.create takes (instructions is required then), else it raises noclick.NotFound. So every run of your code sets them: on an existing agent, instructions, model, harness, model_connection, tools, tool_rules, can_request, budget, timezone, volumes, memories, secrets, repos, network, shell, turn_limits, effort or speed that differ are set to yours (the grants its user gave it are kept; a new harness without a model takes that harness's default model, and its conversations carry on on the new harness). So are its triggers: a trigger your code no longer lists is removed and a new one added, while one that stays keeps its webhook URL; mail and call triggers are never touched. So are its browser_profile, and its card (invite-only beta). A field you leave out is never changed, and None clears model_connection, budget_usd_per_month, browser_profile, card, timezone, turn_limits, effort or speed, as in update(): moving an agent back to sdk takes harness="sdk", model_connection=None. region, ttl_s and parent_id are set when it's created, for good: an existing agent with another raises noclick.Conflict naming the field and its value.

Setting fields is a write, every time it runs: do it at startup or in a setup script, and take the bare Agent.from_name("support") in request handlers, or two versions of your server would keep overwriting each other's values. To make an agent once and leave it alone after, use Agent.create(..., allow_existing=True).

Parameters
namestrrequired
create_if_missingbooldefault False
instructionsstr | Nonedefault None
modelstr | Nonedefault None
harnessstr | Nonedefault None
model_connectionAnyomit to leave it unchanged
toolsSequence[Any] | Nonedefault None
tool_rulesMapping[str, str] | Nonedefault None
ttl_sint | Nonedefault None
parent_idAnydefault None
budget_usd_per_monthAnyomit to leave it unchanged
can_requestSequence[Any] | Nonedefault None
triggersSequence[Any] | Nonedefault None
browser_profileAnyomit to leave it unchanged
cardAnyinvite-only betaomit to leave it unchanged
volumesMapping[str, Any] | Nonedefault None
secretsSequence[Any] | Nonedefault None
timezoneAnyomit to leave it unchanged
reposSequence[Any] | Nonedefault None
networkbool | Sequence[str] | Nonedefault None
shellbool | Nonedefault None
regionstr | Nonedefault None
machineAnyinvite-only betadefault None
memoriesSequence[Any] | Nonedefault None
skillsSequence[Any] | Nonedefault None
turn_limitsAnyomit to leave it unchanged
effortAnyomit to leave it unchanged
speedAnyomit to leave it unchanged
permission_modeAnyomit to leave it unchanged
setupSequence[str] | Nonedefault None
dockerbool | Nonedefault None
sandbox_sizestr | Nonedefault None
app_testingstr | 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
Agent

An agent that loads (or is created, or has your fields set) the first time it's used. Nothing is sent yet.

Usage

Refer to an agent by name without a request:

support = noclick.Agent.from_name("support")
print(support.model)   # loads it now; noclick.NotFound if there's none

Set new instructions on the agent that's there (noclick.NotFound if there's none):

support = noclick.Agent.from_name("support", instructions="You answer billing questions too.")
support.hydrate()

Or get it, creating it if it's missing, and set its fields. instructions is required then, and a field you leave out is never changed on an agent that already exists:

with noclick.as_user("user_42"):
    assistant = noclick.Agent.from_name(
        "assistant",
        create_if_missing=True,
        instructions="You help the user run their day. Ask for access to an account when you need it.",
        tools=["search"],
        can_request=["google_calendar", "gmail"],
    )
    reply = assistant.message("Put lunch with Bo on my calendar for Friday at noon")

An automation is an agent with a schedule among its triggers:

digest = noclick.Agent.from_name(
    "digest",
    create_if_missing=True,
    instructions="You summarize yesterday's support tickets for the team.",
    tools=["search", "slack.send_message_to_channel"],
    triggers=[noclick.Cron("0 8 * * 1-5", tz="Europe/London", message="Post the overnight summary in #support")],
)

Give its shell a dataset and an API key:

analyst = noclick.Agent.from_name(
    "analyst",
    create_if_missing=True,
    instructions="You answer questions about our orders. The data is in /data; call the warehouse "
                 "API with $WAREHOUSE_TOKEN for stock levels.",
    volumes={"/data": noclick.Volume.from_name("datasets", create_if_missing=True)},
    secrets=["warehouse"],
)

from_idclassmethod

noclick.Agent.from_id(agent_id, *, client=None, user=...) -> Agent

A lazy reference to an agent by NoClick id.

Parameters
agent_idstrrequired
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
Agent

An agent that loads the first time it's used. Nothing is sent yet.

Usage
agent = noclick.Agent.from_id("7b1e4f2a-3c9d-4e8b-a5f6-0d2c8e9b1a47")
reply = agent.message("Hi")

getclassmethodasync

noclick.Agent.get(agent_id, *, user=..., client=None) -> Agent

Load an agent by NoClick id now; an unknown id raises noclick.NotFound.

Parameters
agent_idstrrequired
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
Agent

The agent, loaded.

Usage
agent = noclick.Agent.get("7b1e4f2a-3c9d-4e8b-a5f6-0d2c8e9b1a47")
print(agent.name, agent.model, agent.user_id)

listclassmethodasync

noclick.Agent.list(
    *, name=None, status=None, active_since=None, parent=None, temporary=None,
    harness=None, order=None, origin=None, limit=None, user_filter=None, user=...,
    client=None
) -> list[Agent]

The agents the current user can message: inside as_user their own and the account's (messaged, not changed; user_id None), so a name may match one of each; outside it, the account's. user_filter lists exactly whose agents instead: a User or your id for one (only theirs), noclick.NO_USER (the account's) or noclick.ALL_USERS.

After the account's API agents come the ones built in the NoClick app, which are the account's too (origin="api" or "app" lists only one kind). Of the filters below, only name and harness apply to them; the others leave them out.

Expired agents are listed for the 30 days they're kept. status keeps the working, waiting, idle or expired ones; active_since (an aware datetime) those with a turn since then; parent (an Agent or id) its children; temporary those with (or, False, without) a ttl_s; harness those on one harness; and order="last_active" puts the most recently active first, those that never ran last ("created", the default, the newest first). These reads are cheap: last_active_at is a column stamped as turns start and end, and the counts read partial indexes.

Parameters
namestr | Nonedefault None
statusstr | Nonedefault None
active_sinceAnydefault None
parentAnydefault None
temporarybool | Nonedefault None
harnessstr | Nonedefault None
orderstr | Nonedefault None
originstr | Nonedefault None
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[Agent]

Every matching agent, newest first (or most recently active first), fetched page by page.

Usage

The agents the current user can message, then one name across every user:

for agent in noclick.Agent.list():
    print(agent.name, agent.user_id)   # user_id is None for an account agent

assistants = noclick.Agent.list(name="assistant", user_filter=noclick.ALL_USERS)   # every user's, and the account's

What's busy right now, and what ran in the last hour:

from datetime import datetime, timedelta, timezone

for agent in noclick.Agent.list(status="working"):
    print(agent.name, agent.running_turns, agent.last_active_at)
hour_ago = datetime.now(timezone.utc) - timedelta(hours=1)
recent = noclick.Agent.list(active_since=hour_ago, order="last_active", temporary=False)

The agents built in the app, and a message to one:

for agent in noclick.Agent.list(origin="app"):
    print(agent.name, agent.workflow_name, agent.enabled, agent.app_url)
triage = noclick.Agent.list(origin="app", name="Triage")[0]
print(triage.message("Anything urgent in the queue this morning?").text)

list_pageclassmethodasync

noclick.Agent.list_page(
    *, cursor=None, limit=None, name=None, status=None, active_since=None, parent=None,
    temporary=None, harness=None, order=None, origin=None, user_filter=None, user=...,
    client=None
) -> Page

One page of agents; pass next_cursor back as cursor. Takes list's filters and order.

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)
namestr | Nonedefault None
statusstr | Nonedefault None
active_sinceAnydefault None
parentAnydefault None
temporarybool | Nonedefault None
harnessstr | Nonedefault None
orderstr | Nonedefault None
originstr | Nonedefault 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
Page

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

Usage
page = noclick.Agent.list_page(limit=50)
while True:
    for agent in page.data:
        print(agent.name)
    if page.next_cursor is None:
        break
    page = noclick.Agent.list_page(limit=50, cursor=page.next_cursor)

codingclassmethodasync

noclick.Agent.coding(*, user_filter=None, user=..., client=None) -> CodingAgents

Every coding agent, and what each is doing. An agent on claude_code, codex, opencode, hermes or openclaw (an app's own coding agent among them), with its state (working, waiting on a person, warm, paused and why, stopped), where it runs, on whose model credential, its current job, each conversation that's up (runs, a sandbox's with what it reserved) and its spend since the first of the month; then counts by harness, model, state and place. Read from the turns, containers and sandboxes themselves. user_filter narrows it to whose (a User or your id for one, noclick.NO_USER, noclick.ALL_USERS); omitted, every one of the account's for an account's key, a user's own for theirs.

Parameters
user_filterAny

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

(default None)
userAny

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

(defaults to the current user)
clientClient | None

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

(default None)
Usage
coding = noclick.Agent.coding()
for agent in coding.agents:
    print(agent.name, agent.state, agent.job.title if agent.job else None)

statesclassmethodasync

noclick.Agent.states(
    *, workspace=None, user_filter=None, user=..., client=None
) -> list[AgentStateRow]

Every agent's state, for a list of agents. On any harness: what it's doing, the tool call it runs now, what waits on a person and when, read from its turns, asks and held calls. workspace (a Workspace or id) keeps a workspace's agents.

Parameters
workspaceAnydefault 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[AgentStateRow]

An AgentStateRow per agent.

Usage
for row in noclick.Agent.states():
    print(row.name, row.state, (row.now or {}).get("line"), row.waiting["total"])

harnessesclassmethodasync

noclick.Agent.harnesses(*, client=None) -> list[HarnessInfo]

What can run an agent. sdk is NoClick's own agent loop; the coding agents each run in a sandbox of their own (claude_code, codex, opencode, hermes, openclaw). On a CLI harness a reply arrives whole rather than streaming, a conversation's first turn starts its sandbox (it stays warm about a minute between turns), and the sandbox's uptime is billed.

Parameters
clientClient | None

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

(default None)
Returns
list[HarnessInfo]

Each harness's name (what harness= takes) and default_model, whether it needs a model_connection and which model providers' integrations serve it, whether its reply streams (streaming) and whether its shell is built in. models() on one searches the models it offers.

Usage

Pick a harness, then search the models it offers:

for harness in noclick.Agent.harnesses():
    print(harness.name, harness.default_model)
[codex] = [h for h in noclick.Agent.harnesses() if h.name == "codex"]
print([m.id for m in codex.models(search="gpt-5")])

Or find which model providers can run Codex, to make its connection:

[codex] = [h for h in noclick.Agent.harnesses() if h.name == "codex"]
print(codex.integrations, codex.notes)   # ['openai'] [...]

harness_infoclassmethodasync

noclick.Agent.harness_info(name, *, client=None) -> HarnessInfo

One of harnesses() by the name harness= takes; an unknown name raises noclick.NotFound, naming the ones there are.

Parameters
namestrrequired
clientClient | None

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

(default None)
Returns
HarnessInfo

The harness: its default_model, whether it needs a model_connection, the model providers' integrations that serve it, and models() to search what it offers.

Usage
opencode = noclick.Agent.harness_info("opencode")
print(opencode.default_model, [m.id for m in opencode.models(search="claude", limit=5)])

uploadasync

agent.upload(file, *, name=None, mime_type=None, voice=False, peaks=None) -> Attachment

Store a file to send this agent with a message: a path, bytes or a binary file object. It's kept as an account file, capped as those are: 10 MB an image (JPEG, PNG, WebP or GIF), 15 MB a document, 20 MB audio or video. voice=True marks a recorded clip (audio), which may carry its waveform peaks. message(files=[...]) uploads paths for you; upload first to send bytes or a file object you name, or a voice clip.

Parameters
fileAnyrequired
namestr | Nonedefault None
mime_typestr | Nonedefault None
voicebooldefault False
peaksSequence[float] | Nonedefault None
Returns
Attachment

The attachment; send it with message(files=[...]). An upload is sent once; sent, it's one of the account's files (noclick.attachments()), which the account sends again.

Usage
support = noclick.Agent.from_name("support")
clip = support.upload(recording, name="question.webm", voice=True)
reply = support.message("Here's my question.", files=[clip])

sendasync

agent.send(
    text=None, *, conversation=None, files=(), user=..., command=None, delivery=None
) -> Operation

Start a turn without waiting; .wait() returns the AgentReply. files go with the message, as message sends them.

Args: command: One of the conversation's harness's own commands, {"name": ..., "arguments": ...}, run in place of text as that command (commands lists them), never parsed from text. delivery: For a message sent while the agent works on a turn (it takes one at a time): "steer" puts it into that turn when it's in the same conversation (else it's an ordinary message), "queue" (or omitted) runs it as the agent's next turn. A command is never steered.

Parameters
textstr | Nonedefault None
conversationstr | Nonedefault None
filesSequence[Any]default ()
userAny

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

(defaults to the current user)
commandMapping[str, str] | Nonedefault None
deliverystr | Nonedefault None
Returns
Operation

The turn's operation, started. Keep its id to pick the reply up later, from anywhere.

Usage
support = noclick.Agent.from_name("support")
turn = support.send("Summarize this customer's open tickets")
print(turn.id)                                      # save it; then, later, anywhere:
reply = noclick.Operation.from_id(turn.id).wait()   # an AgentReply
print(reply.text)

coder = noclick.Agent.from_name("coder")
coder.send(conversation="main", command={"name": "compact"})
coder.send("also update the README", conversation="main", delivery="steer")

commandsasync

agent.commands(conversation, *, user=...) -> AgentCommands

What the conversation's harness offers a person to run. Send one with send(command=...).

Parameters
conversationstrrequired
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
AgentCommands

Its commands and skills as the harness itself last listed them, what NoClick can and can't run there (capabilities, not_supported), and how fresh the list is (as_of, read_from).

Usage
coder = noclick.Agent.from_name("coder")
for command in coder.commands("main").commands:
    print(f"/{command.name} {command.argument_hint}", command.description)

set_permission_modeasync

agent.set_permission_mode(conversation, mode, *, user=...) -> ConversationSettings

Set how far the conversation's coding harness goes before asking a person. approval-required asks before commands and edits, auto-accept-edits runs edits and asks about commands, auto has its own review approve routine work, and full-access (the default) asks nothing. Questions reach a person in every mode. Its next message runs in it.

Parameters
conversationstrrequired
modestrrequired
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
ConversationSettings

The conversation's settings: the mode set, the mode its harness runs (effective_permission_mode), the modes it enforces and what it can't do.

Usage
coder = noclick.Agent.from_name("coder")
coder.set_permission_mode("main", "approval-required")

requestsasync

agent.requests(conversation, *, status=None, user=...) -> list[HarnessRequest]

What the conversation's coding harness asked a person, newest first. status keeps pending, answered, expired or canceled ones.

Parameters
conversationstrrequired
statusstr | 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)
Returns
list[HarnessRequest]

Each HarnessRequest: an approval (what it would do) or a question, and where it stands.

Usage
for asked in coder.requests("main", status="pending"):
    print(asked.title or asked.questions)

answerasync

agent.answer(
    conversation, request_id, decision, *, note=None, answers=None, user=...
) -> HarnessRequest

Answer what the conversation's coding harness asks. The decision is allow_once, allow_always (for the rest of the session, where the harness can), reject_once (with a note the agent reads; a question: skip it) or cancel (the turn stops). A question is answered with answers ({question: [labels] or your own words}) and allow_once. A person's answer: never through an MCP connection.

Parameters
conversationstrrequired
request_idstrrequired
decisionstrrequired
notestr | Nonedefault None
answersMapping[str, Any] | 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)
Returns
HarnessRequest

The request as it stands now (answered; a cancel stops the turn, which ends it canceled).

Usage
[asked] = coder.requests("main", status="pending")
coder.answer("main", asked.id, "reject_once", note="Push to a branch, not main.")

messageasync

agent.message(
    text, *, conversation=None, files=(), timeout=None, user=...
) -> AgentReply

Send text and wait for the reply. Without conversation it goes to the agent's session, the one conversation everyone talking to it shares (session()); pass the reply's conversation back to stay in that thread. A channel's conversation (channel:<its id>) raises noclick.InvalidRequest: only the channel starts turns there, so post in the channel instead. files (at most 100) are paths, which are uploaded first, attachments from upload, or (for the account) its files from noclick.attachments(): the turn reads them as the agent's media digest does, a document's text, a voice clip's transcript, an image as an image.

Parameters
textstrrequired
conversationstr | Nonedefault None
filesSequence[Any]default ()
timeoutfloat | 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)
Returns
AgentReply

The reply: its text, the conversation it belongs to and the tool_calls the turn made.

Usage

Ask, then keep talking in the same thread by passing its conversation back:

support = noclick.Agent.from_name("support")
reply = support.message("Why was I charged twice in March?")
print(reply.text)
follow_up = support.message("Can you refund one of them?", conversation=reply.conversation)

Or name the thread yourself, with your own ticket id, say (1 to 128 letters, digits and . _ : @ + -):

support = noclick.Agent.from_name("support")
reply = support.message("Where's my refund?", conversation="ticket-1841")

A shared account agent talks to each of your users in threads of their own:

support = noclick.Agent.from_name("support")
reply = support.message("Where's my invoice?", user="user_42")

With files:

analyst = noclick.Agent.from_name("analyst")
reply = analyst.message("What stands out this quarter?", files=["q3-report.pdf", "chart.png"])

historyasync

agent.history(conversation, *, limit=None, before=None, user=...) -> list[Message]

The messages of one conversation, oldest first. Every one, or the limit newest (1-200), just before before (a next_cursor of history_page).

Parameters
conversationstrrequired
limitint | None

Return at most this many.

(default None)
beforestr | 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)
Returns
list[Message]

Its messages, each with its role, text, created_at, the files it carried, how it arrived (via, for a text, a call or an email) and, a reply, the tool_calls its turn made; a note has its data.

Usage

Read a whole thread:

support = noclick.Agent.from_name("support")
for message in support.history("ticket-1841"):
    print(message.role, message.via or "api", message.text)

Or only its last few messages:

support = noclick.Agent.from_name("support")
latest = support.history("ticket-1841", limit=20)

history_pageasync

agent.history_page(conversation, *, limit=None, before=None, user=...) -> Page

A page of history, to read a long thread back. The limit newest messages (1-200), just before before, oldest first.

Parameters
conversationstrrequired
limitint | None

Return at most this many.

(default None)
beforestr | 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)
Returns
Page

A page whose data holds the messages and whose next_cursor, while older ones remain, is the before of the page before it (None once it reaches the first message).

Usage

Read a thread back, 50 messages at a time:

support = noclick.Agent.from_name("support")
page = support.history_page("ticket-1841", limit=50)
while True:
    for message in reversed(page.data):
        print(message.role, message.text)
    if page.next_cursor is None:
        break
    page = support.history_page("ticket-1841", limit=50, before=page.next_cursor)

noteasync

agent.note(conversation, text, *, data=None, key=None, user=...) -> bool

Add a line to a conversation without starting a turn. It shows in history and watch as a note with its data, and the agent reads both when its next turn starts, once.

Args: conversation: The current user's conversation (the account's, outside as_user). text: The line, 1-4,000 characters. data: JSON your app reads back with it (at most 4,096 bytes). key: Adds it once: a second note with the same key adds nothing.

Parameters
conversationstrrequired
textstrrequired
datadict[str, Any] | Nonedefault None
keystr | 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)
Returns
bool

True when it was added, False when a note with key already was.

Usage
support = noclick.Agent.from_name("support")
support.note("ticket-1841", "Ada upgraded to the Pro plan.", data={"plan": "pro"}, key="plan:pro")

withdraw_questionasync

agent.withdraw_question(conversation, note, *, question_id=None) -> list[str]

Withdraw the question the agent asked your account's owner once it no longer needs them. It was answered or handled another way, in one of the account's conversations. Its page and card then refuse a late answer, the turn that asked ends, and the agent reads note (1-4,000 characters: who answered, what was already sent) at its next turn there. question_id names the question (its HumanRequest.request_id, as noclick.HumanRequest.list lists it) when more than one waits there; the others keep waiting. It acts as the account, which alone withdraws one, never a user. With none waiting, or several and none named, it raises noclick.Conflict.

Parameters
conversationstrrequired
notestrrequired
question_idstr | Nonedefault None
Returns
list[str]

The text of each question withdrawn.

Usage

The owner answered by phone, so the agent's question waits no longer:

support = noclick.Agent.from_name("support")
support.withdraw_question("ticket-1841", "Ana approved the refund on the phone; it's issued.")

conversation

agent.conversation(name, *, user=...) -> AgentConversation

One of its conversations, as a chat reads and changes it. Its settings, a fork, a revert, its context and usage, a command, resuming it as the agent's session; sends nothing yet.

Parameters
namestrrequired
userAny

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

(defaults to the current user)
Usage
chat = noclick.Agent.from_name("coder").conversation("main")
chat.update(effort="high")

start_conversationasync

agent.start_conversation(*, conversation=None, title=None, user=...) -> Conversation

Start a new session (a chat's /new or /clear), as clear does, with conversation naming its key (one that already has messages raises noclick.Conflict); omitted, NoClick makes one. Everyone talking to the agent shares it from now on, and the one it leaves is kept, listed and can be resumed. Raises noclick.Conflict while the agent is working on a turn.

Parameters
conversationstr | Nonedefault None
titlestr | 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)
Returns
Conversation

The new Conversation, active.

Usage
coder = noclick.Agent.from_name("coder")
fresh = coder.start_conversation(conversation="retries", title="Retries")
coder.message("Look at the retry worker")   # goes to the new session

clearasync

agent.clear(*, title=None, user=...) -> Conversation

Start a new session, like /clear in a terminal: everyone talking to the agent shares it from now on. The one it leaves is kept, listed and can be resumed (conversation(name).resume()), and the agent's files stay as they are. Raises noclick.Conflict while the agent is working on a turn.

Parameters
titlestr | 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)
Returns
Conversation

The new Conversation, active.

Usage
coder = noclick.Agent.from_name("coder")
before = coder.session()
coder.clear()
coder.message("Start on the billing page")   # the new session
coder.conversation(before.conversation).resume()

sessionasync

agent.session(*, user=...) -> Conversation | None

The agent's session: the one conversation everyone talking to it shares, where a message without a conversation goes (the current user's, or the account's outside as_user).

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
Conversation | None

Its Conversation (active), or None before the agent has one.

Usage
support = noclick.Agent.from_name("support")
current = support.session()
for message in support.history(current.conversation, limit=20):
    print(message.role, message.text)

conversationsasync

agent.conversations(
    *, limit=None, user_filter=None, user=..., archived=None
) -> list[Conversation]

Its conversations, most recent first. The current user's, or those user_filter covers; archived keeps the archived ones (True) or the others (False). user_filter reads across users without the user header, which only the signed-in owner may do on a user's own agent; with a secret key, read such an agent's threads without it.

Parameters
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)
archivedbool | Nonedefault None
Returns
list[Conversation]

Every matching conversation (or the first limit), fetched page by page. cost_usd is None for a thread with no recorded turns.

Usage

Read the current user's threads (the account's, outside as_user):

support = noclick.Agent.from_name("support")
for convo in support.conversations(limit=10):
    print(convo.conversation, convo.title, convo.turns, convo.cost_usd)

Or every user's threads with a shared agent, each naming its user_id (None for the account's), and read one:

support = noclick.Agent.from_name("support")
for convo in support.conversations(user_filter=noclick.ALL_USERS, limit=20):
    messages = support.history(convo.conversation, user=convo.user_id)

conversations_pageasync

agent.conversations_page(*, cursor=None, limit=None, user_filter=None, user=...) -> Page

One page of its conversations; 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)
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)
Returns
Page

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

Usage
support = noclick.Agent.from_name("support")
page = support.conversations_page(limit=50)
while True:
    for convo in page.data:
        print(convo.conversation, convo.last_activity)
    if page.next_cursor is None:
        break
    page = support.conversations_page(limit=50, cursor=page.next_cursor)

hand_backasync

agent.hand_back(conversation, *, user=...) -> None

Give a conversation back to the agent after it handed it to a person (its hand_off tool). The person's replies stay in its history, and the agent answers again from the next message. The person can hand it back from their page too.

Parameters
conversationstrrequired
userAny

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

(defaults to the current user)
Usage
support = noclick.Agent.from_name("support")
for convo in support.conversations(user_filter=noclick.ALL_USERS):
    if convo.status == "handed_off":
        support.hand_back(convo.conversation, user=convo.user_id)

take_overasync

agent.take_over(
    conversation, *, interrupt=False, cols=None, rows=None, user=...
) -> Terminal

Take over a coding agent's conversation. Its harness's own terminal (Claude Code, Codex, OpenCode, Hermes Agent or OpenClaw) on the session the agent works in, for the account's owner. The turn in flight finishes first unless interrupt stops it (its delivery fails, saying the owner took over); messages wait until it's handed back. Needs the account's secret key with the agents:terminal scope: a terminal shows the sandbox's keys and tokens. Asked again while it's taken over, it returns a new token (a reload, a second tab). Raises noclick.Conflict when nothing of the conversation is running (send it a message first).

Args: conversation: The current user's conversation (the account's, outside as_user). interrupt: Stop its turn in flight now instead of letting it finish. cols: The terminal's width in columns. rows: The terminal's height in rows.

Parameters
conversationstrrequired
interruptbooldefault False
colsint | Nonedefault None
rowsint | 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)
Returns
Terminal

A Terminal: its url and token open it (see noclick.terminal).

Usage
coder = noclick.Agent.from_name("coder")
terminal = coder.take_over("main", cols=120, rows=36)
send_to_browser(terminal.url, terminal.token)

terminalasync

agent.terminal(conversation, *, user=...) -> Terminal

Where a coding agent's conversation's terminal stands (Terminal.state), with no token. Open it with take_over, give it back with Terminal.hand_back.

Parameters
conversationstrrequired
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
Terminal

A Terminal with its state, and no url or token.

Usage
coder = noclick.Agent.from_name("coder")
if coder.terminal("main").state == "person":
    coder.terminal("main").hand_back()

spawnasync

agent.spawn(
    task, *, updates=None, conversation=None, instructions=None, tools=None,
    budget_usd=None, ttl_s=None, model=None, harness=None, model_connection=None,
    name=None, user=...
) -> Agent

Make a child agent and start task (its first message, up to 16,000 characters) at once. child.job is that task: a Job that runs while the child works on it, across as many turns as it takes, and finishes when the child stops with nothing left to continue it.

The child lives where its parent does and runs on the parent's harness, model and model connection unless harness, model or model_connection say otherwise. It gets only tools its parent has: tools names some of them (a narrower only(...) of one of the parent's connections is fine, and "card" gives it the card its parent pays with; anything the parent lacks raises noclick.InvalidRequest), and without tools it has none of them (nor its parent's can_request). Like every agent it has its shell (none when its parent has shell=False) and wake_me, and as a spawned child tell_parent, to reach its parent whenever its instructions say to. A person among the parent's tools passes down only with the tools the parent has of them, and a bound operation only as bound or narrower. instructions are its standing instructions: what its updates should say and when to reach out on its own; NoClick adds a short brief saying it works on one task for its parent. budget_usd is held out of what the parent's monthly budget has left (without one, the child draws on the parent's as it spends), and ttl_s makes it temporary. name defaults to <parent>-<random>.

updates is only when NoClick makes it report: "done" (always on: the job finished, any outcome), "blocked" (it started waiting on a person), noclick.Before(*tools) (before a matching tool call runs) and noclick.Every(interval) (at least that often while it works). Each update is a wake-up for the parent in conversation, the parent's conversation it belongs to (user= says whose, as for message: your key acting for a user spawns from an account agent in that user's thread, and the child is the account's; a user's own session can't); updates that come while the parent is mid-turn arrive together in its next turn. Without conversation, updates wake nobody and wait on the job (job.updates(), and your webhooks' agent.job.update event). A coordinator spawns the same way with its agents tools, its children's updates waking it in the conversation it spawned from. An agent holds up to 20 live children, and children spawn children up to 3 levels below an agent with no parent (noclick.QuotaExceeded). Agent.create(..., parent_id=) still makes a child without starting anything.

Parameters
taskstrrequired
updatesSequence[Any] | Nonedefault None
conversationstr | Nonedefault None
instructionsstr | Nonedefault None
toolsSequence[Any] | Nonedefault None
budget_usdfloat | Nonedefault None
ttl_sint | Nonedefault None
modelstr | Nonedefault None
harnessstr | Nonedefault None
model_connectionAnydefault None
namestr | 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)
Returns
Agent

The child, loaded, with parent_id set to this agent and job its running task.

Usage

Hand a coordinator's research to a helper and hear back in the launch conversation:

planner = noclick.Agent.from_name("planner")
researcher = planner.spawn(
    "Find three recent launches in our category and summarize what worked.",
    instructions="Report each launch as you finish it with tell_parent. Cite your sources.",
    tools=["search", "fetch"],
    updates=["blocked", noclick.Every(900)],
    conversation="launch-plan",
    budget_usd=0.50,
    ttl_s=3600,
)
print(researcher.job.status)   # running

From your own code, wait for the task the way you'd wait for a message:

planner = noclick.Agent.from_name("planner")
reviewer = planner.spawn("Review the draft in /workspace/launch.md and list what's missing.")
reply = reviewer.job.wait(timeout=600)
print(reply.text)

Hear before money moves (the call still runs; a policy rule is what holds one):

support = noclick.Agent.from_name("support")
refunder = support.spawn(
    "Refund order 1841 if it's within 30 days, then tell the customer.",
    tools=["stripe.create_refund", "gmail.send_email_message"],
    updates=[noclick.Before("stripe.create_refund")],
    conversation="ticket-1841",
    user="user_42",
)

childrenasync

agent.children(*, status=None, limit=None) -> list[Agent]

Its children, any status (an expired one for its 30 days), newest first: Agent.list(parent=self), read where this agent lives.

Parameters
statusstr | Nonedefault None
limitint | None

Return at most this many.

(default None)
Returns
list[Agent]

Each child with its status, last_active_at, running_turns and, if spawn made it, the job it was started with.

Usage
planner = noclick.Agent.from_name("planner")
for child in planner.children(status="working"):
    print(child.name, child.running_turns, child.last_active_at)

jobsasync

agent.jobs(
    *, status=None, kind=None, agent=None, conversation=None, limit=None
) -> list[Job]

The jobs it started: the tasks of the children it spawned (kind="task") and the messages it sent with its agents tools (kind="message", whose only update is done). status takes operation statuses, or "live" for every unfinished one; agent (an Agent or id) keeps the ones one agent does; conversation the ones started from one of its conversations. Read where this agent lives: an account agent's are every user's.

Parameters
statusstr | Sequence[str] | Nonedefault None
kindstr | Sequence[str] | Nonedefault None
agentAnydefault None
conversationstr | Nonedefault None
limitint | None

Return at most this many.

(default None)
Returns
list[Job]

Every matching job (or the first limit), newest first, each with its status, step and latest_update; wait() on one gives its reply.

Usage
coordinator = noclick.Agent.from_name("coordinator")
for job in coordinator.jobs(status="live"):
    update = job.latest_update
    print(job.agent_id, job.status, job.step, update.text if update else "")

askasync

agent.ask(
    question, *, conversation=None, interject=False, timeout=None, user=...
) -> AgentReply

Ask it something without stopping it. By default its model answers from a snapshot of conversation as it stands: its instructions, the conversation, and what a running turn has done so far, with no tools. The question and answer aren't added to the conversation and the agent never sees them; a running turn carries on untouched. The ask is recorded in its activity as an agent.ask operation and billed like a short turn. On a coding harness the snapshot is what NoClick holds: the conversation up to its last finished turn, plus what the running turn has done so far: its NoClick tool calls and its own commands (with their output), edits and reads, as its sandbox reported them; its model answers on its connection's key. An agent that thinks with a Claude or ChatGPT plan raises noclick.NotAvailable: a plan runs only in its harness, and answering in a one-off harness session is in invite-only beta (interject=True works).

interject=True puts the question into the running turn instead (the harness's own steering on a coding harness; before its next model call on sdk): the agent sees it, may change course, and answers in that turn, which stays in the conversation. With no turn running, it's an ordinary message. conversation defaults to its session. Asked from another agent's turn, it's an ordinary message: a job of the asker's whose reply wakes it.

Parameters
questionstrrequired
conversationstr | Nonedefault None
interjectbooldefault False
timeoutfloat | 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)
Returns
AgentReply

The answer as an AgentReply; with interject, the reply the turn it joined ended with.

Usage

Check on a child without interrupting it:

planner = noclick.Agent.from_name("planner")
for child in planner.children(status="working"):
    print(child.name, child.ask("In one line: where are you, and what's left?").text)

Steer a coding agent mid-task:

fixer = noclick.Agent.from_name("fixer")
reply = fixer.ask("Skip the flaky e2e suite; the unit tests are enough.", conversation="issue-1841",
                  interject=True)

a2a_cardasync

agent.a2a_card() -> dict[str, Any]

The agent's A2A agent card (the JSON other agents discover it by).

Returns
dict[str, Any]

The card as a dict: the agent's name, its JSON-RPC url and the skills it offers.

Usage
planner = noclick.Agent.from_name("planner")
card = planner.a2a_card()
print(card["url"], [skill["name"] for skill in card["skills"]])

updateasync

agent.update(
    *, instructions=..., model=..., tools=..., tool_rules=..., name=..., harness=...,
    model_connection=..., budget_usd_per_month=..., can_request=..., timezone=...,
    repos=..., network=..., shell=..., browser_profile=..., card=..., machine=...,
    memories=..., skills=..., turn_limits=..., effort=..., speed=...,
    permission_mode=..., setup=..., docker=..., sandbox_size=..., app_testing=...,
    secrets=...
) -> Agent

Change fields. Grants its user gave it are kept. A new harness without a model takes that harness's default model, and each conversation carries on on the new harness, with its own memory and the memories it attaches, from its next turn. memories are as in create ([] detaches them all), and skills too (a coding harness's running sandbox restarts with them). model_connection=None removes an sdk agent's own model key. timezone is as in create, and timezone=None goes back to the acting user's zone. repos are as in create, from its next turn (a running sandbox restarts with them; a clone already in a conversation's workspace stays as it is). shell is as in create, and network too, from its next turn (a coding harness's running sandbox restarts with it). browser_profile signs its browser in with another profile of its scope, from its next browser, and None signs it out. card (invite-only beta) gives it a card in place of the one it holds, as in create, and card=None takes its card back. machine (invite-only beta) moves it onto a Machine, or with None back to a sandbox of its own; it moves between turns and keeps its files. turn_limits is as in create, from its next turn, and None goes back to the defaults. effort, speed and permission_mode are as in create, and None clears one (full-access for the mode). docker and sandbox_size are as in create, from its next turn (a running sandbox restarts with them): docker=False drops its size, and sandbox_size=None is "small" again. app_testing is as in create; "never" turns off what's on now, from its next turn. secrets are the secrets in its shell, as in create, in place of those it has ([] takes them all away). tool_rules are as in create, in place of the ones it has ({} clears them). name renames it, unique among its scope's agents: its old name keeps reaching it and stays reserved for it (former_names), and a NoClick keeps its name.

Parameters
instructionsAnyomit to leave it unchanged
modelAnyomit to leave it unchanged
toolsAnyomit to leave it unchanged
tool_rulesAnyomit to leave it unchanged
nameAnyomit to leave it unchanged
harnessAnyomit to leave it unchanged
model_connectionAnyomit to leave it unchanged
budget_usd_per_monthAnyomit to leave it unchanged
can_requestAnyomit to leave it unchanged
timezoneAnyomit to leave it unchanged
reposAnyomit to leave it unchanged
networkAnyomit to leave it unchanged
shellAnyomit to leave it unchanged
browser_profileAnyomit to leave it unchanged
cardAnyinvite-only betaomit to leave it unchanged
machineAnyinvite-only betaomit to leave it unchanged
memoriesAnyomit to leave it unchanged
skillsAnyomit to leave it unchanged
turn_limitsAnyomit to leave it unchanged
effortAnyomit to leave it unchanged
speedAnyomit to leave it unchanged
permission_modeAnyomit to leave it unchanged
setupAnyomit to leave it unchanged
dockerAnyomit to leave it unchanged
sandbox_sizeAnyomit to leave it unchanged
app_testingAnyomit to leave it unchanged
secretsAnyomit to leave it unchanged
Returns
Agent

This agent, updated. A field you leave out is unchanged, and changes apply from its next turn.

Usage

Change what it does and what it can use:

support = noclick.Agent.from_name("support")
support.update(
    instructions="You answer billing questions and can refund a charge.",
    tools=["stripe.list_invoices", "stripe.create_refund", "search"],
)

Move it to Codex, on a ChatGPT connection:

openai = noclick.Connection.from_name("openai", integration="openai", create_if_missing=True)
support = noclick.Agent.from_name("support")
support.update(harness="codex", model_connection=openai)
print(support.model)   # codex's default model

Tell it the time in New York:

support = noclick.Agent.from_name("support")
support.update(timezone="America/New_York")

Keep its shell off the open internet:

support = noclick.Agent.from_name("support")
support.update(network=["api.stripe.com"])

Let it read what another agent remembers:

sales = noclick.Agent.from_name("sales")
noclick.Agent.from_name("support").update(memories=[sales.memory])

Give its turns more room, and keep each to $3:

noclick.Agent.from_name("builder").update(turn_limits={"steps": 150, "usd": 3})

grantsasync

agent.grants() -> list[AgentGrant]

The connections its user gave it at run time (requested or active), oldest first.

Returns
list[AgentGrant]

Each grant with the connection it names, its integration, its status and the operations it covers (None: every one).

Usage
assistant = noclick.Agent.from_name("assistant", user="user_42")
for grant in assistant.grants():
    print(grant.connection, grant.integration, grant.status, grant.operations)
    # google_calendar  google_calendar  active  None

tool_accessasync

agent.tool_access() -> AgentToolAccess

What it may do with each app it reaches, app by app.

Returns
AgentToolAccess

Each connection of its scope (connected later ones too), any app its rules name, NoClick and the web: whether it's on, each action with what its rules say of it (verdict) and how often each ran in the last 7 days (calls). mode is restricted when it's kept to the apps its rules turn on.

Usage
support = noclick.Agent.from_name("support")
for app in support.tool_access().apps:
    print(app.label, app.on, app.calls)
support.update(tool_rules={"work-gmail.delete_email_message": "off", "stripe.create_refund": "ask"})

revoke_grantasync

agent.revoke_grant(grant) -> None

Take back a grant (an AgentGrant or its id): its tools leave the agent; the connection stays the user's.

Parameters
grantAnyrequired
Usage
assistant = noclick.Agent.from_name("assistant", user="user_42")
for grant in assistant.grants():
    if grant.integration == "slack":
        assistant.revoke_grant(grant)

deleteasync

agent.delete() -> TrashItem

Delete the agent and the sub-agents under it: they go to the trash, restorable for 30 days. Its pending wake-ups and jobs end now and stay ended if it's restored.

Returns
TrashItem

Its TrashItem: restore() brings it and its sub-agents back.

Usage
noclick.Agent.from_name("support").delete()

wakeasync

agent.wake(
    conversation, *, note, at=None, after=None, when=None, filters=None, every=None,
    user=...
) -> Wakeup

Have it take a turn later in conversation, told note (up to 4,000 characters) and what woke it. Exactly one of: at (an aware datetime), after (seconds, or a timedelta), when: an Operation (a Job, a HumanRequest, a ConnectLink, ...: it wakes when that settles, with its outcome; one already settled wakes it at once), a list of them (up to 20: it wakes once, when the last settles, told what each came to, and a child's done update for one of those jobs comes in that turn), or a NoClick event type ("connection.connected", "human.answered"; * matches the rest of a name), narrowed by filters, dotted paths into the event's data and the values they must have: the first matching event after it was set wakes it, with the event; or every, a noclick.Cron: a routine that wakes the conversation at each of its times until it's canceled (tz="user" follows the conversation's user). A user's conversation hears that user's events; one of your account's own hears every event, your users' included. user= says whose conversation it is, as for message.

A turn already running in the conversation goes first: the wake-up waits for it, never Conflict. A channel's conversation raises noclick.InvalidRequest, as for message. It survives restarts, starts its turn once, and is billed and capped like any turn; when the turn can't be paid for, the wake-up fails with the reason. A recurring one stays pending, due at its schedule's next time after each turn, so times it missed (held, or late) fold into one turn. Every agent can also wake itself with its wake_me tool, and list, change and cancel its own (list_wakeups, cancel_wakeup), in the conversation it's in or, with conversation, another of its own (never a channel's, nor from a conversation with someone outside its scope), so work nobody is waiting on runs apart from the thread a person reads. An agent holds up to 100 pending wake-ups and 20 recurring ones (noclick.QuotaExceeded); a time is 1 minute to 365 days ahead, a schedule comes round at most every minute (every 15 for one the agent sets itself), and one conversation's wake-ups at a time are delivered at least a minute apart (news, an operation it waited on or a child's update, comes as soon as the conversation is free).

Parameters
conversationstrrequired
notestrrequired
atAnydefault None
afterAnydefault None
whenAnydefault None
filtersdict[str, Any] | Nonedefault None
everyAnydefault 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
Wakeup

The wake-up, pending; update() changes it, cancel() calls it off.

Usage

Pick a conversation up tomorrow morning, Berlin time:

from datetime import datetime
from zoneinfo import ZoneInfo

support = noclick.Agent.from_name("support")
support.wake("ticket-1841", at=datetime(2026, 10, 2, 9, 0, tzinfo=ZoneInfo("Europe/Berlin")),
             note="Check whether the replacement shipped, and tell the customer.")

Carry on once the user has connected their calendar:

with noclick.as_user("user_42"):
    assistant = noclick.Agent.from_name("assistant")
    calendar = noclick.Connection.from_name("calendar", integration="google_calendar", create_if_missing=True)
    link = calendar.connect_link(reason="to book your flights")
    assistant.wake("trip-planning", when=link, note="The calendar is connected: book the flights now.")

Or when the user's connection named gmail connects:

with noclick.as_user("user_42"):
    assistant = noclick.Agent.from_name("assistant")
    assistant.wake("inbox-zero", when="connection.connected", filters={"name": "gmail"},
                   note="Gmail is connected: sort the inbox as we discussed.")

Keep a routine: every weekday at 8, in the user's own timezone:

with noclick.as_user("user_42"):
    assistant = noclick.Agent.from_name("assistant")
    briefing = assistant.wake("briefing", every=noclick.Cron("0 8 * * 1-5", tz="user"),
                              note="Brief me on today's calendar and anything urgent in my inbox.")

wakeupsasync

agent.wakeups(
    conversation=None, *, status=None, limit=None, user=..., user_filter=None
) -> list[Wakeup]

Its wake-ups in the acting user's conversations (or one conversation), or in those of the users user_filter covers. They're those your code set, those it set itself with wake_me, and NoClick's own: a child's update (update), the link it asked its user to connect an account with being done (answer) and a decided approval (approval). status keeps pending, delivered, canceled or failed ones. user_filter (noclick.ALL_USERS, noclick.NO_USER, a User or your id for one) reads across users without the user header, as conversations does: an account agent's wake-ups in every user's threads.

Parameters
conversationstr | Nonedefault None
statusstr | Sequence[str] | Nonedefault None
limitint | None

Return at most this many.

(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)
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)
Returns
list[Wakeup]

Every matching wake-up (or the first limit), newest first, each with its source, when it's due (at) or what it waits for (when), whose thread it's in (user_id) and, once delivered, the turn it started. cancel() acts in that wake-up's own thread.

Usage

What will wake it in the acting user's threads:

support = noclick.Agent.from_name("support")
for wakeup in support.wakeups(status="pending"):
    print(wakeup.conversation, wakeup.source, wakeup.at or wakeup.when, wakeup.note)

Or what will wake a shared agent in any of its users' threads:

support = noclick.Agent.from_name("support")
for wakeup in support.wakeups(status="pending", user_filter=noclick.ALL_USERS):
    print(wakeup.user_id, wakeup.conversation, wakeup.at, wakeup.note)

triggersasync

agent.triggers() -> list[AgentTrigger]

What wakes it besides a message: schedules, webhooks, app and NoClick events, queues, and the inboxes and numbers that hand it mail and calls.

Returns
list[AgentTrigger]

Each trigger with its kind, its spec, its status (paused while the agent is), the url a webhook listens at, when a schedule's next_run is and when it last_fired_at. An error says why one can't fire.

Usage
support = noclick.Agent.from_name("support")
for trigger in support.triggers():
    print(trigger.kind, trigger.status, trigger.url or trigger.spec)

add_triggerasync

agent.add_trigger(trigger) -> AgentTrigger

Add a trigger: a noclick.OnWebhook, OnEvent, OnPlatformEvent, Cron or OnQueue. An agent holds up to 20. (On an agent whose from_name(..., triggers=...) sets its triggers, that code sets the list instead, and removes one added here the next time it runs.)

Parameters
triggerAnyrequired
Returns
AgentTrigger

The trigger as added; a webhook's url is where to send its POSTs. An event trigger whose connection isn't connected yet is error until it is.

Usage

Give an agent a URL your systems can wake it at:

fulfilment = noclick.Agent.from_name("fulfilment")
orders = fulfilment.add_trigger(noclick.OnWebhook(name="orders"))
print(orders.url)

Or wake it on each new HubSpot contact:

sales = noclick.Agent.from_name("sales")
sales.add_trigger(noclick.OnEvent("hubspot", "contact_created", message="Research this contact."))

Or put it on a schedule, which makes it an automation:

support = noclick.Agent.from_name("support")
support.add_trigger(noclick.Cron("0 17 * * 5", tz="America/New_York", message="Send the weekly ticket report"))

update_triggerasync

agent.update_trigger(
    trigger, *, cron=None, message=..., conversation=..., filters=..., mode=None
) -> AgentTrigger

Change a trigger in place: it keeps its id, its history, and a webhook its URL. cron, a noclick.Cron, moves a schedule to its time in its tz at once (and changes its message when the Cron has one); message changes what any trigger's turn is told, and conversation the template a webhook, event or queue trigger keys its conversations by (None clears either); filters replaces an app event's or a NoClick event's filters (it hears by them from the next delivery); mode ("mentions" or "all") changes the mode of a channel the agent sits in, for every agent in it (your key needs channels). A webhook's name, an event's connection and event, and a queue stay: remove it and add another for that. trigger is an AgentTrigger, its id, or the definition you added, as for remove_trigger. Checked and registered as add_trigger does; a paused schedule takes its new time when it resumes.

Parameters
triggerAnyrequired
cronCron | Nonedefault None
messageAnyomit to leave it unchanged
conversationAnyomit to leave it unchanged
filtersAnyomit to leave it unchanged
modestr | Nonedefault None
Returns
AgentTrigger

The trigger as it is now, with its new next_run_at.

Usage
digest = noclick.Agent.from_name("digest")
[schedule] = [t for t in digest.triggers() if t.kind == "cron"]
digest.update_trigger(schedule, cron=noclick.Cron("30 7 * * 1-5", tz="Europe/London"))

pause_triggerasync

agent.pause_trigger(trigger) -> AgentTrigger

Pause one trigger, the agent running on. A schedule is skipped (its next_run_at still reads), a webhook's calls and app or NoClick events are acknowledged and dropped, a queue's messages wait on the queue. pause() stops everything that wakes the agent.

Parameters
triggerAnyrequired
Returns
AgentTrigger

The trigger as it is now (paused is True).

Usage
support = noclick.Agent.from_name("support")
[orders] = [t for t in support.triggers() if t.spec.get("name") == "orders"]
support.pause_trigger(orders)

resume_triggerasync

agent.resume_trigger(trigger) -> AgentTrigger

Resume a trigger paused on its own, or one its failures stopped. It wakes the agent again (a schedule at its next run), unless the agent itself is paused.

Parameters
triggerAnyrequired
Returns
AgentTrigger

The trigger as it is now (state is live unless the agent is paused).

Usage
support = noclick.Agent.from_name("support")
for trigger in support.triggers():
    if "resume" in trigger.actions:
        support.resume_trigger(trigger)

remove_triggerasync

agent.remove_trigger(trigger) -> None

Remove a trigger: an AgentTrigger, its id, or the definition you added (noclick.NotFound if none matches; an OnWebhook by its unique name). Mail and call triggers change on their inbox or number.

Parameters
triggerAnyrequired
Usage
support = noclick.Agent.from_name("support")
for trigger in support.triggers():
    if trigger.kind == "webhook":
        support.remove_trigger(trigger)

tool_serversasync

agent.tool_servers() -> list[AgentToolServer]

Its MCP servers, each a step of its automation. Whether one connected is a conversation's: agent.conversation(name).tool_servers().

Returns
list[AgentToolServer]

A list of AgentToolServer, in its automation's order.

Usage
for server in noclick.Agent.from_name("coder").tool_servers():
    print(server.name, server.url, server.signed_in)

add_tool_serverasync

agent.add_tool_server(
    url, *, name=None, transport='http', credential=None, headers=None
) -> AgentToolServer

Give it an MCP server's tools from its next turn. The server is a step of its automation, reached at its public https URL (transport sse for one that speaks only the older SSE), named name, else after the URL's host (mcp.linear.app is linear). A server that asks its client to sign in raises noclick.InvalidRequest (needs_sign_in) unless credential is the account's own sign-in to it, which NoClick's MCP sign-in makes (the app's Add an MCP server runs it), or headers carry the key it takes instead ({"Authorization": "Bearer <key>"}): kept as a credential, sent on every request, never read back. Up to 20.

Parameters
urlstrrequired
namestr | Nonedefault None
transportstrdefault 'http'
credentialstr | Nonedefault None
headersdict[str, str] | Nonedefault None
Returns
AgentToolServer

The AgentToolServer as added: its id (what remove_tool_server takes), name, url, whether it's signed_in and its headers' names.

Usage
coder = noclick.Agent.from_name("coder")
docs = coder.add_tool_server("https://mcp.example.com/mcp", name="docs",
                             headers={"X-Api-Key": os.environ["DOCS_KEY"]})
print(docs.id)

update_tool_serverasync

agent.update_tool_server(server, *, headers) -> AgentToolServer

Replace an MCP server's headers. From its next turn it sends headers (a new key; {}: none), and those given before are deleted.

Parameters
serverstr | AgentToolServerrequired
headersdict[str, str]required
Returns
AgentToolServer

The AgentToolServer as it stands, its headers naming the new ones.

Usage
coder = noclick.Agent.from_name("coder")
coder.update_tool_server("mcp_docs", headers={"X-Api-Key": os.environ["DOCS_KEY"]})

remove_tool_serverasync

agent.remove_tool_server(server) -> None

Take an MCP server away (by AgentToolServer or id). Its tools stop from its next turn and the headers given it go; its sign-in stays connected.

Parameters
serverstr | AgentToolServerrequired
Usage
coder = noclick.Agent.from_name("coder")
coder.remove_tool_server("mcp_docs")

rehearse_triggerasync

agent.rehearse_trigger(trigger, *, sample=None) -> Operation

A test run of the turn a trigger would start now, without a real delivery. The agent reads what sample would hand it (a webhook's body; an app event's or a NoClick event's data; a queue message's body; an email's {"from", "subject", "text"}; a channel post's text or {"text", "from"}), else a sample of its own (a schedule's or a recurring wake-up's run; an app event's values placeholders in the shape it has reached your account in, no data until one has; a NoClick event's from the event catalog), under the trigger's message, its tool calls answered by a simulated world as in rehearse, so nothing is sent. A call and an approval can't be tested. trigger is an AgentTrigger, its id, or the definition you added.

Parameters
triggerAnyrequired
sampleAnydefault None
Returns
Operation

The run's operation (kind agent.rehearse); .wait() gives the Rehearsal.

Usage
whatsapp = noclick.Connection.from_name("whatsapp", integration="whatsapp")
inbox = noclick.Agent.from_name("inbox")
run = inbox.rehearse_trigger(noclick.OnEvent(whatsapp, "receive_message"))
print(run.wait().reply)

inboxesasync

agent.inboxes() -> list[Inbox]

The inboxes whose mail wakes it (created or updated with agent= it).

Returns
list[Inbox]

Every such inbox, newest first, each with its address.

Usage
support = noclick.Agent.from_name("support")
print([inbox.address for inbox in support.inboxes()])

pauseasync

agent.pause() -> Agent

Stop every trigger from waking it: scheduled runs are skipped (not made up), webhook calls get a 409 their sender can retry, and app events, mail and calls meanwhile don't wake it. Messages your code sends still run.

Returns
Agent

This agent, with paused true.

Usage
digest = noclick.Agent.from_name("digest")
digest.pause()
print(digest.paused)   # True

resumeasync

agent.resume() -> Agent

Let its triggers wake it again, including one that stopped after failing the same way five times; a schedule picks up at its next run.

Returns
Agent

This agent, with paused false.

Usage
digest = noclick.Agent.from_name("digest")
digest.resume()

workspace

agent.workspace(conversation=None, *, user=...) -> AgentWorkspace

The files it works on: its one /workspace (AgentWorkspace; a conversation is accepted and ignored). Sends nothing yet.

Parameters
conversationstr | 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)
Returns
AgentWorkspace

Its workspace, whose files, read, write and url reach its files.

Usage
support = noclick.Agent.from_name("support")
workspace = support.workspace(user="user_42")
for file in workspace.files():
    print(file.path, file.size_bytes)

sandbox

agent.sandbox(conversation=None, *, user=...) -> AgentSandbox

The machine it works on, one whoever it answers. An AgentSandbox: what it is and costs, its files, and your own commands on it beside its work. Without a conversation it's read through its session. Sends nothing yet.

Parameters
conversationstr | 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)
Returns
AgentSandbox

Its sandbox, whose get, files, read and exec reach it.

Usage
coder = noclick.Agent.from_name("coder")
machine = coder.sandbox()
if machine.get().status == "running":
    print(machine.exec("git log --oneline -5").stdout)

shareasync

agent.share() -> ShareLink

Turn on its public chat page, or read it if it's on: anyone with the link talks to the agent, no sign-in, each visitor in their own conversations. Their turns bill to you, against its budget, rate limited per visitor.

Returns
ShareLink

The link: its url, and disable() and rotate() to turn it off or change it.

Usage
support = noclick.Agent.from_name("support")
link = support.share()
print(link.url)   # https://noclick.com/a/...

streamiterator

agent.stream(text, *, conversation=None, files=(), user=...) -> Iterator[AgentEvent]

Send text (and any files) and watch the turn as it happens: the reply as it's written, each tool call and result, each file, approval and long action, then the whole reply. The same turn as message, billed the same.

Parameters
textstrrequired
conversationstr | Nonedefault None
filesSequence[Any]default ()
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
Iterator[AgentEvent]

AgentEvent values in order, ending with one whose type is done and whose reply is the AgentReply. A turn that fails raises its error instead.

Usage

Print the reply as it's written:

support = noclick.Agent.from_name("support")
for event in support.stream("Where's my refund?", conversation="ticket-1841"):
    if event.type == "text":
        print(event.text, end="", flush=True)
    elif event.type == "tool_call":
        print(f"\n[{event.tool}]")

In async code, relay it to your own UI:

support = noclick.Agent.from_name("support")
async for event in support.stream.aio("Where's my refund?", user="user_42"):
    await websocket.send_json(event.raw)

watchiterator

agent.watch(conversation, *, user=..., replay=False) -> Iterator[AgentEvent]

Follow one conversation live, whoever moves it (a trigger, an answered ask, an approved held call, another client, a person after a hand-off), your own turns too (by operation_id). It runs until you stop reading or the conversation is deleted. replay starts with the last hour's kept moments, so a turn joined halfway is seen whole.

Parameters
conversationstrrequired
userAny

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

(defaults to the current user)
replaybooldefault False
Returns
Iterator[AgentEvent]

AgentEvent values as they happen: message (a whole message, with its role: user, assistant or person, and its files), text as a reply is written, tool_call (held names the approval when policy holds it), tool_result, file, approval and operation (from its "noclick" tools), and status when the conversation starts waiting on a person, is handed off or becomes active. A coding harness's turn adds output and diff (AgentEvent).

Usage

Push what happens in a support thread to your own UI:

support = noclick.Agent.from_name("support")
for event in support.watch("ticket-1841", user="user_42"):
    if event.type == "message":
        print(event.role, event.text)
    elif event.type == "tool_call" and event.held:
        print("Waiting for approval:", event.held["url"])

In async code:

support = noclick.Agent.from_name("support")
async for event in support.watch.aio("ticket-1841"):
    await websocket.send_json(event.raw)

rehearseasync

agent.rehearse(message, *, scenario=None, user=...) -> Operation

A test run of this agent against a simulated world. A real turn (its model, instructions and tools) where that world answers every tool call, so nothing is sent, no account is touched and its connections needn't be connected yet (its model connection must be). scenario says what that world is like; the world keeps to it, and without one it's an ordinary busy day. The run is billed like a turn, counts toward the agent's budget, and is no turn in any of its conversations. An account has up to 10 runs queued or running at once (noclick.QuotaExceeded past that).

Parameters
messagestrrequired
scenariostr | 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)
Returns
Operation

The run's operation (kind agent.rehearse); .wait() gives the Rehearsal: the reply, and the tool_calls it made with what the world answered.

Usage
support = noclick.Agent.from_name("support")
run = support.rehearse(
    "Order 1841 arrived broken. I want my money back.",
    scenario="Order 1841 was delivered on Sep 2 and paid by card; the customer has asked once before.",
).wait()
print(run.reply)
for call in run.tool_calls:
    print(call["tool"], call["arguments"])

AgentConversation

class AgentConversation

One conversation with an agent, as a chat reads and changes it (agent.conversation(name)): its settings, a fork, a revert, resuming it as the agent's session, its context and usage, a command. Sends nothing until you call one.

Attributes
namestr

The conversation's key.

settingsasync

agent_conversation.settings() -> ConversationSettings

What its next turn runs on, and what its harness and accounts offer.

Usage
chat = noclick.Agent.from_name("coder").conversation("main")
settings = chat.settings()
print(settings.model, settings.effort, settings.efforts)

updateasync

agent_conversation.update(**changes) -> ConversationSettings

Change it from its next message: permission_mode, title (a rename) and archived. model, effort, speed and model_connection change the agent itself, for every conversation, as Agent.update does (None clears effort, speed or model_connection). Its harness stays the agent's.

Parameters
**changesAny
Returns
Usage
chat = noclick.Agent.from_name("coder").conversation("main")
chat.update(model="opus", effort="high")   # the agent's, for everyone
chat.update(permission_mode="approval-required", title="Retries")

forkasync

agent_conversation.fork(*, message=None, title=None) -> Conversation

Copy it into a new conversation, up to and with a message's turn (a Message.id; the whole thread when omitted), with the same permission mode. Its agent reads the copy in its own history (agent_reads native), or, where it can't, as context its first turn carries.

Parameters
messagestr | Nonedefault None
titlestr | Nonedefault None
Returns
Conversation

The new Conversation, with forked_from.

Usage
coder = noclick.Agent.from_name("coder")
last = coder.history("main")[-1]
fork = coder.conversation("main").fork(message=last.id)
coder.message("Try the other approach", conversation=fork.conversation)

resumeasync

agent_conversation.resume() -> Conversation

Make it the agent's session again, like claude --resume: everyone talking to the agent shares it from now on, and a message without a conversation goes to it. The agent's files stay as they are. Raises noclick.Conflict while the agent is working on a turn, and noclick.NotFound for a conversation the agent never had.

Returns
Usage
coder = noclick.Agent.from_name("coder")
earlier = [c for c in coder.conversations(limit=20) if not c.active][0]
coder.conversation(earlier.conversation).resume()

revertasync

agent_conversation.revert(message, *, files=False) -> ConversationRevert

Go back to before a message you sent (a Message.id): it and everything after it leave the thread and what the agent reads; files=True also puts the files its edits since changed back as they were, before its next turn. Raises noclick.Conflict while a turn runs or the agent waits on an answer there.

Parameters
messagestrrequired
filesbooldefault False
Returns
ConversationRevert

A ConversationRevert, whose text is the message's.

Usage
coder = noclick.Agent.from_name("coder")
mine = [m for m in coder.history("main") if m.role == "user"][-1]
undone = coder.conversation("main").revert(mine.id, files=True)
print(undone.files["restored"])

contextasync

agent_conversation.context() -> ConversationContext

How full the model's context was at its last turn, against its window (a chat's /context).

Usage
used = noclick.Agent.from_name("coder").conversation("main").context()
print(f"{used.percent}% of {used.window_tokens}")

usageasync

agent_conversation.usage() -> ConversationUsage

What it cost and what pays for its model (a chat's /usage).

Usage
spent = noclick.Agent.from_name("coder").conversation("main").usage()
print(spent.cost_usd, spent.pays_with)

tool_serversasync

agent_conversation.tool_servers() -> ToolServers

The MCP servers its coding harness reaches its tools on: connected, connecting or failed, with their tools.

Usage
for server in noclick.Agent.from_name("coder").conversation("main").tool_servers().servers:
    print(server.name, server.status, server.error)

reconnect_tool_serverasync

agent_conversation.reconnect_tool_server(name) -> ToolServers

Do one tool server's handshake again, where its harness can (tool_servers().reconnect): Claude Code and OpenCode reconnect that server, Codex reloads all of them. Hermes Agent and OpenClaw connect theirs at every turn, so this raises noclick.Conflict saying the next message reconnects them.

Parameters
namestrrequired
Returns
ToolServers

A ToolServers, as it stands after the reconnect started.

Usage
noclick.Agent.from_name("coder").conversation("main").reconnect_tool_server("linear")

message_subagentasync

agent_conversation.message_subagent(call_id, text) -> Operation

Tell one of its coding harness's own subagents something while it works: the Task (Claude Code) or task (OpenCode) call call_id in the conversation's running turn, as its events name it. No harness takes a message into its subagent, so it joins the main session's turn, which reads whom it's for and passes it on; the thread keeps it as yours, its subagent naming the call. Raises noclick.Conflict once that turn or the subagent has ended. A NoClick agent it started takes messages itself (Agent.send).

Parameters
call_idstrrequired
textstrrequired
Returns
Operation

Its agent.ask Operation, answered with the reply of the turn it joined.

Usage
chat = noclick.Agent.from_name("coder").conversation("main")
chat.message_subagent("toolu_01", "Also check the admin routes.").wait()

run_commandasync

agent_conversation.run_command(
    name, arguments='', *, delivery=None
) -> CommandResult | Operation

Run a command typed in a chat. One NoClick has a control for (/model opus, /effort high, /fast, /new, /context, /usage, /btw <question>) comes back as that control's CommandResult; any other runs as the harness's own command, its turn's Operation.

Parameters
namestrrequired
argumentsstrdefault ''
deliverystr | Nonedefault None
Returns
CommandResult | Operation

A CommandResult, or the command's Operation.

Usage
chat = noclick.Agent.from_name("coder").conversation("main")
chat.run_command("effort", "high")
chat.run_command("compact").wait()

AgentStateRow

class AgentStateRow

One agent as a list shows it (Agent.states()): its state (needs_you: something waits on a person, its harness's request included; working; with_you: a person has one of its conversations; waking: a turn of its own is about to start; failed: its last turn failed; idle), the conversation that's in, the tool call it runs now ({tool, kind, line, since, running}), what waiting counts (asks, held_calls, requests, total) and when.

Attributes
agent_idstr
namestr
harnessstr
statestr
conversationstr | None
nowdict[str, Any] | None
waitingdict[str, int]
turn_started_atAny
last_active_atAny
faileddict[str, Any] | None
wakingdict[str, Any] | None
rawdict[str, Any]

The response JSON exactly as the API sent it.

CommandResult

class CommandResult

What a command NoClick has a control for came to: its control (model, effort, new, context, usage, ask…) and that control's answer (result: the conversation's settings, a new conversation, its context or usage, or an operation).

Attributes
controlstr
commanddict[str, str]
resultdict[str, Any]
rawdict[str, Any]

The response JSON exactly as the API sent it.

ConversationContext

class ConversationContext

How full the model's context was at the conversation's last turn: used_tokens of window_tokens (percent), as its coding harness reported them (source harness) or as NoClick's runtime sent its last call (noclick), and where it folds the thread by itself (auto_compacts_at, a share of the window). None figures before a first turn.

Attributes
modelstr | None
used_tokensint | None
window_tokensint | None
percentfloat | None
auto_compacts_atfloat | None
sourcestr | None
as_ofAny
rawdict[str, Any]

The response JSON exactly as the API sent it.

ConversationRevert

class ConversationRevert

A revert: the message it went back to before (its text, to send again), how many turns left the thread, what the agent reads (agent_reads: native in its own history, context carried by its next turn), and the files: files["restored"] are put back before its next turn (in its sandbox, where they are), kept (with files=False), not_restored ({path, why}: an edit too large to have been kept whole) and commands_not_undone.

Attributes
conversationstr
messagestr
textstr
dropped_turnsint
filesdict[str, Any]
files_appliedstr | None
agent_readsstr
rawdict[str, Any]

The response JSON exactly as the API sent it.

AgentToolServer

class AgentToolServer

An MCP server an agent has as tools: a step of its automation (id, what remove_tool_server takes), reached at its url over transport (http or sse), signed_in where a sign-in to it is set, sending the headers named (their values are never read back).

Attributes
idstr
namestr
urlstr | None
transportstr
signed_inbool
headerslist[str]
rawdict[str, Any]

The response JSON exactly as the API sent it.

ConversationUsage

class ConversationUsage

What a conversation cost: cost_usd (what its turns were charged), its model calls on your own key or plan (model_usage, None on NoClick's key), its turns, what pays for its model (pays_with: noclick, key or plan) and, on a plan, its limits where its harness reported them (plan_limits, each {label, used_percent, resets_at}).

Attributes
cost_usdfloat
model_usagedict[str, Any] | None
turnsint
pays_withstr
plan_limitslist[dict[str, Any]]
rawdict[str, Any]

The response JSON exactly as the API sent it.

ToolServer

class ToolServer

One MCP server a conversation's coding harness reaches its tools on: status connected, connecting (its handshake hasn't finished) or failed (error says why), and how many tools it offers the model where the harness says (tool_count).

Attributes
namestr
statusstr
tool_countint | None
errorstr | None

ToolServers

class ToolServers

A conversation's tool servers: read live from its running harness (source live), else as its last turn found them (last_turn), else none yet (none). reconnect is {available, scope, why}: whether one server's handshake can be done again in place (scope server), only all of them at once (all), or not and why not.

Attributes
serverslist[ToolServer]
sourcestr
checked_atAny
reconnectdict[str, Any]
rawdict[str, Any]

The response JSON exactly as the API sent it.

AgentCommand

class AgentCommand

One command a conversation's harness offers: its name (without the slash), what it does, what its arguments look like (argument_hint), where it comes from (source: harness, custom, skill or mcp) and the other names it answers to.

Attributes
namestr
descriptionstr
argument_hintstr
sourcestr
aliaseslist[str]

AgentCommands

class AgentCommands

What a conversation's harness offers a person to run, read from the harness itself: its commands and skills (each {name, description}); capabilities (commands, skills, compact, review, goal, init, steer, queue); not_supported, what NoClick can't run there and why; withheld, the commands NoClick never runs from a chat (those that change what NoClick sets up and guards for the agent: its MCP servers, permissions, credentials, model provider, process or settings files); mapped, the harness's commands NoClick has a control of its own for, each {name, to} (to: model, effort, new, usage, context, plan, delivery or ask), which a page offers in their place; and how fresh the list is: as_of (when it was read) and read_from (this_conversation or another_conversation: it's kept per agent and harness, so a stopped sandbox's last list still answers), both None before its sandbox ever started.

Attributes
harnessstr
commandslist[AgentCommand]
skillslist[dict[str, str]]
capabilitiesdict[str, bool]
not_supporteddict[str, str]
withheldlist[str]
mappedlist[dict[str, str]]
as_ofAny
read_fromstr | None
rawdict[str, Any]

The response JSON exactly as the API sent it.

AgentGrant

class AgentGrant

A connection the agent's user gave it at run time (it asked with its request_connection tool, within can_request). status is requested until the user connects, then active; operations None means every operation.

Attributes
idstr
connectionstr
integrationstr
operationslist[str] | None
statusstr
reasonstr | None
conversationstr | None
created_atAny
granted_atAny
rawdict[str, Any]

The response JSON exactly as the API sent it.

ConversationSettings

class ConversationSettings

What a conversation's next turn runs on: the agent's model, effort, speed and model_connection (an agent is one session, so every conversation runs on them); the efforts and speeds its harness takes on that model; what can pay for it (accounts); its permission mode (permission_mode, effective_permission_mode: the strictest its harness enforces when it can't enforce the one set, permission_modes, not_supported); its title, whether it's archived and what it was forked from.

Attributes
permission_modestr
effective_permission_modestr
permission_modeslist[str]
not_supporteddict[str, str]
rawdict[str, Any]

The response JSON exactly as the API sent it.

conversationstr | None
titlestr | None
archivedbool
harnessstr | None
modelstr | None
effortstr | None

How hard its model reasons (None: the model's own default, default_effort when the harness says it).

effortslist[str]

The efforts its harness takes on its model, weakest first, in the harness's own words.

default_effortstr | None
speedstr
speedslist[str]

["standard", "fast"] where its harness has a fast mode on its model; [] where it has none.

model_connectionstr | None
accountslist[dict[str, Any]]

What can pay for it: each {name, integration, kind (key, plan or noclick), connected, usable, why}.

overriddenlist[str]

What the conversation sets itself: its permission_mode.

forked_fromdict[str, Any] | None

{conversation, message, through}: what it was forked from (through: its own last copied message).

HarnessRequest

class HarnessRequest

What a coding harness asks a person mid-turn: an approval (action: command, edit, plan (leaving Claude Code's plan mode, its plan text), read, fetch or tool; title in a line, detail the command or the files) or a question (questions, each {id, header, question, options, multi_select}). options are ACP's (allow_once, allow_always, reject_once); status is pending until it's answered, expired (nobody answered in time: declined) or canceled (its turn stopped). Answer it with Agent.answer.

Attributes
idstr
kindstr
statusstr
actionstr | None
titlestr | None
detailstr | None
planstr | None
questionslist[dict[str, Any]]
optionslist[dict[str, str]]
answerdict[str, Any] | None
operation_idstr | None
created_atAny
expires_atAny
rawdict[str, Any]

The response JSON exactly as the API sent it.

decisionstr | None

What it was answered with (allow_once, reject_once, …) and when; None until it's answered.

answered_atAny
canceled_reasonstr | None

Why it was closed unanswered: its turn ended first (failed, stopped, timed out).

AgentReply

class AgentReply

The agent's answer to one message.

Attributes
textstr
conversationstr | None
tool_callslist[dict[str, Any]]

The turn's tool calls, each {tool, arguments, result, is_error, created_at} as history() shows a reply's (a failed call's result is its error); a coding harness's own steps add source: "harness" and the rest of an AgentStep (its id, kind, command, path, output, exit_code, duration_ms, diffs), in the order they happened.

operation_idstr | None
rawdict[str, Any]

The response JSON exactly as the API sent it.

model_usageModelUsage | None

The turn's model calls on your own key or plan (None on NoClick's key, whose cost is its cost_usd).

ended_bystr | None

The limit that ended the turn before it finished ("steps", "spend" or "time": its turn_limits), its text then saying where the work stands; None when the agent answered.

stepslist[AgentStep]

tool_calls as AgentSteps.

AgentStep

class AgentStep

One step of a turn as its reply keeps it (Message.steps, AgentReply.steps). kind is a coding harness's shell command, file edit, read or search, or any other tool (NoClick's own among them). A coding harness's own step (source harness) has the fields its live events showed as it ran, under its call_id: its tool_call (kind, tool, arguments, command, path, query), its command's output (the last 4,096 characters; what came before reads [… N characters not shown …]), its tool_result (exit_code, duration_ms, is_error, result) and each diff (diffs). A turn keeps at most 200 such steps and 256,000 characters of their output and diffs, the newest steps' first. NoClick's own tool calls are kind tool, with no call_id.

Attributes
kindstr
toolstr
call_idstr | None
sourcestr | None
argumentsdict[str, Any]
commandstr | None
pathstr | None
querystr | None
outputstr | None
exit_codeint | None
duration_msint | None
is_errorbool
resultAny
diffslist[AgentStepDiff]
created_atAny
rawdict[str, Any]

The response JSON exactly as the API sent it.

AgentStepDiff

class AgentStepDiff

One file a step changed: a unified diff, or a new file's whole content (change add), at most 16,384 characters.

Attributes
pathstr
changestr | None
diffstr

Conversation

class Conversation

One thread with an agent; pass conversation back to continue it or to history().

Attributes
conversationstr
user_idstr | None
titlestr | None
previewstr | None
turnsint | None
cost_usdfloat | None
last_activityAny
rawdict[str, Any]

The response JSON exactly as the API sent it.

statusstr | None

active; awaiting_human while a turn waits on a person (an ask, a held call, a sign-in); handed_off while a person has it.

handed_off_tostr | None

Who a handed_off conversation is with: the person's email or phone.

model_usageModelUsage | None

Its model calls on your own key or plan, all turns together (None on NoClick's key).

last_messagedict[str, Any] | None

Its newest message: {role, text, created_at} (None before any).

peoplelist[dict[str, Any]]

Who is in it: each {type, id, name}, the thread's own person first, then whoever else wrote in it.

archivedbool
forked_fromdict[str, Any] | None

{conversation, message, through}: the conversation it was forked from.

agent_readsstr | None

A fork's: native when the agent reads the copy in its own history, context when carried as context.

activebool

Whether it's the agent's session now, the one conversation everyone talking to it shares; the others can be resumed.

Message

class Message

One message of a conversation: its role is user, assistant, person (someone it was handed off to) or note (a line added with agent.note, with its data).

Attributes
rolestr
textstr
created_atAny
rawdict[str, Any]

The response JSON exactly as the API sent it.

fileslist[Attachment]

The files it carried (a user message's, sent with files=).

tool_callslist[dict[str, Any]]

A reply's tool calls: each {tool, arguments, result, is_error, created_at}, as its turn's tool_call and tool_result events showed it (arguments cut short are {"_truncated": True}); a coding harness's reply has its own steps among them, in the order they happened (AgentStep).

viastr | None

How a user message reached the agent when not through the API: whatsapp, imessage (a text to NoClick's number), call (said on a phone call) or email (mail to one of its inboxes).

datadict[str, Any] | None

A note's data, as agent.note added it.

triggerdict[str, Any] | None

What started the turn of a user message no person sent: {kind, id, title}, kind a trigger's (webhook, event, cron, platform, queue), wakeup, or app_testing (NoClick carrying on once app testing changed); a NoClick event's has its event ({id, type, data}). None for a message someone sent.

reasoninglist[dict[str, Any]]

A reply's reasoning: each {text, created_at}, a short line of what its model was thinking, as its turn's reasoning events showed it.

operation_idstr | None

The turn it belongs to (an agent.message operation's id; None for a message no turn sent, like a person's).

commanddict[str, str] | None

The harness command a user message ran in place of text: {name, arguments}. None for a message.

idstr | None

Its place in the thread, which stays (a revert marks, never removes): what fork and revert take.

authordict[str, Any] | None

Who sent a user message: {type, id, name}, type account (the account itself, its owner or a key), user (one of your users, or you in a workspace you joined: id is that user's id), agent or app (an app's code). None where nobody's named (a trigger's event, an older message).

notificationbool

An agent's message to its owner from another of its conversations (a human__notify that joined this thread).

spacedict[str, Any] | None

A notification passing on a space's news (a space's NoClick alerted the person, or answered a question their NoClick asked it): {workspace_id, name, label}, label what that NoClick goes by outside its space ("NoClick · Launch"). None otherwise.

subagentdict[str, str] | None

A user message written for one of its coding harness's subagents (message_subagent): {id, title}, id the harness's call that runs it. None otherwise.

chatstr | None

The chat a message of the agent's session came from, where it isn't the session's own: the conversation it was sent to (a WhatsApp chat's id, channel:<id>, owner, a shared page's visitor), which its reply goes back to. None otherwise.

stepslist[AgentStep]

tool_calls as AgentSteps.

HarnessInfo

class HarnessInfo

What can run an agent: one of Agent.harnesses(). sdk is NoClick's own agent loop; the others are coding agents that run in a sandbox of their own, with a shell and files, and think with the key or plan of a model_connection. models() searches the models it offers.

Attributes
namestr

What harness= takes: sdk, claude_code, codex, opencode, hermes or openclaw.

labelstr | None
versionstr | None

The version NoClick runs (None for sdk).

default_modelstr

The model an agent on it gets when you give none.

custom_modelsbool

Whether model= also takes models models() doesn't offer.

model_connectionstr

"required" for every CLI harness, "optional" for sdk.

integrationslist[str]

The model providers (kind="model" integrations) whose connection it can think with.

streamingstr

"tokens" when the reply streams as it's written, "final" when it arrives whole.

shellstr

"built_in" when it has its own shell and file tools, "code_capability" when its shell is the code tool.

noteslist[str]

What to know before choosing it (a model that needs a particular key, say).

rawdict[str, Any]

The response JSON exactly as the API sent it.

effortslist[str]

The reasoning efforts it takes on its default model, weakest first ([]: none).

default_effortstr | None

The effort it runs at when none is set (None: the model's own).

speedslist[str]

["standard", "fast"] where it has a fast mode on its default model, else [].

noclick_keydict[str, Any]

Whether a coding agent on it may run on NoClick's own key (model_connection="noclick", at the model's cost): {runs, models} (models to suggest there), or {runs: False, why}.

permission_modeslist[str]

The permission modes it enforces ([]: none, as on sdk), and why it runs the others as another.

not_supporteddict[str, str]

modelsasync

harness_info.models(search=None, *, limit=50) -> list[HarnessModel]

The models it offers, its default first: the first limit (at most 200), or those whose id or label contains search (ignoring case). A search after a few quiet minutes reads the providers' lists afresh, so it can take seconds.

Parameters
searchstr | Nonedefault None
limitint

Return at most this many.

(default 50)
Returns
list[HarnessModel]

Each model's id (what model= takes) and label. A harness whose custom_models is True also runs ids it doesn't list.

Usage

Find a Claude model for an agent on OpenCode:

[opencode] = [h for h in noclick.Agent.harnesses() if h.name == "opencode"]
for model in opencode.models(search="claude", limit=10):
    print(model.id, model.label)

Check that a model is one Claude Code offers before creating the agent:

[claude_code] = [h for h in noclick.Agent.harnesses() if h.name == "claude_code"]
offered = [m.id for m in claude_code.models(search="opus")]
print("opus" in offered)

HarnessModel

class HarnessModel

A model a harness offers, by the id its model= takes. One model reached several ways is a row per way, each with its route (maker, openrouter, opencode or opencode-go) and the same canonical, the model as its maker names it (anthropic/claude-sonnet-5-5); a model reached one way is its own canonical.

Attributes
idstr
labelstr | None
canonicalstr
routestr
noclick_keydict[str, Any] | None

What it costs on NoClick's own key: output_usd_per_million (None for a router priced as the model it picks for each call) and needs_funds_usd, the funds your account must have added (not its plan's included usage) to put an agent on it there: set for a model over $2 a million output tokens, else None. None where the key doesn't run it on this harness, or its price can't be read now.

ModelUsage

class 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 doesn't bill these calls (the key or plan pays); this is how you see them. A coding harness on a plan counts what it reports, priced as if it ran on a key.

Attributes
input_tokensint
output_tokensint
cached_tokensint
usdfloat
rawdict[str, Any]

The response JSON exactly as the API sent it.

AgentToolAccess

class AgentToolAccess

What an agent may do with each app it reaches (agent.tool_access()). mode is restricted when it's kept to the apps its rules turn on, else everything; listed when its tools are a list rather than everything, whose rules are what that list amounts to; since when the calls counted start.

Attributes
modestr
listedbool
rulesdict[str, str]
sinceAny
appslist[AgentToolApp]
rawdict[str, Any]

The response JSON exactly as the API sent it.

AgentToolApp

class AgentToolApp

One app in agent.tool_access(): a connection of its scope, an integration its rules name, NoClick or the web (kind). key is its rule key (None for the web, whose actions search and fetch are keys of their own); account the account it's connected as (else its name); on whether anything of it may run.

Attributes
keystr | None
appstr
kindstr
integrationstr | None
credential_typestr | None
labelstr
accountstr | None
statusstr | None
onbool
callsint
actionslist[AgentToolAction]

AgentToolAction

class AgentToolAction

One action of an app in agent.tool_access(): its rule key, what its rules say of it (verdict: allow, ask or off) and how often it ran. group is its integration's own grouping of it (Message, Invoices); kind what it does, from its name (read, send, change, delete or money: a hint, never a rule); can_ask False where ask can't hold it (reading never waits for a person).

Attributes
keystr
actionstr
titlestr
groupstr | None
kindstr
verdictstr
can_askbool
callsint

AgentMemory

class AgentMemory

agent.memory: named notes the agent keeps across conversations. Every turn starts with each entry's name and description; the agent reads a body when it needs one, and saves what it learns. Your code can seed, read, correct and forget entries the same way.

An account agent keeps two layers: entries saved outside as_user are the account's, read in every user's conversations (your refund policy), and what it learns while talking to a user is that user's alone. A user's own agent has one memory, the user's. The agent changes the account's entries only in conversations your code has with it outside as_user, and only reads its memory when it answers someone outside your account (an inbox's sender, a caller, a visitor to its share link). A long conversation also keeps its checkpoint here, in that conversation's layer (MemoryEntry.conversation).

It's a noclick.Memory (its id is agent.memory_id) that goes with the agent: another agent of its scope can read it too, with memories=[agent.memory], and named memories (noclick.Memory) are attached the same way.

Usage
support = noclick.Agent.from_name("support")
support.memory.save("refunds", "Refund within 30 days of purchase.", description="Our refund rules")
print([entry.name for entry in support.memory.list()])

listasync

agent.memory.list(*, user=...) -> list[MemoryEntry]

The entries of one layer: the account's outside as_user, else the user's.

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
list[MemoryEntry]

Each entry's name, description, version and when it last changed, by name; content is None here, so read an entry for its body.

Usage
support = noclick.Agent.from_name("support")
for entry in support.memory.list():
    print(entry.name, entry.description, entry.updated_by)

searchasync

agent.memory.search(query, *, limit=None, user=...) -> list[MemoryEntry]

Search what the agent remembers in a scope, the way the agent does: a user's entries and the account's. An entry matches when its name, description or content holds any of the query's words (a word also finds the longer words it starts: refund finds refunds), or its name or description holds the query; the more words, the better.

Parameters
querystrrequired
limitint | None

Return at most this many.

(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
list[MemoryEntry]

The best matches first (10 unless limit says otherwise, at most 100), each with its content and user_id (None for the account's entries).

Usage
support = noclick.Agent.from_name("support")
for entry in support.memory.search("refund policy", user="user_42"):
    print(entry.name, entry.content)

readasync

agent.memory.read(name, *, user=...) -> MemoryEntry

One entry in full; a name with no entry raises noclick.NotFound.

Parameters
namestrrequired
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
MemoryEntry

The entry with its content and the version to pass back when you change it.

Usage
support = noclick.Agent.from_name("support")
refunds = support.memory.read("refunds")
print(refunds.version, refunds.content)

saveasync

agent.memory.save(
    name, content, *, description=None, version=None, user=...
) -> MemoryEntry

Write an entry, creating it if the name is new. description is the line the agent sees every turn (required for a new entry, kept when you leave it out). With version, the save only lands if the entry is still at that version, else noclick.Conflict; without it, it replaces whatever is there.

Parameters
namestrrequired
contentstrrequired
descriptionstr | Nonedefault None
versionint | 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)
Returns
MemoryEntry

The entry as saved, with its new version.

Usage

Seed what every conversation should know:

support = noclick.Agent.from_name("support")
support.memory.save(
    "refunds", "Refund within 30 days of purchase, to the original card.",
    description="Our refund rules",
)

Correct an entry without losing an edit the agent made meanwhile:

support = noclick.Agent.from_name("support")
entry = support.memory.read("refunds")
try:
    support.memory.save("refunds", entry.content + "\nNo refunds on gift cards.", version=entry.version)
except noclick.Conflict:
    print("The agent changed it since; read it again.")

deleteasync

agent.memory.delete(name, *, version=None, user=...) -> None

Forget an entry. With version, only if it is still at that version (else noclick.Conflict). The agent can save the name again later.

Parameters
namestrrequired
versionint | 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)
Usage
support = noclick.Agent.from_name("support")
entry = support.memory.read("old-pricing")
support.memory.delete("old-pricing", version=entry.version)

versionsasync

agent.memory.versions(name, *, user=...) -> list[MemoryEntryVersion]

An entry's versions, newest first: the one it holds now, then those kept from earlier saves (its last 50 in all). A name with no entry raises noclick.NotFound.

Parameters
namestrrequired
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[MemoryEntryVersion]

Each version's number, description, who wrote it and when, without its content.

Usage
support = noclick.Agent.from_name("support")
for v in support.memory.versions("refunds"):
    print(v.version, v.current, v.written_by.type, v.saved_at)

get_versionasync

agent.memory.get_version(name, version, *, user=...) -> MemoryEntryVersion

One version of an entry, with its content; one it no longer keeps raises noclick.NotFound.

Parameters
namestrrequired
versionintrequired
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
MemoryEntryVersion

That version in full.

Usage
first = noclick.Agent.from_name("support").memory.get_version("refunds", 1)
print(first.content)

restoreasync

agent.memory.restore(name, version, *, user=...) -> MemoryEntry

Put an entry back as it was at version: a new version holding that one's content and description, so the one it replaces is kept too.

Parameters
namestrrequired
versionintrequired
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
MemoryEntry

The entry as restored, at its new version.

Usage
support = noclick.Agent.from_name("support")
support.memory.restore("refunds", 1)

entriesasync

agent.memory.entries(*, user=...) -> list[MemoryEntry]

list, as noclick.Memory calls it, so code reads any memory the same way.

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
list[MemoryEntry]

Each entry's name, description and version, by name, without its content.

Usage
for memory in (noclick.Agent.from_name("support").memory, noclick.Memory.from_name("company")):
    print([entry.name for entry in memory.entries()])

forgetasync

agent.memory.forget(name, *, version=None, user=...) -> None

delete, as noclick.Memory calls it, so code changes any memory the same way.

Parameters
namestrrequired
versionint | 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)
Usage
support = noclick.Agent.from_name("support")
support.memory.forget("old-pricing")

MemoryEntry

class MemoryEntry

One named note in an agent's memory. version goes up with every save; pass the one you read back to save or delete so you never overwrite a change the agent made since. content is None in a listing (read loads it). updated_by is agent, api or console.

conversation is set on a conversation's checkpoint: a long conversation keeps its older history folded into one entry, named context. and a hash, which its turns read in place of that history. Read it to see what the agent carries forward; an edit wins over the next summary, and deleting it forgets that history for good. The agent never sees it outside that conversation.

Attributes
namestr
descriptionstr
contentstr | None
versionint
updated_atAny
updated_bystr | None
written_byMemoryWriter
user_idstr | None
conversationstr | None
rawdict[str, Any]

The response JSON exactly as the API sent it.

MemoryEntryVersion

class MemoryEntryVersion

One version of a memory entry, as it was saved. Every save keeps the version it replaces, so an entry keeps its last 50 versions, the one it holds now (current) included; a conversation's checkpoint keeps none. content is None in a listing (get_version loads it), and saved_at is when that version was saved.

Attributes
namestr
versionint
currentbool
descriptionstr
contentstr | None
written_byMemoryWriter
user_idstr | None
saved_atAny
rawdict[str, Any]

The response JSON exactly as the API sent it.

MemoryWriter

class MemoryWriter

Who last wrote a memory entry: an agent's turn (type agent: which agent, and in which of its conversations), a person in the app (console) or a key (api).

Attributes
typestr | None
agent_idstr | None
agent_namestr | None
conversationstr | None

AgentWorkspace

class AgentWorkspace

The files an agent works on: what it writes with its shell or its tools, and what you put there for it. An agent has one /workspace, which every turn sees whoever it answers, and a clear or a resume leaves as it is; an account agent's user has their own. (A noclick.Workspace is something else: a home for channels and their members.)

Attributes
conversationstr | None

The conversation it was named by, if any: accepted and ignored, since an agent has one workspace.

filesasync

workspace.files() -> list[WorkspaceFile]

Every file in the workspace.

Returns
list[WorkspaceFile]

Each file's path (relative to /workspace), size, when it last changed and a download url. An empty list for a conversation whose agent hasn't written anything.

Usage
support = noclick.Agent.from_name("support")
for file in support.workspace().files():
    print(file.path, file.size_bytes, file.url)

readasync

workspace.read(path) -> bytes

Read one file; a missing file raises noclick.NotFound.

Parameters
pathstrrequired
Returns
bytes

The file's bytes, exactly as stored; decode text yourself.

Usage
analyst = noclick.Agent.from_name("analyst")
report = analyst.workspace().read("report.csv")
print(report.decode()[:200])

writeasync

workspace.write(path, data) -> WorkspaceFile

Put a file in the workspace (bytes, or text as UTF-8), replacing one at that path, so the agent finds it on its next turn. At most 100 MB. A coding harness's sandbox stays up between turns and sees the file once it starts again (it stops a few minutes after its last turn), so write there before the conversation's first turn or between its sessions.

Parameters
pathstrrequired
databytes | strrequired
Returns
WorkspaceFile

The file as stored, with its download url.

Usage
analyst = noclick.Agent.from_name("analyst")
workspace = analyst.workspace()
workspace.write("sales.csv", "region,total\nnorth,1200\nsouth,950\n")
reply = analyst.message("Chart sales.csv by region.", conversation="q3-review")

deleteasync

workspace.delete(path) -> None

Delete one file from the workspace; a missing file does nothing.

Parameters
pathstrrequired
Usage
analyst = noclick.Agent.from_name("analyst")
analyst.workspace().delete("draft.csv")

urlasync

workspace.url(path, *, expires_in_s=None) -> str

A link that downloads one file without a key, for your user to click.

Parameters
pathstrrequired
expires_in_sint | Nonedefault None
Returns
str

The link; it works for expires_in_s seconds (an hour by default, a day at most).

Usage
analyst = noclick.Agent.from_name("analyst")
link = analyst.workspace().url("chart.png", expires_in_s=600)
print(link)

WorkspaceFile

class WorkspaceFile

A file in an agent's workspace for one conversation (AgentWorkspace). url downloads it without a key for about an hour.

Attributes
pathstr
size_bytesint
modified_atAny
urlstr | None
rawdict[str, Any]

The response JSON exactly as the API sent it.

AgentSandbox

class AgentSandbox

The machine an agent works on (agent.sandbox()), one whoever it answers: what it is and costs, its files, and your own commands on it, beside the agent's work. While its sandbox runs, its files are read there with every secret it holds taken out; while it's stopped, from what its workspace kept. Files and commands need the account's secret key with the agents:terminal scope (they reach what the sandbox holds).

Attributes
conversationstr | None

The conversation it was named by; none reads it through the agent's session.

getasync

agent_sandbox.get() -> ConversationSandbox

Where it runs, whether it's running and since when, what it reserved and costs.

Usage
coder = noclick.Agent.from_name("coder")
machine = coder.sandbox().get()
print(machine.status, machine.cpu, machine.memory_mb, machine.spent_usd_today)

filesasync

agent_sandbox.files(
    path='/workspace', *, recursive=False, limit=None
) -> list[VolumeEntry]

What's in the folder at path (absolute; its workspace by default), a folder before what's in it, or with recursive=True everything below it (git's objects left out unless listed by their path). A path that doesn't exist raises noclick.NotFound.

Parameters
pathstrdefault '/workspace'
recursivebooldefault False
limitint | None

Return at most this many.

(default None)
Returns
list[VolumeEntry]

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

Usage
coder = noclick.Agent.from_name("coder")
for entry in coder.sandbox().files("/workspace/src"):
    print(entry.path, entry.type, entry.size)

files_pageasync

agent_sandbox.files_page(
    path='/workspace', *, recursive=False, cursor=None, limit=None
) -> SandboxFilesPage

One page of files, and where it was read; pass next_cursor back as cursor.

Parameters
pathstrdefault '/workspace'
recursivebooldefault False
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)
Usage
coder = noclick.Agent.from_name("coder")
page = coder.sandbox().files_page(limit=100)
print(page.source, [entry.path for entry in page.data])

readasync

agent_sandbox.read(path) -> bytes

One file's bytes (up to 16 MB), every secret the sandbox holds taken out; a missing file raises noclick.NotFound.

Parameters
pathstrrequired
Returns
bytes

The file's bytes; decode text yourself.

Usage
coder = noclick.Agent.from_name("coder")
print(coder.sandbox().read("/workspace/README.md").decode())

execasync

agent_sandbox.exec(command, *, timeout_s=None) -> ExecResult

Run a bash command in its running sandbox, in the agent's working directory, beside its work: the agent isn't stopped, and the sandbox stays up while the command runs. A stopped conversation raises noclick.Conflict (its next turn starts its sandbox).

Args: command: Run with bash. timeout_s: Seconds before it's stopped: 60 by default, at most 90.

Parameters
commandstrrequired
timeout_sint | Nonedefault None
Returns
ExecResult

Its stdout, stderr (the last 64 KiB of each) and exit_code.

Usage
coder = noclick.Agent.from_name("coder")
print(coder.sandbox().exec("git status --short").stdout)

shellasync

agent_sandbox.shell() -> SandboxShell

Your own shell (bash -l) on its running sandbox, in the agent's working directory, beside its work: the agent isn't stopped, and the sandbox stays up while you type. A stopped conversation raises noclick.Conflict (its next turn starts its sandbox).

Returns
SandboxShell

A SandboxShell whose url and single-use token your user's browser opens within two minutes.

Usage
coder = noclick.Agent.from_name("coder")
shell = coder.sandbox().shell()
send_to_browser(shell.url, shell.token)

ConversationSandbox

class ConversationSandbox

The machine a conversation's agent works on, as it stands (AgentSandbox.get).

place is sandbox (one of the conversation's own), machine or live (an app's live container); status is running or stopped, since started_at. A coding agent's sandbox starts with a turn and stops a minute after its last; an sdk agent's shell lives only during a turn, so it reads stopped. cpu and memory_mb are what it reserved (None while stopped), usd_per_hour what an hour of it costs, spent_usd_today what its sandbox charged since midnight UTC (None where the conversation has no sandbox of its own), and workspace the folder kept between its runs.

Attributes
agent_idstr
conversationstr
harnessstr
placestr
statusstr
started_atAny
cpufloat | None
memory_mbint | None
regionstr | None
usd_per_hourfloat | None
spent_usd_todayfloat | None
machine_idstr | None
project_idstr | None
workspacestr | None
rawdict[str, Any]

The response JSON exactly as the API sent it.

SandboxFilesPage

class SandboxFilesPage(Page)

One page of a sandbox's folder (AgentSandbox.files_page): data holds VolumeEntrys, next_cursor is None on the last page, and source says where it was read: the running sandbox, or what its workspace kept.

Attributes
sourcestr

SandboxShell

class SandboxShell

A shell on a conversation's sandbox (AgentSandbox.shell): hand url and the single-use token to your user's browser, which opens it within two minutes as a take-over's terminal is opened (the websocket's first message is {"type": "auth", "token": ..., "cols": ..., "rows": ...}; the TypeScript SDK's SandboxShell.connect). It closes as bash exits, after idle_limit_s with nothing typed, or when the websocket closes.

Attributes
agent_idstr
conversationstr
urlstr
tokenstr
token_expires_atAny
idle_limit_sint | None
rawdict[str, Any]

The response JSON exactly as the API sent it.

CodingAgents

class CodingAgents

Every coding agent (Agent.coding()): agents, then counts by harness, model, state and place, by_state, paused_by_reason, and unread: what couldn't be read (an app's container, the sandbox registry), whose runs are unknown, never shown down.

Attributes
agentslist[CodingAgent]
countslist[CodingCount]
by_statedict[str, int]
paused_by_reasondict[str, int]
read_atAny
unreadlist[str]
rawdict[str, Any]

The response JSON exactly as the API sent it.

CodingAgent

class CodingAgent

One coding agent, as Agent.coding() reads it: its state, its place, whose model credential it thinks with, its current job and the conversations up now (runs).

Attributes
agent_idstr
namestr
user_idstr | None
appCodingApp | None
harnessstr
modelstr | None
credentialCodingCredential
placestr
statestr
pausedCodingPause | None
pauseslist[CodingPause]
jobCodingJob | None
runslist[CodingRun]
spent_usd_this_monthfloat
model_usage_this_monthModelUsage
rawdict[str, Any]

The response JSON exactly as the API sent it.

CodingApp

class CodingApp

The app a coding agent codes: name (what code finds it by), title (as a person reads it), and coder for the app's own coding agent.

Attributes
project_idstr
namestr | None
titlestr | None
coderbool

CodingCount

class CodingCount

How many coding agents run on one harness and model, in one state and place.

Attributes
harnessstr
modelstr | None
statestr
placestr
countint

CodingCredential

class CodingCredential

Whose model credential a coding agent thinks with: kind is key, a person's plan, NoClick's own (noclick), or pending until it's connected.

Attributes
kindstr
connectionstr | None
credential_typestr | None
connectedbool | None

CodingJob

class CodingJob

A coding agent's turn in flight (or a lost one): title as whoever handed it over named it, text the start of what it was asked.

Attributes
operation_idstr
conversationstr | None
statusstr
stepstr | None
sinceAny
titlestr | None
textstr
lostbool
rawdict[str, Any]

The response JSON exactly as the API sent it.

CodingPause

class CodingPause

Why a coding agent isn't doing anything: reason (expired, disconnected, spending_paused, spend_cap, out_of_funds, budget, failed_start, paused) and its message.

Attributes
reasonstr
messagestr

CodingRun

class CodingRun

A coding agent's conversation with a place up now; a sandbox's cpu and memory_mb are what it reserved, an app's live container's daemon whether its harness runs there now.

Attributes
conversationstr | None
placestr
sinceAny
busybool
project_idstr | None
daemonbool | None
cpufloat | None
memory_mbint | None

AgentEvent

class AgentEvent

One moment of a streamed turn or a watched conversation. type is text (text is the next piece of the reply), tool_call (tool, its wire name like gmail__send_email_message, and its arguments; held when policy holds it for a person), tool_result (tool, its result: the start of what it returned, up to 500 characters, or its error; and whether it is_error), file (a file the message carried, role user, or the turn made, assistant), reasoning (text is one short line of what the model is thinking, the title of a section of its reasoning, sent as it completes), status (compacting while a long conversation's older history is summarized, then compacted), approval (its "noclick" tools held a purchase or a deletion for the account's owner: the approval), operation (they started a long action: the operation, which comes again with its progress each time the work reports some and once more when it ends) or done (reply is the whole AgentReply, as message returns it). agent.watch() also yields message (a whole message: its role, text, files, via or trigger and, a reply, its tool_calls and reasoning; a note, its data), status (the conversation's new status) and turn_end once a turn of the conversation ends, however it started and whether or not it saved a reply (its status: succeeded, failed, canceled or expired; text, its reply's words, empty when it said nothing). operation_id names the turn an event belongs to (None for a message no turn sent, like a person's reply). history() reads messages in the same shape. The type call is reserved for a phone call's moments. A coding harness's turn (Codex, Claude Code and the like) also tells what its commands print as they run, output (text, its command's call_id, and whole when it replaces what came before of that command), and each file it changes, diff (path, change and the diff). Its own steps' tool_call and tool_result say source harness, name their call_id and say what kind of step it is (step_kind), a tool_call what it's about (command, path or query), a command's result its exit_code and duration_ms: the fields a finished turn's AgentStep keeps. A status of events_dropped says count moments its sandbox couldn't send. On a machine, a turn waiting for its harness's image says downloading while it downloads (text, like "Downloading OpenCode for this machine: 450 MB of 1.31 GB", with downloaded_bytes and total_bytes in raw), then downloaded.

Attributes
typestr
textstr | None
toolstr | None
argumentsdict[str, Any] | None
resultAny
is_errorbool
replyAgentReply | None
rolestr | None

A message's sender: user, assistant, person (someone it was handed off to) or note (a line added with agent.note).

helddict[str, Any] | None

A held tool_call: who approver is and, when the request is addressed to the scope you read as, the approval's request_id and its page url.

statusstr | None

A status event's: the conversation's new status (active, awaiting_human or handed_off), or a turn's own (compacting, then compacted; on a machine, downloading, then downloaded). A turn_end's: how the turn ended (succeeded, failed, canceled or expired).

operation_idstr | None
rawdict[str, Any]

The response JSON exactly as the API sent it.

fileAttachment | None

A file event's file.

fileslist[Attachment]

A message event's files.

tool_callslist[dict[str, Any]]

A message event's tool calls (a reply's): each {tool, arguments, result, is_error}, as its turn's tool_call and tool_result events showed it.

approvaldict[str, Any] | None

An approval event's: its id, summary, exact price (a purchase), expires_at and sent_to, the apps NoClick sent the account's owner its link on (never the link).

operationdict[str, Any] | None

An operation event's: the long action's id (an Operation's), kind, status and summary and, once the work reported some, its progress (Operation.progress, with its last 3 lines).

viastr | None

A user message's way in, when not the API: whatsapp, imessage, call or email.

datadict[str, Any] | None

A note message's data.

triggerdict[str, Any] | None

A user message no person sent: what started its turn (Message.trigger).

reasoninglist[dict[str, Any]]

A message event's reasoning (a reply's): each {text, created_at} (Message.reasoning).

call_idstr | None

A coding harness's step: the tool_call, the output of its command, its tool_result and the diff of each file it changed share it.

sourcestr | None

harness for a step a coding harness took itself (its own shell, its edits), not a tool NoClick gave it.

exit_codeint | None

A harness command's tool_result: its exit code (None when it never exited) and how long it ran.

duration_msint | None
wholebool

An output that replaces what streamed of its command so far, rather than continuing it.

pathstr | None

A diff's file (or the file, a page's URL, a harness step's tool_call edits or reads), what happened to it (add, update or delete) and the change: a unified diff, or a new file's whole content.

changestr | None
diffstr | None
countint | None

A status events_dropped's: how many moments its sandbox couldn't send.

step_kindstr | None

A harness step's tool_call and tool_result: command, edit, read, search or tool (AgentStep.kind).

requestdict[str, Any] | None

A request event's: what a coding harness asks a person (an approval or a question), as it waits and as it ends, the shape Agent.requests lists (answer it with Agent.answer).

commandstr | None

A harness command's tool_call: the command it runs; a harness search's: what it looks for.

querystr | None
message_idstr | None

A message's id in its thread (Message.id).

authordict[str, Any] | None

Who sent a user message (Message.author).

notificationbool

A message an agent sent its owner from another of its conversations (Message.notification).

spacedict[str, Any] | None

A notification's space, when it passes on a space's news (Message.space).

subagentdict[str, str] | None

The coding harness's subagent a user message was written for (Message.subagent).

chatstr | None

The chat a message of the agent's session came from, where it isn't the session's own (Message.chat).

Rehearsal

class Rehearsal

A test run: a real turn of the agent (its model, instructions and tools) where a simulated world answers every tool call, so nothing is sent and no account is touched. tool_calls are the calls it made, each with the tool (its tool name, like gmail__search_emails), its arguments and the result the world answered (None if the world couldn't); transcript is the turn step by step: role assistant steps (its text between calls, then the reply) and tool steps. On a coding harness, its own shell and file steps are tool steps with source harness: they ran for real, in the run's own sandbox. cost_usd is what the run cost you.

Attributes
replystr
tool_callslist[dict[str, Any]]
transcriptlist[dict[str, Any]]
scenariostr | None
cost_usdfloat | None
operation_idstr | None
rawdict[str, Any]

The response JSON exactly as the API sent it.

Wakeup

class 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). At its moment the conversation takes a turn whose message is the note, followed by what woke it. A turn already running in that conversation goes first: the wake-up waits behind it, one turn at a time. It survives restarts, starts its turn once, and is billed and capped like any turn. A recurring one (every) stays pending after each turn, due at its schedule's next time; times it missed fold into one turn. NoClick sets its own too: for a child's update, the link the agent asked its user to connect an account with being done, and a decided approval of a held call. Your webhooks hear each one delivered or failed (agent.wakeup.delivered, agent.wakeup.failed), and each time a recurring one missed because your account couldn't pay (agent.wakeup.missed).

Attributes
idstr
agent_idstr
user_idstr | None

Whose conversation it wakes (None: the account's).

conversationstr

The conversation that takes the turn.

notestr

What the agent is told when it wakes.

atAny

When it's due (a time wake-up), or when what it waited for happened.

whendict[str, Any] | None

What it waits for besides a time: {operation_id} or {event, filters} (None for a time).

everyCron | None

Its schedule, for a recurring wake-up (None for one that comes once); at is its next time.

firedint

How many turns it has started (a recurring one counts up).

sourcestr

What set it: code (agent.wake), wake_me (the agent's own tool), update (a job's update for this agent as its parent), answer (the link it asked its user to connect an account with is done: connected or expired), approval (a held call was decided), notice (news for the account's own assistant) or continue (a turn its step limit ended, carried on by itself: turn_limits).

statusstr

pending, delivered (its turn started), canceled or failed; a recurring one stays pending until it's canceled.

woken_bydict[str, Any] | None

What woke it: {at} for a time (once delivered), {operation_id, kind, status, result} (or error) once its operation settled, {update} for a job's update, and {event} (the event as Event.list reads it) for an event; None until then.

operation_idstr | None

The turn it started (an agent.message operation).

depthint

How many wake_me wake-ups in a row led to this one, with nothing else in between (0 for any other).

errordict[str, Any] | None

Why it failed: {type, message} (the account couldn't pay, say).

misseddict[str, Any] | None

A recurring one's last missed time: {at, reason}, reason being credits, spend_cap (the account's monthly cap) or budget (the agent's, its key's or its user's); None if it never missed.

created_atAny
delivered_atAny

When its turn started (None until then).

operationOperation | None

The turn it started, as an Operation (None until it's delivered).

cancelasync

wakeup.cancel() -> Wakeup

Call it off before it's due. A wake-up that already started its turn, or was canceled or failed, raises noclick.Conflict.

Returns
Wakeup

This wake-up, canceled.

Usage
digest = noclick.Agent.from_name("digest")
for wakeup in digest.wakeups("weekly-report", status="pending"):
    wakeup.cancel()

updateasync

wakeup.update(*, note=None, at=None, after=None, every=None) -> Wakeup

Change a pending wake-up: its note, and its time with one of at, after and every (a Cron; a one-off time makes a recurring one come once more). A delivery under way of what it said before starts no turn. One waiting on an operation or an event keeps that; one already delivered, canceled or failed raises noclick.Conflict.

Parameters
notestr | Nonedefault None
atAnydefault None
afterAnydefault None
everyAnydefault None
Returns
Wakeup

This wake-up, as it is now.

Usage
digest = noclick.Agent.from_name("digest")
[weekly] = digest.wakeups("weekly-report", status="pending")
weekly.update(every=noclick.Cron("0 8 * * 1", tz="Europe/London"))

Job

class Job(Operation)

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. It's an Operation: wait() returns the AgentReply.

A task runs while the child works on it, across as many turns as it takes, and finishes when its conversation goes quiet with nothing left to continue it: no turn running, no wake-up pending, nothing waiting on a person. While it runs, step is working (a turn is running) or waiting (only a wake-up is pending); it's awaiting_human (step blocked) while it waits on a person: a held call, or a connection it asked its user for. It succeeded once the child stopped, its last reply the result (a child that needs a decision says so and stops; the parent's message to it starts a new job in the same conversation), failed when a turn failed, canceled when canceled (its running turn stops and its pending wake-ups are called off), and expired when the child's ttl_s ran out first.

Attributes
started_bystr | None

The agent whose job it is: a task's parent, whether your code spawned it or the parent did.

conversationstr | None

The conversation the worker does it in.

parent_conversationstr | None

The parent's conversation its updates wake (None: they wake nobody).

required_updateslist[Any]

The updates its parent required, as on the wire: done, blocked, {before}, {every_s}.

latest_updateJobUpdate | None

Its newest update (None before the first).

agentAgent

The agent doing the work, lazy.

listclassmethodasync

noclick.Job.list(*, limit=None, **filters) -> list[Job]

Spawned children's tasks across your agents (kind agent.task), newest first. Takes Operation.list's filters except kind (agent= keeps the ones one agent does). agent.jobs() reads the ones one agent started, its message jobs (kind agent.message) too.

Parameters
limitint | None

Return at most this many.

(default None)
**filtersAny
Returns
list[Job]

Every matching job (or the first limit), each with its status, step and latest_update.

Usage
for job in noclick.Job.list(status="awaiting_human", user_filter=noclick.ALL_USERS):
    print(job.agent_id, job.started_by, job.latest_update)

list_pageclassmethodasync

noclick.Job.list_page(*, cursor=None, limit=None, **filters) -> Page

One page of jobs; 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)
**filtersAny
Returns
Page

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

Usage
page = noclick.Job.list_page(status="failed", limit=50)
for job in page.data:
    print(job.agent_id, job.error)

summaryclassmethodasync

noclick.Job.summary(**filters) -> OperationSummary

How many jobs match, by status; takes Operation.summary's filters except kind.

Parameters
**filtersAny
Returns
OperationSummary

The number that match in total, and per operation status in by_status.

Usage
counts = noclick.Job.summary(status="live")
print(counts.total, counts.by_status["awaiting_human"])

updatesasync

job.updates() -> list[JobUpdate]

Every update it has sent its parent, oldest first.

Returns
list[JobUpdate]

Each JobUpdate with its kind, the child's text and, by kind, the call it was about to make, what it waits on, or the result.

Usage
planner = noclick.Agent.from_name("planner")
for job in planner.jobs(kind="task"):
    for update in job.updates():
        print(update.created_at, update.kind, update.text)

JobUpdate

class JobUpdate

One update a job sent its parent. kind is done (the job finished, any outcome: result or error), blocked (it started waiting on a person: waiting_on), before (it's about to make the call in tool with arguments), every (it was due one) or message (the child's own tell_parent). text is what the child wrote (for blocked, NoClick's line saying what it waits on); status is the job's status then, and wakeup_id the parent's wake-up it set (None when nothing was there to wake).

Attributes
idstr
job_idstr
agent_idstr
kindstr
textstr | None
toolstr | None
argumentsdict[str, Any] | None
statusstr | None
resultAny
errordict[str, Any] | None
waiting_ondict[str, Any] | None

A blocked update's wait: {kind, url, operation_id}, kind being connection (a link it asked its user to connect an account with: url), approval (a held call; never a url, so no agent approves its child's call), person (a question it asked someone) or sign_in (a step its browser needs a person for).

wakeup_idstr | None
created_atAny
rawdict[str, Any]

The response JSON exactly as the API sent it.

Before

noclick.Before(*tools)

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"). When the child calls a matching tool, NoClick sends the parent an update holding the call and what the child wrote before it (its reason), then the call runs: the parent hears first but doesn't hold it (a call that must wait for a yes is a policy require_approval rule). A coding harness's own shell commands and file edits aren't tool calls NoClick sees, so Before can't match them, and its words reach NoClick only when its turn ends, so the update carries the call without a reason.

Parameters
*toolsstr
Usage
support = noclick.Agent.from_name("support")
refunder = support.spawn(
    "Refund order 1841 if it's within our 30 days, then email the customer.",
    tools=["stripe.create_refund", "gmail.send_email_message"],
    updates=[noclick.Before("stripe.create_refund")],
    conversation="ticket-1841",
)
Attributes
toolslist[str]

The tool patterns it covers.

tools

Every

noclick.Every(interval)

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. When that long has passed since the child's last update, NoClick asks it for one (a coding harness by steering its running turn, an sdk agent before its next model call), and the tell_parent it answers with is the every update. A child that's only waiting (for a wake-up, for a person) isn't asked.

Parameters
intervalint | float | timedeltarequired
Usage
planner = noclick.Agent.from_name("planner")
migrator = planner.spawn(
    "Move every customer from the old CRM to the new one, in batches of 200.",
    tools=["hubspot", "salesforce"],
    updates=[noclick.Every(1800)],
    conversation="crm-move",
)
Attributes
interval_sint

How often, at most, the parent hears while the child works.

interval_s

Agents

noclick.Agents()

The agents capability, for an agent's tools: the same as the string "agents", narrowed with Agents.only(...). It gives a coordinator six tools, within its own scope, in its own conversations (in a channel, agents work by mentions instead): spawn (a child of its own, whose updates wake it in the conversation it spawned from), message (any agent it can reach: a user's agent reaches that user's and the account's, an account agent the account's; it waits up to 50 seconds for the reply, and a reply that takes longer, or one it doesn't wait for, is a job whose done update wakes it), ask (as agent.ask), status (an agent's or a job's), list (as Agent.list filters) and cancel (a job it started). Its work runs in the threads of the user it's acting for, and its children get the capability only when it lists it for them. Policy names them agents.spawn ... agents.cancel (agents.*); the model sees agents__spawn, agents__message and so on, and its tools count toward an agent's 64.

Usage
coordinator = noclick.Agent.from_name(
    "coordinator", create_if_missing=True,
    instructions="You run our launches. Spawn a researcher for each competitor, then write the plan.",
    tools=["search", noclick.Agents()],
)
Attributes
toolslist[str]

The capability's tools this gives.

tools

onlyclassmethod

noclick.Agents.only(*tools) -> Agents

Some of the capability's tools: spawn, message, ask, status, list and cancel.

Parameters
*toolsstr
Returns
Agents

The capability narrowed to those tools, for tools= (on the wire, "agents.spawn", ...).

Usage

A supervisor that watches and asks but never starts work:

supervisor = noclick.Agent.from_name(
    "supervisor", create_if_missing=True,
    instructions="You check on our agents every morning and report anything stuck.",
    tools=[noclick.Agents.only("list", "status", "ask")],
)

Platform

noclick.Platform()

NoClick itself, for an agent's tools: the same as the string "noclick", narrowed with Platform.only(...). It gives the agent what a connected app gets on NoClick's MCP server: search and fetch (NoClick's guides and your account's objects), api_describe and api_call (any API operation), and quote, buy and delete. They act as the turn's key and the user it acts for, never more than that key may, judged by the same gate as any connected app: a purchase or a deletion waits for the account's owner, who approves it on NoClick with its exact price or what goes with it (the turn waits on them, and the call's outcome is the conversation's next turn); a secret's value never comes from the conversation; and a turn answering someone outside the agent's scope (an email, a caller) asks a person before acting outside the account. A long action it starts is an operation, which wake_me waits on. Policy names them noclick.search ... noclick.delete; the model sees noclick__search and so on, and they count toward an agent's 64 tools. Watchers see an approval and an operation event for them (agent.stream, agent.watch).

Usage
ops = noclick.Agent.from_name(
    "ops", create_if_missing=True, tools=[noclick.Platform()],
    instructions="You run our NoClick account: numbers, domains and agents.",
)
ops.message("Get us a phone number in the 415 area code.")  # buys once you approve
Attributes
nameslist[str]

What it's narrowed to: capability groups and API areas (empty: all of NoClick).

names

onlyclassmethod

noclick.Platform.only(*names) -> Platform

Part of NoClick: capability groups (read, build, deploy, spend, delete) bound what kind of call it makes, and API areas (a key's scopes, like domains, phone or agents) which part of the API it reaches; each narrows only its own kind. Without spend it isn't offered quote and buy, without delete not delete. Names are checked when the agent is saved.

Parameters
*namesstr
Returns
Platform

NoClick narrowed to those names, for tools= (on the wire, "noclick.read", ...).

Usage

An agent that keeps your domains, and buys new ones once you approve:

registrar = noclick.Agent.from_name(
    "registrar", create_if_missing=True,
    instructions="You look after our domains and their DNS.",
    tools=[noclick.Platform.only("domains")],
)

One that only reads, to answer questions about the account:

analyst = noclick.Agent.from_name(
    "analyst", create_if_missing=True, instructions="You explain our usage and spend.",
    tools=[noclick.Platform.only("read")],
)

Attachment

class Attachment

A file on a message, kept as an account file at url. kind is image, audio, video or file; a voice clip has its duration_ms and its waveform's peaks (loudness from 0 to 1). Audio is kept as transcription reads it (a browser's WebM recording as MP3). A file an agent's conversation shows (in history, or a file event) has its name, url and mime_type, and no id: it was sent. The account's files (noclick.attachments()) have their id, to send again.

Attributes
namestr
urlstr
mime_typestr
idstr | None
size_bytesint | None
kindstr
voicebool
duration_msint | None
peakslist[float] | None
rawdict[str, Any]

The response JSON exactly as the API sent it.

Terminal

class 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. While it's taken over the agent's messages wait; it hands itself back after idle_limit_s with nobody typing, detached_limit_s with no terminal open, or at ends_at (its sandbox's time limit).

Attributes
agent_idstr
conversationstr
harnessstr

claude_code or codex.

statestr

agent, taking_over, person or handing_back.

waiting_for_turnbool

Taken over once the agent's turn in flight ends.

sinceAny

When it was taken over.

ends_atAny

When it hands itself back at the latest: its sandbox's limit.

idle_limit_sint | None

It hands itself back after this long with nobody typing.

detached_limit_sint | None

It hands itself back after this long with no terminal open.

ended_becausestr | None

Why the last take-over ended: handed_back, canceled, idle, detached, exited (the terminal's program exited), deadline or failed.

urlstr | None

The terminal's websocket (from take_over only).

tokenstr | None

Opens url once, within two minutes (from take_over only): its first message's token.

token_expires_atAny

hand_backasync

terminal.hand_back() -> Terminal

Give the conversation back to the agent: the terminal closes, what was said in it joins the conversation's history (via: "terminal"), and the messages that waited reach the agent.

Returns
Terminal

This terminal, as it is now (agent, or handing_back while its program exits).

Usage
coder = noclick.Agent.from_name("coder")
coder.terminal("main").hand_back()

attachments

noclick.attachments(*, query=None, limit=30, client=None) -> list[Attachment]

The account's files, newest first: what its messages carried, the images and videos it made, its calls' recordings. A message to an agent sends any of them again in its files. The account's alone: read as a user, it's refused.

Args: query: Keeps the files whose names contain it (any case). limit: How many, 1 to 100.

Parameters
querystr | Nonedefault None
limitint

Return at most this many.

(default 30)
clientClient | None

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

(default None)
Returns
list[Attachment]

Each file as an Attachment with its id, name, url, mime_type and kind.

Usage
[report] = noclick.attachments(query="q3")
analyst.message("What changed since this?", files=[report])