Skip to content

The agent and the API

Every Digize workspace has an AI agent. It answers members in the app’s chat and, once an owner lets it work on its own, does work with nobody watching: a follow-up’s task when it comes due, a playbook’s instruction when the events it waits for arrive, a daily review, a change to a site’s code. It works through the same operations as the API, as the agent acting for a member, so whatever it does is checked against that member’s role and audited as the agent, on their behalf.

The API doesn’t drive the agent. A key can set follow-ups for it and read the site changes it makes; the agent’s settings, its playbooks and its chats are a signed-in owner’s.

With a key Operations
Set, read and close follow-ups and reminders for members, and read and close those members set for the agent (crm:read, crm:write) GET /api/v1/follow-ups GET /api/v1/follow-ups/{id} POST /api/v1/follow-ups POST /api/v1/follow-ups/{id}/complete POST /api/v1/follow-ups/{id}/snooze POST /api/v1/follow-ups/{id}/cancel
Read the agent’s changes to the workspace’s sites, with their previews, screenshots and watch (sites:read) GET /api/v1/site-changes GET /api/v1/site-changes/{id}
Read what the agent did, in the audit log: its events have actor.kind agent, and filtering by a member’s user id finds what it did for them too (settings:read) GET /api/v1/audit/page with actor=kind:agent

What a key can’t do, whatever its permissions:

  • Change how the agent works. AI › Settings (the switch, each kind of change’s level, the limits, quiet hours, who’s told), Pause, the models it uses and its daily spending cap, and its playbooks need the agent:update permission, which only the owner role has and API keys never carry. They have no public routes.
  • Give the agent a task. The agent takes instructions from members only. A follow-up’s task is one, so a key’s POST /api/v1/follow-ups with a task is refused (403); set a reminder with a note for a member instead.
  • Start a change to a site’s code. A coding run starts only from a member’s own words: their message in the chat, or a playbook a member wrote. Not from a key, a follow-up’s task, the system or the agent’s own idea. Putting one live is the member’s, on its card in the chat, or the agent’s by itself where an owner set deploys and site code to Auto.
  • Read the agent’s chats. Each is its member’s own.
  • Change what it knows or remembers, or set up the phone receptionist. Knowledge, memory and the receptionist are managed by members in the app, and the agent’s own writing and image tools have no public routes.

The agent answers questions about the business from what the workspace wrote down, and remembers what members tell it. Both are managed in the app (AI › Settings › Knowledge and Memory), not through the API:

  • Knowledge is files (PDFs, Word documents and text, up to 25 MB), public web pages and FAQs. Each is read into passages and searched by meaning when a member, a run or the phone receptionist asks about the business; the agent cites what it used as [1], [2], with the sources under its answer. Pages are fetched again when someone asks. Owners and admins change knowledge; everyone can look and try a question.
  • Memory is facts in members’ words: about the business, which every member’s chats know, or about one member, for their chats only. The agent proposes saving one when a member asks it to in their own message (“remember that we close at 4 on Fridays”), and saves it once they approve the card; never from a run’s data.
  • Writing and images with AI: the Write with AI buttons in composers, and pictures made for posts, products and ads, which are kept in the workspace’s images.

All of it uses the agent’s models, each use under its own line on AI › Settings › Models: writing, knowledge, images and the receptionist. Workers AI’s are counted on the workspace’s ai meter (Settings › Billing).

Claude and the workspace’s Anthropic account

Section titled “Claude and the workspace’s Anthropic account”

Claude answers with the workspace’s own Anthropic API key, connected in Settings › Integrations › Anthropic; Digize has no Anthropic key of its own. While it’s connected, the jobs set to a Claude model on AI › Settings › Models answer with it (watching and acting start on Claude Haiku and Sonnet, code on Claude Opus), books can be written with Claude, and site changes run Claude Code. What they cost is on the Anthropic account: AI › Settings › Models still lists it by job and model, at list price, but it isn’t on the ai meter or under the daily spending cap, so those jobs keep going when the cap is reached. Until Anthropic is connected, a job set to Claude answers with GLM-4.7 Flash on the ai meter, and the agent can’t start site changes: it says to connect Anthropic first. If Anthropic refuses the key later (revoked, or the account out of credit), the chat says so, and an owner connects it again with a new key.

A follow-up is something to do by a time, about a contact or no one: POST /api/v1/follow-ups with dueAt, a note, and, from a member only, a task: the instruction for the agent in their words, such as “text them asking whether the quote works”, set on the follow-up’s page or by asking the agent in the chat.

