Export

Pack up everything a user or an app holds, in formats that work elsewhere.

An export packs up what a user holds on NoClick in forms that work without NoClick, so a user who asks for their data, or who leaves, gets something they can use. Everything that holds data exports; this page covers a whole user.

Export a user

import noclick

user = noclick.User.from_id("user_42")
bundle = user.export().wait()

print(bundle.url)          # a zip; the link works until bundle.expires_at
for item in bundle.contents:
    print(item.kind, item.name, item.detail)

export() returns an operation, since a user with a lot of data takes a while; wait() gives an ExportBundle. The user keeps working meanwhile. Each dict and queue is read as it stood at one moment; a bucket, a volume or a database is read as the export reaches it.

What's in the bundle

WhatLeaves as
Agentsagents/<name>.json: each of the user's own agents' definition (instructions, model, tools, triggers)
Conversationsconversations/<agent>/<conversation>.jsonl: one transcript per conversation, a message per line, with their own agents and the account's (@account/<agent>)
Memorymemory/<agent>/<name>.md: what each agent remembers about the user, one Markdown file per memory
Databasesdatabases/<name>.sql: SQL that recreates the schema and the rows
Buckets and volumesbuckets/<name>/files/, volumes/<name>/files/: every file at its key or path, with an index.jsonl beside it
Dicts and queuesdicts/<name>.jsonl, queues/<name>.jsonl: a key or a message per line
Coderepos/<name>.bundle: each repo with every branch and tag, a git bundle to clone or push elsewhere
Appsapps/<name>.json: each app's settings, bindings and secret names; its code and data are in their own places
Connections and secretsconnections.json, secrets.json: names and integrations, names and keys; tokens and secret values never leave
Browser profilesbrowser_profiles.json: each profile and the sites it's signed in to, and who signed in; the sign-ins themselves never leave
Phone numbersthe call that gives the PIN and account details to port each number to another carrier
Domainsthe call that gives the code to transfer each domain to another registrar

Each ExportItem has a kind, the name of the thing, and a detail saying where it is in the zip and what to do with it. The zip's README.md says the same for a person, and its manifest.json for code.

A transfer PIN or a domain's transfer code moves the number or the domain to whoever holds it, so neither goes in a bundle, whose link can be passed on: phone_number.transfer_out() and domain.transfer_out() give them to the API key that asks.

What still needs NoClick

bundle.remaining_dependencies lists what keeps running on NoClick as long as the user does: the agent runtime, channels, people's pending asks, app hosting and connections, whichever apply. An export gives you the data, not a running copy, so plan how each of these is replaced before the user goes.

print("Still on NoClick:", ", ".join(bundle.remaining_dependencies))

Export, then delete

To give a user their data and then remove them, delete with export=True:

user = noclick.User.from_id("user_42")
bundle = user.delete(export=True).wait()

The user is deleted only once the bundle is stored, and the bundle stays downloadable after. If the export fails or is canceled, nothing is deleted. Only a call acting for the account deletes users.

Export one thing

A database, a bucket, a volume, a dict, a queue, a repo or an app exports on its own the same way, with the same kind of bundle:

db = noclick.Database.from_name("booking-db")
bundle = db.export().wait()
print(bundle.url)   # the SQL dump, zipped

See Databases, Storage, Volumes, Dicts, Queues, Repos and Apps. A repo can also be copied whole into a new GitHub repository with export_to_github.

Limits and billing

LimitValue
The zip's link7 days; export again for a fresh one
Exports of one user or one thingone at a time
Exports in an account10 at a time
One bundle1 TB

Starting a second export of the same user or thing raises noclick.Conflict naming the running one (operation_id); an eleventh at once in the account raises noclick.QuotaExceeded. Exports are free. Exporting a Postgres database wakes it, and its compute is billed as any use is.

See also Users and the reference for User.export.