Agent
Agents: hosted agents you message by name.
class AgentA 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.
- Like every live object, it also has hydrate(), refresh() and raw.
| id | str | |
| origin | str | None |
|
| name | str | |
| model | str | None | The model it runs, as its harness names it ( |
| harness | str | None | What runs it: |
| model_connection | str | None | The connection whose key or plan it thinks with, by name ( |
| instructions | str | None | |
| tools | list[Any] | What it can use, as listed: refs, |
| tool_rules | dict[str, str] | What it may do with each app it reaches, |
| can_request | list[str] | What it may ask its user to connect at run time. |
| user_id | str | None | |
| workflow_id | str | None | |
| node_id | str | None | An app agent's step in its workflow (None for an API agent). |
| workflow_name | str | None | An app agent's workflow, by name. |
| access | str | None | An app agent's workflow as you hold it: |
| enabled | bool | None | Whether an app agent is switched on; a disabled one takes no messages. |
| app_url | str | None | Where an app agent is changed: its workflow in the NoClick app. |
| parent_id | str | None | |
| ttl_s | int | None | Its time to live, in seconds (None if it isn't temporary); |
| expires_at | Any | When a temporary agent's |
| budget_usd_per_month | float | None | |
| region | str | None | The region its sandboxes run in ( |
| machine_id | str | None | The |
| created_at | Any | |
| browser_profile_id | str | None | The browser profile its |
| card_id | str | None | The |
| volumes | dict[str, str] | None | The volumes its shell mounts, by mount path: |
| memory_id | str | None | Its own memory ( |
| skills | list[dict[str, Any]] | None | Its skills: each |
| memories | list[dict[str, Any]] | None | The memories it reads besides its own, in order: each |
| secret_ids | list[str] | None | The secrets in its shell's environment, in order (a later one's key wins). |
| timezone | str | None | The IANA timezone each turn is told the date and time in ( |
| repos | list[dict[str, Any]] | None | Repositories cloned into its workspace at a conversation's first turn: a |
| setup | list[str] | Commands its sandbox (its container, on a machine) runs as it starts (a coding harness only). |
| docker | bool | Whether Docker runs in its sandbox, a VM of |
| sandbox_size | str | None | The VM a Docker agent works in: |
| app_testing | str | How a coding agent may turn app testing on (Docker in its sandbox for a task that needs it): |
| app_testing_usd_per_hour | float | None | What an hour of app testing costs where its sandbox runs; None without a sandbox of its own (an |
| moved_from | dict[str, Any] | None | Where a move from a laptop made it ( |
| network | Any | What its shell and code reach: |
| shell | bool | None | Whether it has a shell, the |
| turn_limits | dict[str, Any] | None | How far one of its turns goes, as set: |
| effort | str | None | Its conversations' reasoning effort ( |
| speed | str | None |
|
| permission_mode | str | None | Its conversations' permission mode unless one sets its own. |
| status | str | None |
|
| last_active_at | Any | When one of its turns last started or ended ( |
| running_turns | int | None | How many of its turns are queued, running or waiting on a person, any conversation (hidden like |
| child_count | int | None | How many live (not expired) children it has; |
| job_id | str | None | The task it was spawned with, an |
| used_by | list[dict[str, Any]] | The apps that bind it: |
| paused | bool | Whether |
| helper | bool | 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. |
| noclick | bool | 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 |
| former_names | list[str] | The names it went by before it was renamed, the latest first. Each still reaches it ( |
| job | Job | None | The task it was spawned with, as a |
| trigger_kinds | list[str] | Its triggers' kinds ( |
| console_url | str | None | This agent in the developer console (None off the hosted API). |
| a2a_url | str | The A2A JSON-RPC endpoint ( |
| memory | AgentMemory | What it remembers across conversations: |
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
) -> AgentCreate 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/, 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.
NoneNoneNoneNoneNoneNoneNoneNoneNoneNoneNoneNoneNoneNoneNoneNoneNoneNoneNoneNoneNoneNoneNoneNoneNoneNoneNoneNoneFalseWho the call acts for. Defaults to the user set by noclick.as_user (none: the account itself).
The client to send with; defaults to the module client built from NOCLICK_API_KEY.
None)The new agent, loaded.
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 keyMake 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
) -> AgentA 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).
FalseNoneNoneNoneNoneNoneNoneNoneNoneNoneNoneNoneNoneNoneNoneNoneNoneNoneNoneNoneNoneNoneWho the call acts for. Defaults to the user set by noclick.as_user (none: the account itself).
The client to send with; defaults to the module client built from NOCLICK_API_KEY.
None)An agent that loads (or is created, or has your fields set) the first time it's used. Nothing is sent yet.
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 noneSet 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=...) -> AgentA lazy reference to an agent by NoClick id.
The client to send with; defaults to the module client built from NOCLICK_API_KEY.
None)Who the call acts for. Defaults to the user set by noclick.as_user (none: the account itself).
An agent that loads the first time it's used. Nothing is sent yet.
agent = noclick.Agent.from_id("7b1e4f2a-3c9d-4e8b-a5f6-0d2c8e9b1a47")
reply = agent.message("Hi")getclassmethodasync
noclick.Agent.get(agent_id, *, user=..., client=None) -> AgentLoad an agent by NoClick id now; an unknown id raises noclick.NotFound.
Who the call acts for. Defaults to the user set by noclick.as_user (none: the account itself).
The client to send with; defaults to the module client built from NOCLICK_API_KEY.
None)The agent, loaded.
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.
NoneNoneNoneNoneNoneNoneNoneNoneReturn at most this many.
None)Which users a read covers: noclick.ALL_USERS, noclick.NO_USER, a User, or your id for one. It filters without acting as that user.
None)Who the call acts for. Defaults to the user set by noclick.as_user (none: the account itself).
The client to send with; defaults to the module client built from NOCLICK_API_KEY.
None)Every matching agent, newest first (or most recently active first), fetched page by page.
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'sWhat'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
) -> PageOne page of agents; pass next_cursor back as cursor. Takes list's
filters and order.
The next_cursor of the page before; omit it for the first page.
None)Return at most this many.
None)NoneNoneNoneNoneNoneNoneNoneNoneWhich users a read covers: noclick.ALL_USERS, noclick.NO_USER, a User, or your id for one. It filters without acting as that user.
None)Who the call acts for. Defaults to the user set by noclick.as_user (none: the account itself).
The client to send with; defaults to the module client built from NOCLICK_API_KEY.
None)A page whose data holds the agents and whose next_cursor is None on the last page.
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) -> CodingAgentsEvery 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.
Which users a read covers: noclick.ALL_USERS, noclick.NO_USER, a User, or your id for one. It filters without acting as that user.
None)Who the call acts for. Defaults to the user set by noclick.as_user (none: the account itself).
The client to send with; defaults to the module client built from NOCLICK_API_KEY.
None)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.
NoneWhich users a read covers: noclick.ALL_USERS, noclick.NO_USER, a User, or your id for one. It filters without acting as that user.
None)Who the call acts for. Defaults to the user set by noclick.as_user (none: the account itself).
The client to send with; defaults to the module client built from NOCLICK_API_KEY.
None)An AgentStateRow per agent.
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.
The client to send with; defaults to the module client built from NOCLICK_API_KEY.
None)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.
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) -> HarnessInfoOne of harnesses() by the name harness= takes; an unknown name raises
noclick.NotFound, naming the ones there are.
The client to send with; defaults to the module client built from NOCLICK_API_KEY.
None)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.
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) -> AttachmentStore 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.
NoneNoneFalseNoneThe 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.
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
) -> OperationStart 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.
NoneNone()Who the call acts for. Defaults to the user set by noclick.as_user (none: the account itself).
NoneNoneThe turn's operation, started. Keep its id to pick the reply up later, from anywhere.
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=...) -> AgentCommandsWhat the conversation's harness offers a person to run. Send one with send(command=...).
Who the call acts for. Defaults to the user set by noclick.as_user (none: the account itself).
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).
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=...) -> ConversationSettingsSet 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.
Who the call acts for. Defaults to the user set by noclick.as_user (none: the account itself).
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.
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.
NoneWho the call acts for. Defaults to the user set by noclick.as_user (none: the account itself).
Each HarnessRequest: an approval (what it would do) or a question, and where it stands.
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=...
) -> HarnessRequestAnswer 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.
NoneNoneWho the call acts for. Defaults to the user set by noclick.as_user (none: the account itself).
The request as it stands now (answered; a cancel stops the turn, which ends it canceled).
[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=...
) -> AgentReplySend 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.
None()NoneWho the call acts for. Defaults to the user set by noclick.as_user (none: the account itself).
The reply: its text, the conversation it belongs to and the tool_calls the turn made.
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).
Return at most this many.
None)NoneWho the call acts for. Defaults to the user set by noclick.as_user (none: the account itself).
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.
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=...) -> PageA page of history, to read a long thread back. The limit newest messages
(1-200), just before before, oldest first.
Return at most this many.
None)NoneWho the call acts for. Defaults to the user set by noclick.as_user (none: the account itself).
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).
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=...) -> boolAdd 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.
NoneNoneWho the call acts for. Defaults to the user set by noclick.as_user (none: the account itself).
True when it was added, False when a note with key already was.
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.
NoneThe text of each question withdrawn.
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=...) -> AgentConversationOne 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.
Who the call acts for. Defaults to the user set by noclick.as_user (none: the account itself).
chat = noclick.Agent.from_name("coder").conversation("main")
chat.update(effort="high")start_conversationasync
agent.start_conversation(*, conversation=None, title=None, user=...) -> ConversationStart 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.
NoneNoneWho the call acts for. Defaults to the user set by noclick.as_user (none: the account itself).
The new Conversation, active.
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 sessionclearasync
agent.clear(*, title=None, user=...) -> ConversationStart 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.
NoneWho the call acts for. Defaults to the user set by noclick.as_user (none: the account itself).
The new Conversation, active.
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 | NoneThe 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).
Who the call acts for. Defaults to the user set by noclick.as_user (none: the account itself).
Its Conversation (active), or None before the agent has one.
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.
Return at most this many.
None)Which users a read covers: noclick.ALL_USERS, noclick.NO_USER, a User, or your id for one. It filters without acting as that user.
None)Who the call acts for. Defaults to the user set by noclick.as_user (none: the account itself).
NoneEvery matching conversation (or the first limit), fetched page by page. cost_usd
is None for a thread with no recorded turns.
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=...) -> PageOne page of its conversations; pass next_cursor back as cursor.
The next_cursor of the page before; omit it for the first page.
None)Return at most this many.
None)Which users a read covers: noclick.ALL_USERS, noclick.NO_USER, a User, or your id for one. It filters without acting as that user.
None)Who the call acts for. Defaults to the user set by noclick.as_user (none: the account itself).
A page whose data holds the conversations and whose next_cursor is None on the last page.
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=...) -> NoneGive 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.
Who the call acts for. Defaults to the user set by noclick.as_user (none: the account itself).
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=...
) -> TerminalTake 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.
FalseNoneNoneWho the call acts for. Defaults to the user set by noclick.as_user (none: the account itself).
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=...) -> TerminalWhere 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.
Who the call acts for. Defaults to the user set by noclick.as_user (none: the account itself).
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=...
) -> AgentMake 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.
NoneNoneNoneNoneNoneNoneNoneNoneNoneNoneWho the call acts for. Defaults to the user set by noclick.as_user (none: the account itself).
The child, loaded, with parent_id set to this agent and job its running task.
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) # runningFrom 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.
NoneReturn at most this many.
None)Each child with its status, last_active_at, running_turns and, if spawn
made it, the job it was started with.
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.
NoneNoneNoneNoneReturn at most this many.
None)Every matching job (or the first limit), newest first, each with its status, step and
latest_update; wait() on one gives its reply.
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=...
) -> AgentReplyAsk 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.
NoneFalseNoneWho the call acts for. Defaults to the user set by noclick.as_user (none: the account itself).
The answer as an AgentReply; with interject, the reply the turn it joined ended with.
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).
The card as a dict: the agent's name, its JSON-RPC url and the skills it offers.
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=...
) -> AgentChange 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.
This agent, updated. A field you leave out is unchanged, and changes apply from its next turn.
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 modelTell 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.
Each grant with the connection it names, its integration, its status and the
operations it covers (None: every one).
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 Nonetool_accessasync
agent.tool_access() -> AgentToolAccessWhat it may do with each app it reaches, app by app.
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.
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) -> NoneTake back a grant (an AgentGrant or its id): its tools leave the
agent; the connection stays the user's.
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() -> TrashItemDelete 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.
noclick.Agent.from_name("support").delete()wakeasync
agent.wake(
conversation, *, note, at=None, after=None, when=None, filters=None, every=None,
user=...
) -> WakeupHave 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).
NoneNoneNoneNoneNoneWho the call acts for. Defaults to the user set by noclick.as_user (none: the account itself).
The wake-up, pending; update() changes it, cancel() calls it off.
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.
NoneNoneReturn at most this many.
None)Who the call acts for. Defaults to the user set by noclick.as_user (none: the account itself).
Which users a read covers: noclick.ALL_USERS, noclick.NO_USER, a User, or your id for one. It filters without acting as that user.
None)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.
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.
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.
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) -> AgentTriggerAdd 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.)
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.
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
) -> AgentTriggerChange 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.
NoneNoneThe trigger as it is now, with its new next_run_at.
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) -> AgentTriggerPause 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.
The trigger as it is now (paused is True).
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) -> AgentTriggerResume 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.
The trigger as it is now (state is live unless the agent is paused).
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) -> NoneRemove 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.
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().
A list of AgentToolServer, in its automation's order.
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
) -> AgentToolServerGive 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.
None'http'NoneNoneThe AgentToolServer as added: its id (what remove_tool_server takes), name, url,
whether it's signed_in and its headers' names.
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) -> AgentToolServerReplace an MCP server's headers. From its next turn it sends headers (a new key; {}: none), and
those given before are deleted.
The AgentToolServer as it stands, its headers naming the new ones.
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) -> NoneTake 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.
coder = noclick.Agent.from_name("coder")
coder.remove_tool_server("mcp_docs")rehearse_triggerasync
agent.rehearse_trigger(trigger, *, sample=None) -> OperationA 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.
NoneThe run's operation (kind agent.rehearse); .wait() gives the Rehearsal.
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).
Every such inbox, newest first, each with its address.
support = noclick.Agent.from_name("support")
print([inbox.address for inbox in support.inboxes()])pauseasync
agent.pause() -> AgentStop 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.
This agent, with paused true.
digest = noclick.Agent.from_name("digest")
digest.pause()
print(digest.paused) # Trueresumeasync
agent.resume() -> AgentLet its triggers wake it again, including one that stopped after failing the same way five times; a schedule picks up at its next run.
This agent, with paused false.
digest = noclick.Agent.from_name("digest")
digest.resume()workspace
agent.workspace(conversation=None, *, user=...) -> AgentWorkspaceThe files it works on: its one /workspace (AgentWorkspace; a conversation is accepted and
ignored). Sends nothing yet.
NoneWho the call acts for. Defaults to the user set by noclick.as_user (none: the account itself).
Its workspace, whose files, read, write and url reach its files.
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=...) -> AgentSandboxThe 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.
NoneWho the call acts for. Defaults to the user set by noclick.as_user (none: the account itself).
Its sandbox, whose get, files, read and exec reach it.
coder = noclick.Agent.from_name("coder")
machine = coder.sandbox()
if machine.get().status == "running":
print(machine.exec("git log --oneline -5").stdout)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.
None()Who the call acts for. Defaults to the user set by noclick.as_user (none: the account itself).
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.
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.
Who the call acts for. Defaults to the user set by noclick.as_user (none: the account itself).
FalseAgentEvent 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).
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=...) -> OperationA 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).
NoneWho the call acts for. Defaults to the user set by noclick.as_user (none: the account itself).
The run's operation (kind agent.rehearse); .wait() gives the Rehearsal: the reply, and
the tool_calls it made with what the world answered.
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 AgentConversationOne 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.
| name | str | The conversation's key. |
settingsasync
agent_conversation.settings() -> ConversationSettingsWhat its next turn runs on, and what its harness and accounts offer.
chat = noclick.Agent.from_name("coder").conversation("main")
settings = chat.settings()
print(settings.model, settings.effort, settings.efforts)updateasync
agent_conversation.update(**changes) -> ConversationSettingsChange 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.
Its ConversationSettings after the change.
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) -> ConversationCopy 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.
NoneNoneThe new Conversation, with forked_from.
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() -> ConversationMake 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.
Its Conversation, active.
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) -> ConversationRevertGo 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.
FalseA ConversationRevert, whose text is the message's.
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() -> ConversationContextHow full the model's context was at its last turn, against its window (a chat's /context).
used = noclick.Agent.from_name("coder").conversation("main").context()
print(f"{used.percent}% of {used.window_tokens}")usageasync
agent_conversation.usage() -> ConversationUsageWhat it cost and what pays for its model (a chat's /usage).
spent = noclick.Agent.from_name("coder").conversation("main").usage()
print(spent.cost_usd, spent.pays_with)tool_serversasync
agent_conversation.tool_servers() -> ToolServersThe MCP servers its coding harness reaches its tools on: connected, connecting or failed, with their tools.
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) -> ToolServersDo 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.
A ToolServers, as it stands after the reconnect started.
noclick.Agent.from_name("coder").conversation("main").reconnect_tool_server("linear")message_subagentasync
agent_conversation.message_subagent(call_id, text) -> OperationTell 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).
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 | OperationRun 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.
''NoneA CommandResult, or the command's Operation.
chat = noclick.Agent.from_name("coder").conversation("main")
chat.run_command("effort", "high")
chat.run_command("compact").wait()AgentStateRow
class AgentStateRowOne 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.
| agent_id | str | |
| name | str | |
| harness | str | |
| state | str | |
| conversation | str | None | |
| now | dict[str, Any] | None | |
| waiting | dict[str, int] | |
| turn_started_at | Any | |
| last_active_at | Any | |
| failed | dict[str, Any] | None | |
| waking | dict[str, Any] | None | |
| raw | dict[str, Any] | The response JSON exactly as the API sent it. |
CommandResult
class CommandResultWhat 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).
| control | str | |
| command | dict[str, str] | |
| result | dict[str, Any] | |
| raw | dict[str, Any] | The response JSON exactly as the API sent it. |
ConversationContext
class ConversationContextHow 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.
| model | str | None | |
| used_tokens | int | None | |
| window_tokens | int | None | |
| percent | float | None | |
| auto_compacts_at | float | None | |
| source | str | None | |
| as_of | Any | |
| raw | dict[str, Any] | The response JSON exactly as the API sent it. |
ConversationRevert
class ConversationRevertA 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.
| conversation | str | |
| message | str | |
| text | str | |
| dropped_turns | int | |
| files | dict[str, Any] | |
| files_applied | str | None | |
| agent_reads | str | |
| raw | dict[str, Any] | The response JSON exactly as the API sent it. |
AgentToolServer
class AgentToolServerAn 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).
| id | str | |
| name | str | |
| url | str | None | |
| transport | str | |
| signed_in | bool | |
| headers | list[str] | |
| raw | dict[str, Any] | The response JSON exactly as the API sent it. |
ConversationUsage
class ConversationUsageWhat 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}).
| cost_usd | float | |
| model_usage | dict[str, Any] | None | |
| turns | int | |
| pays_with | str | |
| plan_limits | list[dict[str, Any]] | |
| raw | dict[str, Any] | The response JSON exactly as the API sent it. |
ToolServer
class ToolServerOne 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).
| name | str | |
| status | str | |
| tool_count | int | None | |
| error | str | None |
ToolServers
class ToolServersA 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.
| servers | list[ToolServer] | |
| source | str | |
| checked_at | Any | |
| reconnect | dict[str, Any] | |
| raw | dict[str, Any] | The response JSON exactly as the API sent it. |
AgentCommand
class AgentCommandOne 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.
| name | str | |
| description | str | |
| argument_hint | str | |
| source | str | |
| aliases | list[str] |
AgentCommands
class AgentCommandsWhat 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.
| harness | str | |
| commands | list[AgentCommand] | |
| skills | list[dict[str, str]] | |
| capabilities | dict[str, bool] | |
| not_supported | dict[str, str] | |
| withheld | list[str] | |
| mapped | list[dict[str, str]] | |
| as_of | Any | |
| read_from | str | None | |
| raw | dict[str, Any] | The response JSON exactly as the API sent it. |
AgentGrant
class AgentGrantA 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.
| id | str | |
| connection | str | |
| integration | str | |
| operations | list[str] | None | |
| status | str | |
| reason | str | None | |
| conversation | str | None | |
| created_at | Any | |
| granted_at | Any | |
| raw | dict[str, Any] | The response JSON exactly as the API sent it. |
ConversationSettings
class ConversationSettingsWhat 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.
| permission_mode | str | |
| effective_permission_mode | str | |
| permission_modes | list[str] | |
| not_supported | dict[str, str] | |
| raw | dict[str, Any] | The response JSON exactly as the API sent it. |
| conversation | str | None | |
| title | str | None | |
| archived | bool | |
| harness | str | None | |
| model | str | None | |
| effort | str | None | How hard its model reasons ( |
| efforts | list[str] | The efforts its harness takes on its model, weakest first, in the harness's own words. |
| default_effort | str | None | |
| speed | str | |
| speeds | list[str] |
|
| model_connection | str | None | |
| accounts | list[dict[str, Any]] | What can pay for it: each |
| overridden | list[str] | What the conversation sets itself: its |
| forked_from | dict[str, Any] | None |
|
HarnessRequest
class HarnessRequestWhat 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.
| id | str | |
| kind | str | |
| status | str | |
| action | str | None | |
| title | str | None | |
| detail | str | None | |
| plan | str | None | |
| questions | list[dict[str, Any]] | |
| options | list[dict[str, str]] | |
| answer | dict[str, Any] | None | |
| operation_id | str | None | |
| created_at | Any | |
| expires_at | Any | |
| raw | dict[str, Any] | The response JSON exactly as the API sent it. |
| decision | str | None | What it was answered with ( |
| answered_at | Any | |
| canceled_reason | str | None | Why it was closed unanswered: its turn ended first (failed, stopped, timed out). |
AgentReply
class AgentReplyThe agent's answer to one message.
| text | str | |
| conversation | str | None | |
| tool_calls | list[dict[str, Any]] | The turn's tool calls, each |
| operation_id | str | None | |
| raw | dict[str, Any] | The response JSON exactly as the API sent it. |
| model_usage | ModelUsage | None | The turn's model calls on your own key or plan ( |
| ended_by | str | None | The limit that ended the turn before it finished ( |
| steps | list[AgentStep] |
|
AgentStep
class AgentStepOne 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.
| kind | str | |
| tool | str | |
| call_id | str | None | |
| source | str | None | |
| arguments | dict[str, Any] | |
| command | str | None | |
| path | str | None | |
| query | str | None | |
| output | str | None | |
| exit_code | int | None | |
| duration_ms | int | None | |
| is_error | bool | |
| result | Any | |
| diffs | list[AgentStepDiff] | |
| created_at | Any | |
| raw | dict[str, Any] | The response JSON exactly as the API sent it. |
AgentStepDiff
class AgentStepDiffOne file a step changed: a unified diff, or a new file's whole content (change add), at most 16,384
characters.
| path | str | |
| change | str | None | |
| diff | str |
Conversation
class ConversationOne thread with an agent; pass conversation back to continue it or to history().
| conversation | str | |
| user_id | str | None | |
| title | str | None | |
| preview | str | None | |
| turns | int | None | |
| cost_usd | float | None | |
| last_activity | Any | |
| raw | dict[str, Any] | The response JSON exactly as the API sent it. |
| status | str | None |
|
| handed_off_to | str | None | Who a |
| model_usage | ModelUsage | None | Its model calls on your own key or plan, all turns together ( |
| last_message | dict[str, Any] | None | Its newest message: |
| people | list[dict[str, Any]] | Who is in it: each |
| archived | bool | |
| forked_from | dict[str, Any] | None |
|
| agent_reads | str | None | A fork's: |
| active | bool | Whether it's the agent's session now, the one conversation everyone talking to it shares; the others can be resumed. |
Message
class MessageOne 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).
| role | str | |
| text | str | |
| created_at | Any | |
| raw | dict[str, Any] | The response JSON exactly as the API sent it. |
| files | list[Attachment] | The files it carried (a |
| tool_calls | list[dict[str, Any]] | A reply's tool calls: each |
| via | str | None | How a |
| data | dict[str, Any] | None | A |
| trigger | dict[str, Any] | None | What started the turn of a |
| reasoning | list[dict[str, Any]] | A reply's reasoning: each |
| operation_id | str | None | The turn it belongs to (an |
| command | dict[str, str] | None | The harness command a |
| id | str | None | Its place in the thread, which stays (a revert marks, never removes): what |
| author | dict[str, Any] | None | Who sent a |
| notification | bool | An agent's message to its owner from another of its conversations (a |
| space | dict[str, Any] | None | A |
| subagent | dict[str, str] | None | A |
| chat | str | None | The chat a message of the agent's session came from, where it isn't the session's own: the |
| steps | list[AgentStep] |
|
HarnessInfo
class HarnessInfoWhat 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.
| name | str | What |
| label | str | None | |
| version | str | None | The version NoClick runs ( |
| default_model | str | The |
| custom_models | bool | Whether |
| model_connection | str |
|
| integrations | list[str] | The model providers ( |
| streaming | str |
|
| shell | str |
|
| notes | list[str] | What to know before choosing it (a model that needs a particular key, say). |
| raw | dict[str, Any] | The response JSON exactly as the API sent it. |
| efforts | list[str] | The reasoning efforts it takes on its default model, weakest first ( |
| default_effort | str | None | The effort it runs at when none is set ( |
| speeds | list[str] |
|
| noclick_key | dict[str, Any] | Whether a coding agent on it may run on NoClick's own key ( |
| permission_modes | list[str] | The permission modes it enforces ( |
| not_supported | dict[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.
NoneReturn at most this many.
50)Each model's id (what model= takes) and label. A harness whose
custom_models is True also runs ids it doesn't list.
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 HarnessModelA 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.
| id | str | |
| label | str | None | |
| canonical | str | |
| route | str | |
| noclick_key | dict[str, Any] | None | What it costs on NoClick's own key: |
ModelUsage
class ModelUsageWhat 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.
| input_tokens | int | |
| output_tokens | int | |
| cached_tokens | int | |
| usd | float | |
| raw | dict[str, Any] | The response JSON exactly as the API sent it. |
AgentToolAccess
class AgentToolAccessWhat 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.
| mode | str | |
| listed | bool | |
| rules | dict[str, str] | |
| since | Any | |
| apps | list[AgentToolApp] | |
| raw | dict[str, Any] | The response JSON exactly as the API sent it. |
AgentToolApp
class AgentToolAppOne 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.
| key | str | None | |
| app | str | |
| kind | str | |
| integration | str | None | |
| credential_type | str | None | |
| label | str | |
| account | str | None | |
| status | str | None | |
| on | bool | |
| calls | int | |
| actions | list[AgentToolAction] |
AgentToolAction
class AgentToolActionOne 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).
| key | str | |
| action | str | |
| title | str | |
| group | str | None | |
| kind | str | |
| verdict | str | |
| can_ask | bool | |
| calls | int |
AgentMemory
class AgentMemoryagent.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.
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.
Who the call acts for. Defaults to the user set by noclick.as_user (none: the account itself).
Each entry's name, description, version and when it last changed, by name; content is
None here, so read an entry for its body.
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.
Return at most this many.
None)Who the call acts for. Defaults to the user set by noclick.as_user (none: the account itself).
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).
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=...) -> MemoryEntryOne entry in full; a name with no entry raises noclick.NotFound.
Who the call acts for. Defaults to the user set by noclick.as_user (none: the account itself).
The entry with its content and the version to pass back when you change it.
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=...
) -> MemoryEntryWrite 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.
NoneNoneWho the call acts for. Defaults to the user set by noclick.as_user (none: the account itself).
The entry as saved, with its new version.
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=...) -> NoneForget an entry. With version, only if it is still at that version
(else noclick.Conflict). The agent can save the name again later.
NoneWho the call acts for. Defaults to the user set by noclick.as_user (none: the account itself).
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.
Who the call acts for. Defaults to the user set by noclick.as_user (none: the account itself).
Each version's number, description, who wrote it and when, without its content.
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=...) -> MemoryEntryVersionOne version of an entry, with its content; one it no longer keeps raises noclick.NotFound.
Who the call acts for. Defaults to the user set by noclick.as_user (none: the account itself).
That version in full.
first = noclick.Agent.from_name("support").memory.get_version("refunds", 1)
print(first.content)restoreasync
agent.memory.restore(name, version, *, user=...) -> MemoryEntryPut 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.
Who the call acts for. Defaults to the user set by noclick.as_user (none: the account itself).
The entry as restored, at its new version.
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.
Who the call acts for. Defaults to the user set by noclick.as_user (none: the account itself).
Each entry's name, description and version, by name, without its content.
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=...) -> Nonedelete, as noclick.Memory calls it, so code changes any memory the same way.
NoneWho the call acts for. Defaults to the user set by noclick.as_user (none: the account itself).
support = noclick.Agent.from_name("support")
support.memory.forget("old-pricing")MemoryEntry
class MemoryEntryOne 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.
| name | str | |
| description | str | |
| content | str | None | |
| version | int | |
| updated_at | Any | |
| updated_by | str | None | |
| written_by | MemoryWriter | |
| user_id | str | None | |
| conversation | str | None | |
| raw | dict[str, Any] | The response JSON exactly as the API sent it. |
MemoryEntryVersion
class MemoryEntryVersionOne 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.
| name | str | |
| version | int | |
| current | bool | |
| description | str | |
| content | str | None | |
| written_by | MemoryWriter | |
| user_id | str | None | |
| saved_at | Any | |
| raw | dict[str, Any] | The response JSON exactly as the API sent it. |
MemoryWriter
class MemoryWriterWho 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).
| type | str | None | |
| agent_id | str | None | |
| agent_name | str | None | |
| conversation | str | None |
AgentWorkspace
class AgentWorkspaceThe 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.)
| conversation | str | 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.
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.
support = noclick.Agent.from_name("support")
for file in support.workspace().files():
print(file.path, file.size_bytes, file.url)readasync
workspace.read(path) -> bytesRead one file; a missing file raises noclick.NotFound.
The file's bytes, exactly as stored; decode text yourself.
analyst = noclick.Agent.from_name("analyst")
report = analyst.workspace().read("report.csv")
print(report.decode()[:200])writeasync
workspace.write(path, data) -> WorkspaceFilePut 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.
The file as stored, with its download url.
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) -> NoneDelete one file from the workspace; a missing file does nothing.
analyst = noclick.Agent.from_name("analyst")
analyst.workspace().delete("draft.csv")urlasync
workspace.url(path, *, expires_in_s=None) -> strA link that downloads one file without a key, for your user to click.
NoneThe link; it works for expires_in_s seconds (an hour by default, a day at most).
analyst = noclick.Agent.from_name("analyst")
link = analyst.workspace().url("chart.png", expires_in_s=600)
print(link)WorkspaceFile
class WorkspaceFileA file in an agent's workspace for one conversation (AgentWorkspace).
url downloads it without a key for about an hour.
| path | str | |
| size_bytes | int | |
| modified_at | Any | |
| url | str | None | |
| raw | dict[str, Any] | The response JSON exactly as the API sent it. |
AgentSandbox
class AgentSandboxThe 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).
| conversation | str | None | The conversation it was named by; none reads it through the agent's session. |
getasync
agent_sandbox.get() -> ConversationSandboxWhere it runs, whether it's running and since when, what it reserved and costs.
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.
'/workspace'FalseReturn at most this many.
None)Every entry (or the first limit), fetched page by page.
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
) -> SandboxFilesPageOne page of files, and where it was read; pass next_cursor back as cursor.
'/workspace'FalseThe next_cursor of the page before; omit it for the first page.
None)Return at most this many.
None)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) -> bytesOne file's bytes (up to 16 MB), every secret the sandbox holds taken out; a missing file raises
noclick.NotFound.
The file's bytes; decode text yourself.
coder = noclick.Agent.from_name("coder")
print(coder.sandbox().read("/workspace/README.md").decode())execasync
agent_sandbox.exec(command, *, timeout_s=None) -> ExecResultRun 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.
NoneIts stdout, stderr (the last 64 KiB of each) and exit_code.
coder = noclick.Agent.from_name("coder")
print(coder.sandbox().exec("git status --short").stdout)shellasync
agent_sandbox.shell() -> SandboxShellYour 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).
A SandboxShell whose url and single-use token your user's browser opens within two minutes.
coder = noclick.Agent.from_name("coder")
shell = coder.sandbox().shell()
send_to_browser(shell.url, shell.token)ConversationSandbox
class ConversationSandboxThe 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.
| agent_id | str | |
| conversation | str | |
| harness | str | |
| place | str | |
| status | str | |
| started_at | Any | |
| cpu | float | None | |
| memory_mb | int | None | |
| region | str | None | |
| usd_per_hour | float | None | |
| spent_usd_today | float | None | |
| machine_id | str | None | |
| project_id | str | None | |
| workspace | str | None | |
| raw | dict[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.
- Inherits from Page.
| source | str |
SandboxShell
class SandboxShellA 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.
| agent_id | str | |
| conversation | str | |
| url | str | |
| token | str | |
| token_expires_at | Any | |
| idle_limit_s | int | None | |
| raw | dict[str, Any] | The response JSON exactly as the API sent it. |
CodingAgents
class CodingAgentsEvery 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.
| agents | list[CodingAgent] | |
| counts | list[CodingCount] | |
| by_state | dict[str, int] | |
| paused_by_reason | dict[str, int] | |
| read_at | Any | |
| unread | list[str] | |
| raw | dict[str, Any] | The response JSON exactly as the API sent it. |
CodingAgent
class CodingAgentOne 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).
| agent_id | str | |
| name | str | |
| user_id | str | None | |
| app | CodingApp | None | |
| harness | str | |
| model | str | None | |
| credential | CodingCredential | |
| place | str | |
| state | str | |
| paused | CodingPause | None | |
| pauses | list[CodingPause] | |
| job | CodingJob | None | |
| runs | list[CodingRun] | |
| spent_usd_this_month | float | |
| model_usage_this_month | ModelUsage | |
| raw | dict[str, Any] | The response JSON exactly as the API sent it. |
CodingApp
class CodingAppThe 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.
| project_id | str | |
| name | str | None | |
| title | str | None | |
| coder | bool |
CodingCount
class CodingCountHow many coding agents run on one harness and model, in one state and place.
| harness | str | |
| model | str | None | |
| state | str | |
| place | str | |
| count | int |
CodingCredential
class CodingCredentialWhose model credential a coding agent thinks with: kind is key, a person's plan, NoClick's own
(noclick), or pending until it's connected.
| kind | str | |
| connection | str | None | |
| credential_type | str | None | |
| connected | bool | None |
CodingJob
class CodingJobA 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.
| operation_id | str | |
| conversation | str | None | |
| status | str | |
| step | str | None | |
| since | Any | |
| title | str | None | |
| text | str | |
| lost | bool | |
| raw | dict[str, Any] | The response JSON exactly as the API sent it. |
CodingPause
class CodingPauseWhy a coding agent isn't doing anything: reason (expired, disconnected, spending_paused,
spend_cap, out_of_funds, budget, failed_start, paused) and its message.
| reason | str | |
| message | str |
CodingRun
class CodingRunA 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.
| conversation | str | None | |
| place | str | |
| since | Any | |
| busy | bool | |
| project_id | str | None | |
| daemon | bool | None | |
| cpu | float | None | |
| memory_mb | int | None |
AgentEvent
class AgentEventOne 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.
| type | str | |
| text | str | None | |
| tool | str | None | |
| arguments | dict[str, Any] | None | |
| result | Any | |
| is_error | bool | |
| reply | AgentReply | None | |
| role | str | None | A |
| held | dict[str, Any] | None | A held |
| status | str | None | A |
| operation_id | str | None | |
| raw | dict[str, Any] | The response JSON exactly as the API sent it. |
| file | Attachment | None | A |
| files | list[Attachment] | A |
| tool_calls | list[dict[str, Any]] | A |
| approval | dict[str, Any] | None | An |
| operation | dict[str, Any] | None | An |
| via | str | None | A |
| data | dict[str, Any] | None | A |
| trigger | dict[str, Any] | None | A |
| reasoning | list[dict[str, Any]] | A |
| call_id | str | None | A coding harness's step: the |
| source | str | None |
|
| exit_code | int | None | A harness command's |
| duration_ms | int | None | |
| whole | bool | An |
| path | str | None | A |
| change | str | None | |
| diff | str | None | |
| count | int | None | A |
| step_kind | str | None | A harness step's |
| request | dict[str, Any] | None | A |
| command | str | None | A harness command's |
| query | str | None | |
| message_id | str | None | A |
| author | dict[str, Any] | None | Who sent a |
| notification | bool | A |
| space | dict[str, Any] | None | A notification's space, when it passes on a space's news ( |
| subagent | dict[str, str] | None | The coding harness's subagent a |
| chat | str | None | The chat a |
Rehearsal
class RehearsalA 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.
| reply | str | |
| tool_calls | list[dict[str, Any]] | |
| transcript | list[dict[str, Any]] | |
| scenario | str | None | |
| cost_usd | float | None | |
| operation_id | str | None | |
| raw | dict[str, Any] | The response JSON exactly as the API sent it. |
Wakeup
class WakeupA 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).
- Like every live object, it also has hydrate(), refresh() and raw.
| id | str | |
| agent_id | str | |
| user_id | str | None | Whose conversation it wakes ( |
| conversation | str | The conversation that takes the turn. |
| note | str | What the agent is told when it wakes. |
| at | Any | When it's due (a time wake-up), or when what it waited for happened. |
| when | dict[str, Any] | None | What it waits for besides a time: |
| every | Cron | None | Its schedule, for a recurring wake-up ( |
| fired | int | How many turns it has started (a recurring one counts up). |
| source | str | What set it: |
| status | str |
|
| woken_by | dict[str, Any] | None | What woke it: |
| operation_id | str | None | The turn it started (an |
| depth | int | How many |
| error | dict[str, Any] | None | Why it failed: |
| missed | dict[str, Any] | None | A recurring one's last missed time: |
| created_at | Any | |
| delivered_at | Any | When its turn started ( |
| operation | Operation | None | The turn it started, as an |
cancelasync
wakeup.cancel() -> WakeupCall it off before it's due. A wake-up that already started its turn, or was
canceled or failed, raises noclick.Conflict.
This wake-up, canceled.
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) -> WakeupChange 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.
NoneNoneNoneNoneThis wake-up, as it is now.
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.
- Inherits from Operation.
| started_by | str | None | The agent whose job it is: a task's parent, whether your code spawned it or the parent did. |
| conversation | str | None | The conversation the worker does it in. |
| parent_conversation | str | None | The parent's conversation its updates wake ( |
| required_updates | list[Any] | The updates its parent required, as on the wire: |
| latest_update | JobUpdate | None | Its newest update ( |
| agent | Agent | 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.
Return at most this many.
None)Every matching job (or the first limit), each with its status, step and latest_update.
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) -> PageOne page of jobs; pass next_cursor back as cursor.
The next_cursor of the page before; omit it for the first page.
None)Return at most this many.
None)A page whose data holds the jobs and whose next_cursor is None on the last page.
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) -> OperationSummaryHow many jobs match, by status; takes Operation.summary's filters except kind.
The number that match in total, and per operation status in by_status.
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.
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.
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 JobUpdateOne 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).
| id | str | |
| job_id | str | |
| agent_id | str | |
| kind | str | |
| text | str | None | |
| tool | str | None | |
| arguments | dict[str, Any] | None | |
| status | str | None | |
| result | Any | |
| error | dict[str, Any] | None | |
| waiting_on | dict[str, Any] | None | A |
| wakeup_id | str | None | |
| created_at | Any | |
| raw | dict[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.
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",
)| tools | list[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.
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",
)| interval_s | int | 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.
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()],
)| tools | list[str] | The capability's tools this gives. |
| tools |
onlyclassmethod
noclick.Agents.only(*tools) -> AgentsSome of the capability's tools: spawn, message, ask, status,
list and cancel.
The capability narrowed to those tools, for tools= (on the wire, "agents.spawn", ...).
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).
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| names | list[str] | What it's narrowed to: capability groups and API areas (empty: all of NoClick). |
| names |
onlyclassmethod
noclick.Platform.only(*names) -> PlatformPart 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.
NoClick narrowed to those names, for tools= (on the wire, "noclick.read", ...).
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 AttachmentA 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.
| name | str | |
| url | str | |
| mime_type | str | |
| id | str | None | |
| size_bytes | int | None | |
| kind | str | |
| voice | bool | |
| duration_ms | int | None | |
| peaks | list[float] | None | |
| raw | dict[str, Any] | The response JSON exactly as the API sent it. |
Terminal
class TerminalA 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).
- Like every live object, it also has hydrate(), refresh() and raw.
| agent_id | str | |
| conversation | str | |
| harness | str |
|
| state | str |
|
| waiting_for_turn | bool | Taken over once the agent's turn in flight ends. |
| since | Any | When it was taken over. |
| ends_at | Any | When it hands itself back at the latest: its sandbox's limit. |
| idle_limit_s | int | None | It hands itself back after this long with nobody typing. |
| detached_limit_s | int | None | It hands itself back after this long with no terminal open. |
| ended_because | str | None | Why the last take-over ended: |
| url | str | None | The terminal's websocket (from |
| token | str | None | Opens |
| token_expires_at | Any |
hand_backasync
terminal.hand_back() -> TerminalGive 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.
This terminal, as it is now (agent, or handing_back while its program exits).
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.
NoneReturn at most this many.
30)The client to send with; defaults to the module client built from NOCLICK_API_KEY.
None)Each file as an Attachment with its id, name, url, mime_type and kind.
[report] = noclick.attachments(query="q3")
analyst.message("What changed since this?", files=[report])