Update Workspace
update_workspaceUse this for structured data. To add an agent-specific operational learning, call
append_learning instead.
The app reads inputs: excluded, mailbox, entity_type, discovery_mode, watcher_context, content_calendar, destination; outputs: ideas, drafts, published, digests, insights. Values there must fit the app's shape (a rejected write shows it); for your own data, use another key.
operation='read': Name section and key to get back just that entry; section alone returns that section; neither returns the full workspace ({inputs, outputs}). An entry that was never written comes back as an empty section. The full form re-sends every entry, so name the entry when you know which one you want. operation='update': Requires section, key, and a non-null value. Sets workspace[section][key] = value. operation='append': Requires section, key, and a LIST value. Atomically extends the existing list at workspace[section][key] with value's items (creating it if absent). Use this to accumulate into a list — a digest entry, new calendar topics, freshly-created draft records — without reading, concatenating, and rewriting the whole array yourself (which races other writers). Errors if the current value isn't a list (use 'update' to replace it). operation='delete': Requires section and key. ALWAYS confirm with the user before calling — this is destructive. Shape depends on the operation. On read, {'success': True, 'agent_id': ..., 'workspace': {'inputs': {...}, 'outputs': {...}}}, with 'workspace' holding only the section — or only the one section/key entry — you named. On update or delete, {'success': True, 'agent_id': ..., 'workspace_keys': {'inputs': [...], 'outputs': [...]}}
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| key | No | The key to set, extend, or delete (required for update/append/delete; optional narrowing for read, where it also needs section) | |
| value | No | Value to store (required for update; must not be None — use operation='delete' to remove a key). Name any outside resource a run reads (a Google Sheet, doc, file, URL) by the identifier its tool takes (the spreadsheet ID and tab, the URL), not only by its title — a later run doesn't see this chat. For append, a list of items to add to the existing list. | |
| section | No | Which workspace section — 'inputs' or 'outputs' (required for update/append/delete; optional narrowing for read) | |
| agent_id | Yes | ID of the agent | |
| operation | Yes | 'read', 'update', 'append', or 'delete' |