When it comes due:

  • Without a task, or while the agent doesn’t work on its own, its owner (ownerId, the member it’s for) is told in the bell.
  • With a task, and the agent working on its own, the agent takes it (status: "agent", with runId and chatId) and does it in a chat of its own, as AI › Settings allows, acting for the member who set it. When the run ends, the follow-up is done with outcome: "agent" and result saying what the agent did; if it couldn’t, the follow-up goes back to open with result saying why, and its owner is told.
  • A contact who writes back first closes it (outcome: "replied") before anything runs, unless closeOnReply is false.

POST /api/v1/follow-ups/{id}/complete and POST /api/v1/follow-ups/{id}/cancel stop a run the agent hasn’t started; it stops at its first step.

When a member asks the agent to change a site (a new heading, a page at /abc, a contact form), the agent makes the change on a branch agent/<change id> in a container of its own, builds it as a deploy would, and puts it up as a preview at a hostname of its own under yourfreesite.com, with screenshots of the pages it touched, live and on the preview, at desktop and phone widths. The preview has the site’s plain variables, and its secrets and storage only if an owner allows that in Sites settings. Nothing goes live until it’s merged: on its card in the member’s chat at Ask, or by itself at Auto. A merge is a push to the site’s branch, which deploys like any push. For fifteen minutes after (or as long as an owner sets in AI › Settings, from 5 to 60 minutes), the site’s errors are compared with the same time the day before every five minutes; a spike rolls it back to the version before. A site takes one change at a time, so its next change starts once the watch ends. With the watch turned off, a change is done as soon as it’s live, and nothing rolls it back.

GET /api/v1/site-changes/{id} answers where a change stands in status:

status Means
coding Its coding run is making the change.
previewing The run pushed its branch, and the preview is building (previewStatus).
ready The preview is up (previewUrl), with its screenshots, waiting on its card or the merge.
deploying Merged; the site’s deploy of it is going.
watching Live, and being watched (watch has each look).
done Live, and its watch was calm, ended early by an owner, or off.
rolled_back Errors spiked after it went live, so the version before it was put back (error says by how much).
failed It didn’t make it: the run changed nothing or ran out of time, the preview didn’t build, or the deploy failed (error says which).
discarded Someone discarded it, its card was rejected or lapsed, or Pause or the switch going off stopped it.

Screenshot links last an hour; ask again for fresh ones.

What the agent does with nobody watching is held by AI › Settings, which only owners change:

  • The switch. Off in every workspace until an owner turns it on. While it’s off, the agent answers in the chat and does nothing on its own. It proposes, for the member to approve, every change that isn’t inside the workspace (messages, money, automations, site code, deploys, deleting and cancelling), and the few inside it that send the workspace’s events or mail elsewhere or change a lot at once; most other changes inside the workspace it makes, then tells.
  • Levels. Each kind of change (inside the workspace, messages, money, automations, site code, deploys, deleting and cancelling) is Off (refused, in the chat too), Ask (proposed on a card a member approves) or Auto (done, then told). Every one starts at Off when the switch is first turned on. A playbook has levels of its own, never above these. A few operations need a person whatever the levels say, such as making API keys, changing members, or the agent’s own settings. Saving memory and knowledge (a fact, an FAQ, a page) is never above Ask: the agent proposes it, since every member’s chats, the website chatbot and the phone receptionist trust it later.
  • Limits that hold even at Auto, counted in the same transaction as the change: texts and emails a day, one message to each contact a day, money moved a day, deploys a day, coding runs a day and each one’s container minutes; quiet hours, during which a send waits until they end; and the watch on site changes once they’re live, which an owner can shorten, lengthen up to an hour, or turn off.
  • Each run’s own limits: steps, lookups, changes and 50 cents of model use, code mode’s included.
  • The daily spending cap on AI › Settings › Models, for the models on the ai meter. The owners are told at 80%; at 100% the jobs on those models stop until midnight on the workspace’s clock, and a run that reached it carries on from where it stopped then. Claude, on the workspace’s own Anthropic account, isn’t counted and doesn’t stop.
  • Pause stops every run before its next step, until an owner resumes it.

None of this applies to your key’s own requests: those are checked against the key’s permissions as always. The agent’s use of Workers AI models and its coding runs’ minutes are billed on the workspace’s ai and agent_minutes meters, on Settings › Billing; its use of Claude is on the workspace’s Anthropic account.