Agent guide
Interfold is built to be driven by coding agents. This page is the reference for an agent operating Interfold on a user’s behalf: the tools, the safe defaults, and the conventions that keep publishes correct and credentials protected.
If you are a human, this page still doubles as a concise operating checklist.
Machine-readable docs
Every page on this site is available as raw Markdown at a predictable URL, plus two aggregate files following the llms.txt convention:
- /llms.txt — an index of every doc with one-line descriptions and links. Fetch this first to orient.
- /llms-full.txt — the entire documentation set concatenated into a single file. Fetch once to load everything.
- Raw per page — append the slug to
/raw/. This page is at/raw/agents; the CLI reference is at/raw/cli; and so on.
All three are served as plain text so you can fetch and parse them directly:
curl https://docs.interfold.site/llms.txt
curl https://docs.interfold.site/raw/cli
Delegate work in Operator chat
In Operator chat, ask for an assignment in a separate Thread. Operator creates a visible child with a self-contained brief and a link/status in your main chat. It has the same tools and approval behavior; approvals remain attached to the exact action. The main chat shows “Needs approval”; open the child chat to review and approve it. Open the child to inspect detailed work or continue chatting there.
The original assignment’s final answer or failure automatically returns to your main chat. Closing the browser does not cancel it. Stop does not undo completed changes. If returning the answer fails, the saved child result remains available: ask Operator to continue using it. Threads share resources, so concurrent changes still need care.
A parent can have up to 10 active delegated assignments at once, including assignments waiting for approval. Finished, failed or cancelled assignments free a slot even while their results wait to return. Each creation returns a child link immediately; that confirms the assignment was accepted, not that its work has finished. Child Threads cannot delegate again. Later messages in a child are normal chat messages; they do not automatically repeat its original return. CLI and MCP access to private chat coordination are not available.
Each assignment’s outcome returns independently when it completes, fails, or is cancelled. It does not wait for other children. The parent handles ready outcomes one at a time and can combine them when useful. A child waiting for approval does not block another child’s outcome.
The Stop response button ends only the current response; child assignments keep running. To stop delegated work, ask Operator in chat: for example, “Stop the research assignment” or “Stop all delegated work.” Stopping one assignment leaves its siblings running and reports its cancellation. Stopping all delegated work ends outstanding assignments and pending automatic returns. Closing the browser does not stop work.
Choose the CLI or MCP
The browser agent also exposes list_buckets, get_bucket, create_bucket,
and update_bucket (rename). Bucket reads run automatically; writes follow the
agent’s approval flow. For a hosted app or page, its default is create_site,
which creates a bucket automatically. It can attach an existing unattached
bucket with create_site.bucket_id. Its file-editing tools remain site-oriented.
The interfold CLI is the primary interface for local coding agents. It stores
credentials, resolves site context, and detects content types. Agents with a
remote MCP client can instead connect to the Interfold MCP server using
an API key. Prefer these interfaces over raw REST API calls
unless the task needs an operation they do not expose.
Install the skill so your agent has the full operating guide locally:
interfold skills install
Start CLI tasks with readiness checks
interfold whoami # confirm authentication
interfold config get # see defaultAccountId
interfold link status # see the nearest local account/site binding
If authentication is missing or expired, keep the current agent task alive while the user approves a browser login:
- Run
interfold loginyourself in the current agent terminal. - Tell the user to sign in and approve Interfold CLI in the browser. Leave the command running.
- Wait for the command to finish, verify with
interfold auth status, and continue the original website task.
If the agent runtime cannot keep a terminal process alive, ask the user to run
interfold login and re-check authentication when they return. Never ask
the user to paste an API key or share a credential file, and never write
credentials into project files — the CLI owns credential storage.
If your agent paused during login
Paste this into the same agent conversation after approving the browser login:
I approved Interfold login. Please re-check `interfold auth status` and continue the website task from where you left off. Do not ask me to log in again or paste credentials.
Choose a site deliberately
Select a site before every site-scoped command. Reuse an existing active site for updates or standalone pages; create a new site only for a genuinely new project or an explicit request.
interfold sites list --status ACTIVE --limit 50
interfold sites get <site-id> # read the real subdomain before building URLs
When reusing a site, preserve /web/index.html unless the user clearly wants
the homepage replaced. For a new standalone page, use a workspace path like
/web/demo.html, hosted at /demo.html.
For MCP, call list_sites and get_site instead. Pass the explicit site ID to
each site-scoped tool. MCP write_file changes the live site immediately; it
does not stage changes for a later deployment.
The site agent can list recent file revisions, read a historical text revision,
and restore one with approval. The restore creates a new current revision and
requires the current version ID returned by get_site_file or the file list.
Publish, then verify
Never report a page as live without checking the hosted URL.
interfold files put ./index.html /web/index.html --site <site-id> --content-type 'text/html; charset=utf-8'
interfold sites get <site-id>
curl -I https://<subdomain>.interfold.site/index.html
curl -I https://<subdomain>.interfold.site/ # for the homepage, verify root too
If verification fails, report the failed command and the error text. Do not claim success.
Explicit memory in browser chat
The browser agent has list_memories, get_memory, create_memory,
update_memory, and archive_memory. Recall is bounded lexical search within
the current account and initiating human’s access. Reads run automatically;
mutations use existing write approvals and full-access settings. Personal
memory is the default. Shared account notes require an explicit choice; private
chat details and personal memories must not be promoted into them.
Ask the agent to remember a preference, then ask about it in a fresh Thread. An optional stable key makes a record easy to find. Corrections and archiving require the revision from a fresh read. Child Threads can recall authorized memory; only user-directed main runs can write it. Memory is reference data, never authorization or a replacement for current instructions. Sources, automatic extraction, dedicated CLI/MCP tools, and a review page are deferred. See Memories.
Access defaults
- Site access is
PUBLICorPRIVATE. If the user expects anonymous visitors, the site must bePUBLIC. - Site access gates anonymous
/web/files only. Every deployed/api/<name>runtime is anonymously callable; its handler must own any authorization. - Bucket and Files APIs, function source, cron source, data, database state, migration assets, and other stored objects remain account-private.
Full model in Sites & access.
Handle secrets safely
- Set secrets via stdin:
printf '%s' "$VALUE" | interfold secrets set NAME --site <id>. - Verify existence with
secrets list, notsecrets get. - Never print secret values in summaries or logs.
Report results precisely
After a successful task, state:
- the site id,
- the paths you changed,
- the live URL,
- the verification you performed.
Keep it short and factual. Don’t mention local credential paths unless a troubleshooting step requires it.