Expand description
Agents export (POST /api/v1/agent/export): one agent saved as a portable archive file (.abf, kind agent):
its definition, Personal Memory and conversation in the history store’s compact form (SPEC_MOVE_AN_AGENT_TO_ANOTHER_COMPUTER
section 4, step A of the build). The file is written as a stream, never held in memory and never base64.
Who may ask: the agent itself, or the agent that leads it (its seat’s lead). Another agent’s conversation is
its own to share (conversation_visibility), so no other agent is let read it through here. Where the file goes:
under the caller’s own working folder, never over an existing file, and never outside it by .. or a link. A
container agent has no host folder to write to; its export arrives with the container step of the build.
Each export, and each refusal, is recorded in the audit log under the calling agent.
Structs§
- Export
Request 🔒 - Hand
Over 🔒Claim - Held for the length of one hand-over; dropping it lets the next begin.
Constants§
- AUDIT_
ACTION 🔒 - The audit entry’s action.
- EXTENSION 🔒
- The extension of an agent archive.
- TEARDOWN_
WAIT 🔒 - How long a stopped agent is given to finish shutting down before the export is refused.
Statics§
- HAND_
OVERS_ 🔒IN_ FLIGHT - The agents a hand-over is under way for in this srv: a second one for the same agent would put back a mark the first had already settled, so it is refused while the first runs.
Functions§
- audit 🔒
- claim_
hand_ 🔒over - hand_
over_ 🔒in_ flight - Whether a hand-over of agent
uidis under way in this srv:bring_backwaits for it rather than clear the mark under it. - handle_
agent_ 🔒export - parse_
include 🔒 - plain 🔒
- The path without the
\?\prefix a canonical Windows path carries, which nothing a person reads should show. - quiesce 🔒
- raise_
fence 🔒 - A move by file marks the agent handed over first, then stops it through the normal stop path, so nothing can start it or reach a live process between the stop and the file, and nothing writes to its conversation after the file is made. Returns the mark it had before, to put back if the export fails. A refusal puts it back too.
- refuse_
if_ 🔒shutdown_ unconfirmable - This build can confirm that a stopped agent has finished shutting down only for the controller most agents run on. An agent in a pane with another kind of controller (ACP, App Server, a plain subprocess) stops asynchronously with nothing to wait on, so a file made right after could lack its last output: refused until those controllers report it.
- resolve_
input 🔒 - The archive to read:
fileunderbase(relative, or absolute inside it), an existing regular.abffile, reached by no..and no link that leavesbase. The same folderAgents exportwrites to, so a file an agent or the person put there is the one it imports. - resolve_
output 🔒 - The file to write:
tounderbase(relative, or absolute inside it), orexports/<default_name>there. Never an existing file, never a name with.., never through a link that leavesbase. - run 🔒
- run_as 🔒
- wait_
for_ 🔒teardown - Waits until no pane of this process holds agent
uid’s lease, which its process releases as the last step of its teardown. - write_
archive 🔒 - Builds and writes the file: under the caller’s working folder, from a frozen read of the agent’s stores.