aanet_append_file
Append one entry to a file without touching what's already there, creating the file if it doesn't exist yet — use aanet_write_file instead when you need to replace the whole file. Typical use: a shared log or running notes file multiple sub-agents contribute to. Fires a file_write webhook event on success. Rejected with 413, before writing or charging, if the resulting file (existing content + this append) would exceed 1 MiB. Accepts the same fence guard as aanet_write_file. Returns {path, appended, etag}.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Virtual file path within the workspace. | |
| fence | No | Fencing token returned by aanet_acquire_lock/aanet_renew_lock. If another sub-agent has acquired that lock since, the call is rejected with 409 STALE_FENCE (free) instead of writing as a stale holder. Omit for an unguarded write. | |
| stamp | No | Same attribution-comment option as on aanet_write_file, applied to this appended entry. | |
| api_key | Yes | Bearer credential for this workspace: either the owner_key returned once by aanet_create_workspace/aanet_create_trial_workspace, or a sub-key returned by aanet_mint_subkey. Sent under the hood as `Authorization: Bearer <api_key>`. Owner-only tools reject a sub-key with a 403. | |
| content | Yes | Text to append as a new entry — the existing content is kept. | |
| if_match | No | The file's current etag, for the same conflict-detection purpose as on aanet_write_file. | |
| fence_lock | No | Name of the lock the fence belongs to; defaults to the file path itself. Needs fence. | |
| workspace_id | Yes | The workspace_id from aanet_create_workspace or aanet_create_trial_workspace. | |
| idempotency_key | No | Optional retry-safety token (any unique string, e.g. a UUID). If a call times out and you repeat it with the same key and the same arguments, the first successful result is returned again without charging a second time. Keys are remembered for 24 hours, per sub-key. Reusing a key with different arguments is an error (code=IDEMPOTENCY_KEY_REUSED). |