{"server":{"name":"Algomo","version":"1.0.0"},"tools":[{"name":"algomo_read","title":"Read Algomo workspace","description":"Reads from the Algomo workspace API and never changes anything: workspace configuration (chatbots, workflows, custom agents, cards, knowledge-base pages, connectors, connections), edit sessions with their diffs and validation, customer and test conversations, past workflow runs and node caches, tasks, onboarding status, dashboard links, recipes, and the pages and API traffic captured by a paired browser. Takes the shared request: { \"op\": \"<name>\", ... }, or a batch of ops. { \"op\": \"schema\" } lists every operation with its tool; { \"op\": \"schema\", \"target\": { \"op\": \"<name>\" } } gives one operation's input and output schemas; info:overview and info:entity describe the product and its entity types.","annotations":{"readOnlyHint":true,"destructiveHint":false},"ops":["session:get","session:list","session:validate","session:diff","entity:get","entity:list","info:me","info:overview","info:entity","chatbot:getInstallation","chat:listThreads","chat:getMessages","workflow:get","workflow:list","workflow:listRuns","workflow:getRun","workflow:listNodeDefinitions","workflow:getNodeDefinition","workflow:validate","workflow:listNodeCache","connection:list","connection:get","connection:listForField","agent:list","agent:get","browser:info","browser:listSessions","browser:listTabs","browser:getCaptures","browser:screenshot","task:list","task:get","settings:getMessenger","setup:status","setup:getSpec","setup:getPlan","recipe:list","recipe:get","link:get","testCase:getBatch","testCase:listBatches","testCase:listRuns","testCase:getRun","testCase:passRates","schema"]},{"name":"algomo_edit","title":"Stage changes in Algomo","description":"Creates and changes Algomo workspace configuration. Entity, custom agent and workflow changes are staged in an edit session and are not live until the session is saved with algomo_publish; this tool also opens and duplicates sessions, applies recipe templates into a session, and clears workflow node caches. Messenger settings, tasks and onboarding answers are workspace metadata and take effect immediately. Takes the shared request: { \"op\": \"<name>\", ... }, or a batch of ops.","annotations":{"readOnlyHint":false,"destructiveHint":false},"ops":["session:create","session:duplicate","entity:create","entity:update","entity:delete","entity:refresh","entity:pushItem","entity:deleteItem","entity:updateItem","entity:moveItem","workflow:create","workflow:update","workflow:delete","workflow:addNode","workflow:removeNodeCacheEntry","workflow:clearNodeCache","workflow:removeNode","workflow:updateNode","workflow:replaceTrigger","workflow:replaceNode","workflow:addPath","workflow:removePath","workflow:addLane","workflow:removeLane","workflow:updateConditions","agent:create","agent:update","agent:delete","task:complete","task:dismiss","task:completeSubtask","task:skipSubtask","settings:updateMessenger","setup:answerSpec","setup:waiveBrowserEvidence","setup:waiveWebsiteAccess","setup:submitPlan","recipe:apply"]},{"name":"algomo_publish","title":"Publish or discard an Algomo edit session","description":"Saves an Algomo edit session, making every change staged in it live in the workspace, or discards it, deleting the staged changes. session:save with dryRun: true reports validation errors and version conflicts without saving. Saving is irreversible; a save refused for conflicts leaves the session intact. Takes the shared request: { \"op\": \"<name>\", ... }, or a batch of ops.","annotations":{"readOnlyHint":false,"destructiveHint":true},"ops":["session:save","session:discard"]},{"name":"algomo_run","title":"Run Algomo workflows, agents and browser actions","description":"Executes operations with effects outside the Algomo workspace: runs a workflow and returns its trace, runs a custom agent, sends a test message to a chatbot and returns its reply (recorded as a test conversation), verifies the chatbot's website access by running its tools against the site, and drives the user's paired browser extension to fetch a URL with their cookies, run a script in a page, or navigate a tab. Workflow and agent runs may send emails or messages as the workflow defines. Takes the shared request: { \"op\": \"<name>\", ... }, or a batch of ops.","annotations":{"readOnlyHint":false,"destructiveHint":true,"openWorldHint":true},"ops":["chat:generateTestReply","workflow:run","agent:run","browser:runScript","browser:request","browser:navigate","setup:verifyWebsiteAccess","testCase:run","testCase:runBatch"]}],"ops":[{"op":"session:create","tool":"algomo_edit","description":"Create a new empty edit session with the given name. Returns the session ID.","gated":true,"input":{"type":"object","properties":{"op":{"type":"string","const":"session:create"},"name":{"type":"string","minLength":1,"maxLength":80,"description":"Short human-readable session name shown to users reviewing the staged changes, e.g. \"Add refund-policy goal\"."}},"required":["op","name"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"output":{"type":"object","properties":{"sessionId":{"type":"string"}},"required":["sessionId"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}},{"op":"session:duplicate","tool":"algomo_edit","description":"Duplicate an existing edit session under a new name: the new session starts with a copy of all staged changes, and the source session is left untouched. Returns the new session ID.","gated":true,"input":{"type":"object","properties":{"op":{"type":"string","const":"session:duplicate"},"sessionId":{"type":"string","description":"ID of the session to duplicate."},"name":{"type":"string","minLength":1,"maxLength":80,"description":"Short human-readable name for the new session, e.g. \"Add refund-policy goal (variant B)\"."}},"required":["op","sessionId","name"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"output":{"type":"object","properties":{"sessionId":{"type":"string"}},"required":["sessionId"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}},{"op":"session:get","tool":"algomo_read","description":"Get a session by ID, including all tracked entities and their current state.","input":{"type":"object","properties":{"op":{"type":"string","const":"session:get"},"sessionId":{"type":"string"}},"required":["op","sessionId"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"output":{"type":"object","properties":{"sessionId":{"type":"string"},"entities":{"type":"array","items":{"type":"object","properties":{"entityType":{"type":"string","enum":["chatbot","page","conversionRule","cardDefinition","bookingCalendar","connector","testCase","wikiPage","wikiFolder","workflow","connection","secret","agent","task"]},"entityId":{"type":"string"},"data":{"type":"object","additionalProperties":{}},"operation":{"type":"string","enum":["create","update","delete","unchanged"]},"localErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}},"diff":{"type":"array","items":{"type":"object","properties":{"path":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"key"},"key":{"type":"string"}},"required":["kind","key"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"member"},"key":{"type":"string"}},"required":["kind","key"],"additionalProperties":false}]}},"op":{"type":"string","enum":["add","remove","replace","move"]},"before":{},"after":{},"fromIndex":{"type":"integer"},"toIndex":{"type":"integer"}},"required":["path","op"],"additionalProperties":false}}},"required":["entityType","entityId","data","operation","localErrors"],"additionalProperties":false}}},"required":["sessionId","entities"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}},{"op":"session:list","tool":"algomo_read","description":"List all active edit sessions.","input":{"type":"object","properties":{"op":{"type":"string","const":"session:list"}},"required":["op"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"output":{"type":"object","properties":{"sessions":{"type":"array","items":{"type":"object","properties":{"sessionId":{"type":"string"},"name":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"createdBy":{"type":"object","properties":{"kind":{"type":"string","enum":["user","agent"]},"userId":{"type":"string"}},"required":["kind","userId"],"additionalProperties":false},"adminKey":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},{"type":"null"}]},"entityCount":{"type":"number"}},"required":["sessionId","name","createdAt","updatedAt","createdBy","adminKey","entityCount"],"additionalProperties":false}}},"required":["sessions"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}},{"op":"session:validate","tool":"algomo_read","description":"Run full validation on the session: entity local validation, cross-entity global checks, and cascade rules.","input":{"type":"object","properties":{"op":{"type":"string","const":"session:validate"},"sessionId":{"type":"string"}},"required":["op","sessionId"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"output":{"type":"object","properties":{"valid":{"type":"boolean"},"localErrors":{"type":"object","additionalProperties":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"globalErrors":{"type":"array","items":{"type":"object","properties":{"entityType":{"type":"string"},"entityId":{"type":"string"},"field":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}},"cascadeChanges":{"type":"object","properties":{"created":{"type":"array","items":{"type":"object","properties":{"entityType":{"type":"string","enum":["chatbot","page","conversionRule","cardDefinition","bookingCalendar","connector","testCase","wikiPage","wikiFolder","workflow","connection","secret","agent","task"]},"entityId":{"type":"string"},"data":{"type":"object","additionalProperties":{}},"operation":{"type":"string","enum":["create","update","delete","unchanged"]},"localErrors":{"type":"array","items":{"$ref":"#/properties/localErrors/additionalProperties/items"}},"diff":{"type":"array","items":{"type":"object","properties":{"path":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"key"},"key":{"type":"string"}},"required":["kind","key"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"member"},"key":{"type":"string"}},"required":["kind","key"],"additionalProperties":false}]}},"op":{"type":"string","enum":["add","remove","replace","move"]},"before":{},"after":{},"fromIndex":{"type":"integer"},"toIndex":{"type":"integer"}},"required":["path","op"],"additionalProperties":false}}},"required":["entityType","entityId","data","operation","localErrors"],"additionalProperties":false}},"updated":{"type":"array","items":{"$ref":"#/properties/cascadeChanges/properties/created/items"}},"deleted":{"type":"array","items":{"$ref":"#/properties/cascadeChanges/properties/created/items"}}},"required":["created","updated","deleted"],"additionalProperties":false}},"required":["valid","localErrors","globalErrors","cascadeChanges"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}},{"op":"session:save","tool":"algomo_publish","description":"Validate and save all session changes to the database in a single transaction. Supports dryRun mode to check validation and version conflicts without persisting. On success, the session is destroyed. Get your user's go-ahead before saving — asked in product terms (what the chatbot will now do, e.g. \"I'll make the greeting live on your homepage — ok?\"), never as internals: no 'session', 'save', op names, or ids in front of them.","gated":true,"input":{"type":"object","properties":{"op":{"type":"string","const":"session:save"},"sessionId":{"type":"string"},"dryRun":{"type":"boolean","default":false},"confirmImpersonatedSave":{"type":"boolean"}},"required":["op","sessionId"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"output":{"anyOf":[{"type":"object","properties":{"ok":{"type":"boolean","const":true}},"required":["ok"],"additionalProperties":false},{"type":"object","properties":{"ok":{"type":"boolean","const":false},"localErrors":{"type":"object","additionalProperties":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"globalErrors":{"type":"array","items":{"type":"object","properties":{"entityType":{"type":"string"},"entityId":{"type":"string"},"field":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}},"conflicts":{"type":"array","items":{"type":"object","properties":{"entityType":{"type":"string"},"entityId":{"type":"string"},"baseVersion":{"type":"number"},"currentVersion":{"type":"number"}},"required":["entityType","entityId","baseVersion","currentVersion"],"additionalProperties":false}}},"required":["ok"],"additionalProperties":false}],"$schema":"http://json-schema.org/draft-07/schema#"}},{"op":"session:discard","tool":"algomo_publish","description":"Discard an edit session, throwing away all unsaved changes.","input":{"type":"object","properties":{"op":{"type":"string","const":"session:discard"},"sessionId":{"type":"string"}},"required":["op","sessionId"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"output":{"type":"object","properties":{"ok":{"type":"boolean","const":true}},"required":["ok"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}},{"op":"session:diff","tool":"algomo_read","description":"Get a summary of all changes in the session: created, updated, and deleted entities, including cascade changes. Updated entities include a `diff` of field-level changes (add/remove/replace/move ops) from the persisted baseline.","input":{"type":"object","properties":{"op":{"type":"string","const":"session:diff"},"sessionId":{"type":"string"}},"required":["op","sessionId"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"output":{"type":"object","properties":{"hasChanges":{"type":"boolean"},"created":{"type":"array","items":{"type":"object","properties":{"entityType":{"type":"string","enum":["chatbot","page","conversionRule","cardDefinition","bookingCalendar","connector","testCase","wikiPage","wikiFolder","workflow","connection","secret","agent","task"]},"entityId":{"type":"string"},"data":{"type":"object","additionalProperties":{}},"operation":{"type":"string","enum":["create","update","delete","unchanged"]},"localErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}},"diff":{"type":"array","items":{"type":"object","properties":{"path":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"key"},"key":{"type":"string"}},"required":["kind","key"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"member"},"key":{"type":"string"}},"required":["kind","key"],"additionalProperties":false}]}},"op":{"type":"string","enum":["add","remove","replace","move"]},"before":{},"after":{},"fromIndex":{"type":"integer"},"toIndex":{"type":"integer"}},"required":["path","op"],"additionalProperties":false}}},"required":["entityType","entityId","data","operation","localErrors"],"additionalProperties":false}},"updated":{"type":"array","items":{"$ref":"#/properties/created/items"}},"deleted":{"type":"array","items":{"$ref":"#/properties/created/items"}},"cascadeChanges":{"type":"object","properties":{"created":{"type":"array","items":{"$ref":"#/properties/created/items"}},"updated":{"type":"array","items":{"$ref":"#/properties/created/items"}},"deleted":{"type":"array","items":{"$ref":"#/properties/created/items"}}},"required":["created","updated","deleted"],"additionalProperties":false},"summary":{"type":"string"}},"required":["hasChanges","created","updated","deleted","cascadeChanges","summary"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}},{"op":"entity:create","tool":"algomo_edit","description":"Create a new entity in the session. The system generates the ID. Returns the new entity ID and any validation errors.","gated":true,"entityTypes":["chatbot","page","conversionRule","cardDefinition","bookingCalendar","connector","testCase","wikiPage","wikiFolder"],"input":{"type":"object","properties":{"op":{"type":"string","const":"entity:create"},"sessionId":{"type":"string"},"entityType":{"type":"string","enum":["chatbot","page","conversionRule","cardDefinition","bookingCalendar","connector","testCase","wikiPage","wikiFolder"]},"params":{"type":"object","additionalProperties":{}}},"required":["op","sessionId","entityType","params"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"output":{"type":"object","properties":{"entityId":{"type":"string"},"localErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["entityId","localErrors"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}},{"op":"entity:get","tool":"algomo_read","description":"Get a single entity by type and ID. Without a sessionId, loads from the database. With a sessionId, includes unsaved changes. Some types accept an alternate selector via `params` instead of entityId: wikiPage takes `{ path: \"folder-slug/page-slug\" }`, wikiFolder takes `{ slug }`.","entityTypes":["chatbot","page","conversionRule","cardDefinition","bookingCalendar","connector","testCase","wikiPage","wikiFolder"],"input":{"type":"object","properties":{"op":{"type":"string","const":"entity:get"},"sessionId":{"type":"string"},"entityType":{"type":"string","enum":["chatbot","page","conversionRule","cardDefinition","bookingCalendar","connector","testCase","wikiPage","wikiFolder"]},"entityId":{"type":"string"},"params":{"type":"object","additionalProperties":{}}},"required":["op","entityType"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"output":{"type":"object","additionalProperties":{},"$schema":"http://json-schema.org/draft-07/schema#"}},{"op":"entity:list","tool":"algomo_read","description":"List entities by type. Without a sessionId, lists saved entities from the database. With a sessionId, includes unsaved changes. wikiPage rows are metadata summaries (path, folder, title, summary, keywords, section headings) without content — use entity:get for the full page, and filter with `{ folder: \"folder-slug\" }`.","entityTypes":["chatbot","page","conversionRule","cardDefinition","bookingCalendar","connector","testCase","wikiPage","wikiFolder"],"input":{"type":"object","properties":{"op":{"type":"string","const":"entity:list"},"sessionId":{"type":"string"},"entityType":{"type":"string","enum":["chatbot","page","conversionRule","cardDefinition","bookingCalendar","connector","testCase","wikiPage","wikiFolder"]},"params":{"type":"object","additionalProperties":{}}},"required":["op","entityType"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"output":{"type":"object","properties":{"entities":{"type":"array","items":{"type":"object","additionalProperties":{}}}},"required":["entities"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}},{"op":"entity:update","tool":"algomo_edit","description":"Update an entity in the session. Provide only the fields you want to change. Auto-loads from the database if not already in the session. Returns the change diff (same op format as session:diff) and validation errors; call entity:get when you need the full normalized entity.","gated":true,"entityTypes":["chatbot","page","conversionRule","cardDefinition","bookingCalendar","connector","testCase","wikiPage","wikiFolder"],"input":{"type":"object","properties":{"op":{"type":"string","const":"entity:update"},"sessionId":{"type":"string"},"entityType":{"type":"string","enum":["chatbot","page","conversionRule","cardDefinition","bookingCalendar","connector","testCase","wikiPage","wikiFolder"]},"entityId":{"type":"string"},"params":{"type":"object","additionalProperties":{}}},"required":["op","sessionId","entityType","entityId","params"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"output":{"type":"object","properties":{"diff":{"type":"array","items":{"type":"object","properties":{"path":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"key"},"key":{"type":"string"}},"required":["kind","key"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"member"},"key":{"type":"string"}},"required":["kind","key"],"additionalProperties":false}]}},"op":{"type":"string","enum":["add","remove","replace","move"]},"before":{},"after":{},"fromIndex":{"type":"integer"},"toIndex":{"type":"integer"}},"required":["path","op"],"additionalProperties":false}},"localErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}},"cascaded":{"type":"array","items":{"type":"object","properties":{"entityType":{"type":"string","enum":["chatbot","page","conversionRule","cardDefinition","bookingCalendar","connector","testCase","wikiPage","wikiFolder"]},"entityId":{"type":"string"}},"required":["entityType","entityId"],"additionalProperties":false},"description":"Other entities this update also changed via cascade (e.g. pages whose wiki: links a rename rewrote); fetch with entity:get"}},"required":["diff","localErrors"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}},{"op":"entity:delete","tool":"algomo_edit","description":"Mark an entity for deletion in the session. The entity will be deleted from the database when the session is saved.","gated":true,"entityTypes":["chatbot","page","conversionRule","cardDefinition","bookingCalendar","connector","testCase","wikiPage","wikiFolder"],"input":{"type":"object","properties":{"op":{"type":"string","const":"entity:delete"},"sessionId":{"type":"string"},"entityType":{"type":"string","enum":["chatbot","page","conversionRule","cardDefinition","bookingCalendar","connector","testCase","wikiPage","wikiFolder"]},"entityId":{"type":"string"}},"required":["op","sessionId","entityType","entityId"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"output":{"type":"object","properties":{"ok":{"type":"boolean","const":true}},"required":["ok"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}},{"op":"entity:refresh","tool":"algomo_edit","description":"Reload an entity from the database into the session, returning the fresh state and the agent's previous pending changes. Use after a save conflict.","entityTypes":["chatbot","page","conversionRule","cardDefinition","bookingCalendar","connector","testCase","wikiPage","wikiFolder"],"input":{"type":"object","properties":{"op":{"type":"string","const":"entity:refresh"},"sessionId":{"type":"string"},"entityType":{"type":"string","enum":["chatbot","page","conversionRule","cardDefinition","bookingCalendar","connector","testCase","wikiPage","wikiFolder"]},"entityId":{"type":"string"}},"required":["op","sessionId","entityType","entityId"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"output":{"type":"object","properties":{"entityType":{"type":"string","enum":["chatbot","page","conversionRule","cardDefinition","bookingCalendar","connector","testCase","wikiPage","wikiFolder","workflow","connection","secret","agent","task"]},"entityId":{"type":"string"},"data":{"type":"object","additionalProperties":{}},"operation":{"type":"string","enum":["create","update","delete","unchanged"]},"localErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}},"diff":{"type":"array","items":{"type":"object","properties":{"path":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"key"},"key":{"type":"string"}},"required":["kind","key"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"member"},"key":{"type":"string"}},"required":["kind","key"],"additionalProperties":false}]}},"op":{"type":"string","enum":["add","remove","replace","move"]},"before":{},"after":{},"fromIndex":{"type":"integer"},"toIndex":{"type":"integer"}},"required":["path","op"],"additionalProperties":false}},"baseVersion":{"type":"number"},"previousData":{"type":"object","additionalProperties":{}}},"required":["entityType","entityId","data","operation","localErrors","baseVersion","previousData"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}},{"op":"entity:pushItem","tool":"algomo_edit","description":"Append one item to a keyed collection without resending the whole array. `path` is a dotted path ending on the array (e.g. \"goals\" or \"goals.support.instructions\"). Provide the new item in `item`; omit its key to have it derived from the name. Pass `afterKey` to insert directly after an existing member instead of appending. Returns the change diff and validation errors.","gated":true,"input":{"type":"object","properties":{"op":{"type":"string","const":"entity:pushItem"},"sessionId":{"type":"string"},"entityType":{"type":"string","enum":["chatbot","page","conversionRule","cardDefinition","bookingCalendar","connector","testCase","wikiPage","wikiFolder"]},"entityId":{"type":"string"},"path":{"type":"string","description":"Dotted path ending on the array to append to (e.g. \"goals\" or \"goals.support.instructions\")."},"item":{"type":"object","additionalProperties":{},"description":"The new member. Omit its key to derive it from its name."},"afterKey":{"type":"string","description":"Insert directly after the member with this key instead of appending."}},"required":["op","sessionId","entityType","entityId","path","item"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"output":{"type":"object","properties":{"diff":{"type":"array","items":{"type":"object","properties":{"path":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"key"},"key":{"type":"string"}},"required":["kind","key"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"member"},"key":{"type":"string"}},"required":["kind","key"],"additionalProperties":false}]}},"op":{"type":"string","enum":["add","remove","replace","move"]},"before":{},"after":{},"fromIndex":{"type":"integer"},"toIndex":{"type":"integer"}},"required":["path","op"],"additionalProperties":false}},"localErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}},"cascaded":{"type":"array","items":{"type":"object","properties":{"entityType":{"type":"string","enum":["chatbot","page","conversionRule","cardDefinition","bookingCalendar","connector","testCase","wikiPage","wikiFolder"]},"entityId":{"type":"string"}},"required":["entityType","entityId"],"additionalProperties":false},"description":"Other entities this update also changed via cascade (e.g. pages whose wiki: links a rename rewrote); fetch with entity:get"}},"required":["diff","localErrors"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}},{"op":"entity:deleteItem","tool":"algomo_edit","description":"Remove one item from a keyed collection without resending the whole array. `path` is a dotted path ending on the member (e.g. \"goals.support\" or \"goals.support.instructions.intro\"). Returns the change diff and validation errors; emptying a collection that requires members surfaces as a localError rather than failing.","gated":true,"input":{"type":"object","properties":{"op":{"type":"string","const":"entity:deleteItem"},"sessionId":{"type":"string"},"entityType":{"type":"string","enum":["chatbot","page","conversionRule","cardDefinition","bookingCalendar","connector","testCase","wikiPage","wikiFolder"]},"entityId":{"type":"string"},"path":{"type":"string","description":"Dotted path ending on the member to remove (e.g. \"goals.support\" or \"goals.support.instructions.intro\")."}},"required":["op","sessionId","entityType","entityId","path"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"output":{"type":"object","properties":{"diff":{"type":"array","items":{"type":"object","properties":{"path":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"key"},"key":{"type":"string"}},"required":["kind","key"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"member"},"key":{"type":"string"}},"required":["kind","key"],"additionalProperties":false}]}},"op":{"type":"string","enum":["add","remove","replace","move"]},"before":{},"after":{},"fromIndex":{"type":"integer"},"toIndex":{"type":"integer"}},"required":["path","op"],"additionalProperties":false}},"localErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}},"cascaded":{"type":"array","items":{"type":"object","properties":{"entityType":{"type":"string","enum":["chatbot","page","conversionRule","cardDefinition","bookingCalendar","connector","testCase","wikiPage","wikiFolder"]},"entityId":{"type":"string"}},"required":["entityType","entityId"],"additionalProperties":false},"description":"Other entities this update also changed via cascade (e.g. pages whose wiki: links a rename rewrote); fetch with entity:get"}},"required":["diff","localErrors"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}},{"op":"entity:updateItem","tool":"algomo_edit","description":"Shallow-merge a patch into one item of a keyed collection without resending the whole array. `path` is a dotted path ending on the member (e.g. \"goals.support\"). Only the fields in `patch` change; the member keeps its key (do not rename a key — it orphans bound data). Reconciling cross-member invariants is the caller's responsibility. Returns the change diff and validation errors.","gated":true,"input":{"type":"object","properties":{"op":{"type":"string","const":"entity:updateItem"},"sessionId":{"type":"string"},"entityType":{"type":"string","enum":["chatbot","page","conversionRule","cardDefinition","bookingCalendar","connector","testCase","wikiPage","wikiFolder"]},"entityId":{"type":"string"},"path":{"type":"string","description":"Dotted path ending on the member to patch (e.g. \"goals.support\")."},"patch":{"type":"object","additionalProperties":{},"description":"Fields to shallow-merge into the member; its key is preserved."}},"required":["op","sessionId","entityType","entityId","path","patch"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"output":{"type":"object","properties":{"diff":{"type":"array","items":{"type":"object","properties":{"path":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"key"},"key":{"type":"string"}},"required":["kind","key"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"member"},"key":{"type":"string"}},"required":["kind","key"],"additionalProperties":false}]}},"op":{"type":"string","enum":["add","remove","replace","move"]},"before":{},"after":{},"fromIndex":{"type":"integer"},"toIndex":{"type":"integer"}},"required":["path","op"],"additionalProperties":false}},"localErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}},"cascaded":{"type":"array","items":{"type":"object","properties":{"entityType":{"type":"string","enum":["chatbot","page","conversionRule","cardDefinition","bookingCalendar","connector","testCase","wikiPage","wikiFolder"]},"entityId":{"type":"string"}},"required":["entityType","entityId"],"additionalProperties":false},"description":"Other entities this update also changed via cascade (e.g. pages whose wiki: links a rename rewrote); fetch with entity:get"}},"required":["diff","localErrors"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}},{"op":"entity:moveItem","tool":"algomo_edit","description":"Move one item of a keyed collection to a new position without resending the whole array — only meaningful for ordered collections. `path` is a dotted path ending on the member (e.g. \"instructions.pricing\"); `afterKey` is the key of the member to place it directly after, or null to move it to the front. Returns the change diff and validation errors.","gated":true,"input":{"type":"object","properties":{"op":{"type":"string","const":"entity:moveItem"},"sessionId":{"type":"string"},"entityType":{"type":"string","enum":["chatbot","page","conversionRule","cardDefinition","bookingCalendar","connector","testCase","wikiPage","wikiFolder"]},"entityId":{"type":"string"},"path":{"type":"string","description":"Dotted path ending on the member to move (e.g. \"instructions.pricing\")."},"afterKey":{"type":["string","null"],"description":"Key of the member to place it directly after; null moves it to the front."}},"required":["op","sessionId","entityType","entityId","path","afterKey"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"output":{"type":"object","properties":{"diff":{"type":"array","items":{"type":"object","properties":{"path":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"key"},"key":{"type":"string"}},"required":["kind","key"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"member"},"key":{"type":"string"}},"required":["kind","key"],"additionalProperties":false}]}},"op":{"type":"string","enum":["add","remove","replace","move"]},"before":{},"after":{},"fromIndex":{"type":"integer"},"toIndex":{"type":"integer"}},"required":["path","op"],"additionalProperties":false}},"localErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}},"cascaded":{"type":"array","items":{"type":"object","properties":{"entityType":{"type":"string","enum":["chatbot","page","conversionRule","cardDefinition","bookingCalendar","connector","testCase","wikiPage","wikiFolder"]},"entityId":{"type":"string"}},"required":["entityType","entityId"],"additionalProperties":false},"description":"Other entities this update also changed via cascade (e.g. pages whose wiki: links a rename rewrote); fetch with entity:get"}},"required":["diff","localErrors"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}},{"op":"info:me","tool":"algomo_read","description":"Returns the authenticated user's identity, active org context, and org settings (company description, brand standards).","input":{"type":"object","properties":{"op":{"type":"string","const":"info:me"}},"required":["op"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"output":{"type":"object","properties":{"userId":{"type":"string"},"name":{"type":["string","null"]},"email":{"type":"string"},"avatar":{"type":["string","null"]},"orgId":{"type":"string"},"orgName":{"type":"string"},"companyDescription":{"type":["string","null"]},"brandStandards":{"type":["string","null"]}},"required":["userId","name","email","avatar","orgId","orgName","companyDescription","brandStandards"],"additionalProperties":true,"$schema":"http://json-schema.org/draft-07/schema#"}},{"op":"info:overview","tool":"algomo_read","description":"Returns a product overview and a lightweight list of all entity types. Use info:entity for detailed information about a specific entity type.","input":{"type":"object","properties":{"op":{"type":"string","const":"info:overview"}},"required":["op"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"output":{"type":"object","properties":{"overview":{"type":"string"},"entities":{"type":"array","items":{"type":"object","properties":{"entityType":{"type":"string","enum":["chatbot","page","conversionRule","cardDefinition","bookingCalendar","connector","testCase","wikiPage","wikiFolder","workflow","connection","secret","agent","task"]},"summary":{"type":"string"}},"required":["entityType","summary"],"additionalProperties":false}}},"required":["overview","entities"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}},{"op":"info:entity","tool":"algomo_read","description":"Returns detailed information about a specific entity type: full description and relationships.","input":{"type":"object","properties":{"op":{"type":"string","const":"info:entity"},"entityType":{"type":"string","enum":["chatbot","page","conversionRule","cardDefinition","bookingCalendar","connector","testCase","wikiPage","wikiFolder","workflow","connection","secret","agent","task"]}},"required":["op","entityType"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"output":{"type":"object","properties":{"entityType":{"type":"string","enum":["chatbot","page","conversionRule","cardDefinition","bookingCalendar","connector","testCase","wikiPage","wikiFolder","workflow","connection","secret","agent","task"]},"summary":{"type":"string"},"description":{"type":"string"},"relationships":{"type":"array","items":{"type":"string"}},"models":{"type":"array","items":{"type":"object","properties":{"provider":{"type":"string","enum":["anthropic","google","mistralai","openai"]},"id":{"type":"string"},"label":{"type":"string"},"supportsReasoning":{"type":"boolean"}},"required":["provider","id","label","supportsReasoning"],"additionalProperties":false}}},"required":["entityType","summary","description","relationships"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}},{"op":"chatbot:getInstallation","tool":"algomo_read","description":"Get a chatbot's website install snippet — the Algomo pixel, which powers the messenger and visitor tracking. The snippet names the chatbot it serves: pages carrying it are handled by this chatbot, while pages with another chatbot's snippet are handled by that one, so a site can point different areas at different chatbots. The default chatbot also serves any page whose snippet names no chatbot. Returns the two ways to install (the site's own HTML, or a Google Tag Manager container) with the exact snippet and placement instructions for each, plus the chatbot's page where the user can copy it themselves. Installing is the go-live step, not a prerequisite for testing — the paired browser extension injects the pixel into your own browser, so a chatbot can be tried on the customer's real site before their site carries the snippet. Prefer sending them the link over pasting the snippet into chat. Read-only: putting it on the site is their change to make.","input":{"type":"object","properties":{"op":{"type":"string","const":"chatbot:getInstallation"},"chatbotId":{"type":"string"}},"required":["op","chatbotId"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"output":{"type":"object","properties":{"chatbotId":{"type":"string"},"chatbotName":{"type":"string"},"methods":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","enum":["standard","gtm"]},"label":{"type":"string"},"instructions":{"type":"string"},"snippet":{"type":"string"}},"required":["key","label","instructions","snippet"],"additionalProperties":false}},"chatbotUrl":{"type":"string"}},"required":["chatbotId","chatbotName","methods","chatbotUrl"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}},{"op":"chat:generateTestReply","tool":"algomo_run","description":"Send a test message to a chatbot and get its response. The conversation is recorded as a test thread (isTest: true in chat:listThreads), never as a real customer conversation. Tests the chatbot's saved configuration, or pass sessionId to test unsaved draft changes. If threadId is omitted, a new conversation is started. Pass back the returned threadId to continue a multi-turn conversation. Admin callers may pass modelOverride (a model-router string) and providerOptions to benchmark the reply on a different model.","input":{"type":"object","properties":{"op":{"type":"string","const":"chat:generateTestReply"},"chatbotId":{"type":"string"},"sessionId":{"type":"string"},"message":{"type":"string","minLength":1},"threadId":{"type":"string"},"modelOverride":{"type":"string"},"providerOptions":{"type":"object","additionalProperties":{"type":"object","additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"array","items":{"$ref":"#/properties/providerOptions/additionalProperties/additionalProperties"}},{"type":"object","additionalProperties":{"$ref":"#/properties/providerOptions/additionalProperties/additionalProperties"}}]}}}},"required":["op","chatbotId","message"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"output":{"type":"object","properties":{"response":{"type":"string"},"threadId":{"type":"string"},"conversationUrl":{"type":"string"},"toolCalls":{"type":"array","items":{"type":"object","properties":{"tool":{"type":"string"},"args":{},"result":{}},"additionalProperties":false}},"summary":{"type":"string"}},"required":["response","threadId","conversationUrl","summary"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}},{"op":"chat:listThreads","tool":"algomo_read","description":"List conversation threads — real customer conversations and test threads. Filter by chatbotId (omit to list across all chatbots), visitorId, isTest (true = test only, false = real only, omit = both), humanTakeover, closed, and createdAt/updatedAt date ranges. Threads where the visitor never sent a message are excluded unless includeThreadsWithNoUserMessages is true; threads judged spam, abuse or gibberish after closing are excluded unless includeSpam is true. Each thread includes the visitor's name and a last-message preview; use chat:getMessages to read a thread.","input":{"type":"object","properties":{"op":{"type":"string","const":"chat:listThreads"},"chatbotId":{"type":"string","description":"Omit to list threads across all chatbots in the org"},"visitorId":{"type":"string"},"isTest":{"type":"boolean","description":"true = test threads only, false = real customer threads only, omit = both"},"includeThreadsWithNoUserMessages":{"type":"boolean","default":false,"description":"Also return threads where the visitor never sent a message (e.g. widget opened, greeting shown, no reply)"},"humanTakeover":{"type":"boolean"},"closed":{"type":"boolean"},"includeSpam":{"type":"boolean","default":false,"description":"Also return threads judged spam, abuse or gibberish after closing (hidden by default; their charges were refunded)"},"createdAfter":{"type":"string","format":"date-time"},"createdBefore":{"type":"string","format":"date-time"},"updatedAfter":{"type":"string","format":"date-time"},"updatedBefore":{"type":"string","format":"date-time"},"page":{"type":"integer","minimum":0,"default":0},"perPage":{"type":"integer","minimum":1,"maximum":50,"default":10},"sortBy":{"type":"string","enum":["createdAt","updatedAt"],"default":"updatedAt"},"sortDirection":{"type":"string","enum":["ASC","DESC"],"default":"DESC"}},"required":["op"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"output":{"type":"object","properties":{"threads":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"chatbotId":{"type":"string"},"visitorId":{"type":"string"},"visitorName":{"type":"string"},"isTest":{"type":"boolean"},"humanTakeover":{"type":"boolean"},"closed":{"type":"boolean"},"closeReason":{"anyOf":[{"type":"string","enum":["inactivity","goodbye","handoff","operator","abuse","spam"]},{"type":"null"}],"description":"How a closed thread ended: goodbye (the chatbot's ordinary farewell), abuse or spam (the chatbot, after a warning; pauses the visitor's new threads with that chatbot for 24 hours), operator, handoff, or inactivity"},"verdict":{"anyOf":[{"type":"string","enum":["spam","abuse","gibberish","genuine","skipped"]},{"type":"null"}],"description":"The post-close verdict: spam, abuse or gibberish (charges refunded), genuine, or skipped (never judged)"},"lastMessagePreview":{"type":"string"},"title":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","chatbotId","visitorId","isTest","humanTakeover","closed","closeReason","verdict","createdAt","updatedAt"],"additionalProperties":false}},"total":{"type":"number","description":"Total threads matching the filters"},"hasMore":{"type":"boolean"}},"required":["threads","total","hasMore"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}},{"op":"chat:getMessages","tool":"algomo_read","description":"Get the messages of a conversation thread — real or test. Use this to review what happened in a conversation and debug chatbot behavior.","input":{"type":"object","properties":{"op":{"type":"string","const":"chat:getMessages"},"threadId":{"type":"string"},"page":{"type":"integer","minimum":0,"default":0},"perPage":{"type":"integer","minimum":1,"maximum":100,"default":50}},"required":["op","threadId"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"output":{"type":"object","properties":{"threadId":{"type":"string"},"messages":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"role":{"type":"string","enum":["user","assistant"]},"content":{"type":"string","description":"The message text; a visitor's attachments also appear as [Image <id>: <name>] lines"},"toolCalls":{"type":"array","items":{"type":"string"}},"createdAt":{"type":"string"},"attachments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\\.(jpg|png)$"},"kind":{"type":"string","const":"image"},"mimeType":{"type":"string","enum":["image/jpeg","image/png"]},"name":{"type":"string","minLength":1,"maxLength":200},"size":{"type":"integer","minimum":0},"width":{"type":"integer","exclusiveMinimum":0},"height":{"type":"integer","exclusiveMinimum":0},"url":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]}},"required":["id","kind","mimeType","name","size","width","height","url"],"additionalProperties":false},"description":"Images the visitor attached, with signed URLs valid for a day"}},"required":["id","role","content","createdAt"],"additionalProperties":false}},"total":{"type":"number"},"hasMore":{"type":"boolean"}},"required":["threadId","messages","total","hasMore"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}},{"op":"workflow:get","tool":"algomo_read","description":"Get a workflow by ID.","input":{"type":"object","properties":{"op":{"type":"string","const":"workflow:get"},"workflowId":{"type":"string"},"sessionId":{"type":"string"}},"required":["op","workflowId"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"output":{"type":"object","properties":{"workflow":{"type":"object","properties":{"id":{"type":"string"},"orgId":{"type":"string"},"name":{"type":"string"},"status":{"type":"string","enum":["enabled","disabled"]},"workflowType":{"type":"string","enum":["workflow","tool","chatbot","card"]},"definition":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string"},"version":{"type":"number"},"displayName":{"type":"string"},"valid":{"type":"boolean"},"inputs":{"type":"object","additionalProperties":{}},"inputFields":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","pattern":"^[a-zA-Z_][a-zA-Z0-9_]*$"},"type":{"type":"string","enum":["string","number","boolean"]},"description":{"type":"string"},"required":{"type":"boolean"},"enum":{"type":"array","items":{"type":["string","number"]}}},"required":["name","type","required"],"additionalProperties":false}},"lastUpdatedAt":{"type":"string"},"nextNode":{}},"required":["name","type","version","displayName","valid","inputs","lastUpdatedAt"],"additionalProperties":false},"variables":{"type":"object","additionalProperties":{"type":"string"},"default":{}},"createdBy":{"type":"string"},"createdAt":{"type":"string","format":"date-time"}},"required":["id","orgId","name","status","workflowType","definition","createdBy","createdAt"],"additionalProperties":false},"localErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["workflow","localErrors"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}},{"op":"workflow:list","tool":"algomo_read","description":"List all workflows for the org. Optionally filter by workflowType (workflow, tool, chatbot, card).","input":{"type":"object","properties":{"op":{"type":"string","const":"workflow:list"},"workflowType":{"type":"string","enum":["workflow","tool","chatbot","card"]}},"required":["op"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"output":{"type":"object","properties":{"workflows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"orgId":{"type":"string"},"name":{"type":"string"},"status":{"type":"string","enum":["enabled","disabled"]},"workflowType":{"type":"string","enum":["workflow","tool","chatbot","card"]},"definition":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string"},"version":{"type":"number"},"displayName":{"type":"string"},"valid":{"type":"boolean"},"inputs":{"type":"object","additionalProperties":{}},"inputFields":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","pattern":"^[a-zA-Z_][a-zA-Z0-9_]*$"},"type":{"type":"string","enum":["string","number","boolean"]},"description":{"type":"string"},"required":{"type":"boolean"},"enum":{"type":"array","items":{"type":["string","number"]}}},"required":["name","type","required"],"additionalProperties":false}},"lastUpdatedAt":{"type":"string"},"nextNode":{}},"required":["name","type","version","displayName","valid","inputs","lastUpdatedAt"],"additionalProperties":false},"variables":{"type":"object","additionalProperties":{"type":"string"},"default":{}},"createdBy":{"type":"string"},"createdAt":{"type":"string","format":"date-time"}},"required":["id","orgId","name","status","workflowType","definition","createdBy","createdAt"],"additionalProperties":false}}},"required":["workflows"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}},{"op":"workflow:create","tool":"algomo_edit","description":"Create a new workflow in the session. workflowType is immutable after creation: \"workflow\" runs on events, \"tool\" is invoked as a chatbot/agent tool, \"chatbot\" runs for chatbots that assign it (assign via the chatbot's workflowIds), \"card\" is owned by a card definition and runs at display time to fetch its props (the card_instance_created trigger). When omitted, it is inferred from the definition's trigger (chatbot_tool/tool → \"tool\", card_instance_created → \"card\", otherwise \"workflow\"). The chatbot_tool and tool triggers are only allowed on tool-type workflows, and tool-type workflows allow no other triggers. Declare caller-supplied parameters (tool args, a card's fetch args) as inputFields on the definition's trigger — or add them later with workflow:updateNode. A definition with unknown input keys (any `inputs` key not declared by the node type) or inputFields on a trigger that takes no caller inputs is rejected. While the workflow is disabled (the default status), localErrors covers only structural checks; full {{ref}} validation runs once it is enabled, at session save, or on demand via workflow:validate.","gated":true,"input":{"type":"object","properties":{"op":{"type":"string","const":"workflow:create"},"sessionId":{"type":"string"},"name":{"type":"string","minLength":1},"status":{"type":"string","enum":["enabled","disabled"]},"workflowType":{"type":"string","enum":["workflow","tool","chatbot","card"]},"definition":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string"},"version":{"type":"number"},"displayName":{"type":"string"},"valid":{"type":"boolean"},"inputs":{"type":"object","additionalProperties":{}},"inputFields":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","pattern":"^[a-zA-Z_][a-zA-Z0-9_]*$"},"type":{"type":"string","enum":["string","number","boolean"]},"description":{"type":"string"},"required":{"type":"boolean"},"enum":{"type":"array","items":{"type":["string","number"]}}},"required":["name","type","required"],"additionalProperties":false}},"lastUpdatedAt":{"type":"string"},"nextNode":{}},"required":["name","type","version","displayName","valid","inputs","lastUpdatedAt"],"additionalProperties":false},"variables":{"type":"object","additionalProperties":{"type":"string"},"description":"Static workflow-level constants referenced as {{variables.key}} — for values reused across nodes. Never per-invocation data: caller-supplied values (tool args, a card's fetch args) are declared as inputFields on the trigger node and read as {{input.field}}."}},"required":["op","sessionId","name"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"output":{"type":"object","properties":{"workflowId":{"type":"string"},"localErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["workflowId","localErrors"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}},{"op":"workflow:update","tool":"algomo_edit","description":"Update workflow fields (name, status, definition, variables). variables are static constants ({{variables.key}}); caller-supplied parameters live in the trigger's inputFields (set via workflow:updateNode on the trigger node). A definition with unknown input keys is rejected.","gated":true,"input":{"type":"object","properties":{"op":{"type":"string","const":"workflow:update"},"sessionId":{"type":"string"},"workflowId":{"type":"string"},"name":{"type":"string","minLength":1},"status":{"type":"string","enum":["enabled","disabled"]},"definition":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string"},"version":{"type":"number"},"displayName":{"type":"string"},"valid":{"type":"boolean"},"inputs":{"type":"object","additionalProperties":{}},"inputFields":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","pattern":"^[a-zA-Z_][a-zA-Z0-9_]*$"},"type":{"type":"string","enum":["string","number","boolean"]},"description":{"type":"string"},"required":{"type":"boolean"},"enum":{"type":"array","items":{"type":["string","number"]}}},"required":["name","type","required"],"additionalProperties":false}},"lastUpdatedAt":{"type":"string"},"nextNode":{}},"required":["name","type","version","displayName","valid","inputs","lastUpdatedAt"],"additionalProperties":false},"variables":{"type":"object","additionalProperties":{"type":"string"},"description":"Static workflow-level constants referenced as {{variables.key}} — for values reused across nodes. Never per-invocation data: caller-supplied values (tool args, a card's fetch args) are declared as inputFields on the trigger node and read as {{input.field}}."}},"required":["op","sessionId","workflowId"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"output":{"type":"object","properties":{"workflow":{"type":"object","properties":{"id":{"type":"string"},"orgId":{"type":"string"},"name":{"type":"string"},"status":{"type":"string","enum":["enabled","disabled"]},"workflowType":{"type":"string","enum":["workflow","tool","chatbot","card"]},"definition":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string"},"version":{"type":"number"},"displayName":{"type":"string"},"valid":{"type":"boolean"},"inputs":{"type":"object","additionalProperties":{}},"inputFields":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","pattern":"^[a-zA-Z_][a-zA-Z0-9_]*$"},"type":{"type":"string","enum":["string","number","boolean"]},"description":{"type":"string"},"required":{"type":"boolean"},"enum":{"type":"array","items":{"type":["string","number"]}}},"required":["name","type","required"],"additionalProperties":false}},"lastUpdatedAt":{"type":"string"},"nextNode":{}},"required":["name","type","version","displayName","valid","inputs","lastUpdatedAt"],"additionalProperties":false},"variables":{"type":"object","additionalProperties":{"type":"string"},"default":{}},"createdBy":{"type":"string"},"createdAt":{"type":"string","format":"date-time"}},"required":["id","orgId","name","status","workflowType","definition","createdBy","createdAt"],"additionalProperties":false},"localErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["workflow","localErrors"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}},{"op":"workflow:delete","tool":"algomo_edit","description":"Delete a workflow from the session.","gated":true,"input":{"type":"object","properties":{"op":{"type":"string","const":"workflow:delete"},"sessionId":{"type":"string"},"workflowId":{"type":"string"}},"required":["op","sessionId","workflowId"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"output":{"type":"object","properties":{"workflow":{"type":"object","properties":{"id":{"type":"string"},"orgId":{"type":"string"},"name":{"type":"string"},"status":{"type":"string","enum":["enabled","disabled"]},"workflowType":{"type":"string","enum":["workflow","tool","chatbot","card"]},"definition":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string"},"version":{"type":"number"},"displayName":{"type":"string"},"valid":{"type":"boolean"},"inputs":{"type":"object","additionalProperties":{}},"inputFields":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","pattern":"^[a-zA-Z_][a-zA-Z0-9_]*$"},"type":{"type":"string","enum":["string","number","boolean"]},"description":{"type":"string"},"required":{"type":"boolean"},"enum":{"type":"array","items":{"type":["string","number"]}}},"required":["name","type","required"],"additionalProperties":false}},"lastUpdatedAt":{"type":"string"},"nextNode":{}},"required":["name","type","version","displayName","valid","inputs","lastUpdatedAt"],"additionalProperties":false},"variables":{"type":"object","additionalProperties":{"type":"string"},"default":{}},"createdBy":{"type":"string"},"createdAt":{"type":"string","format":"date-time"}},"required":["id","orgId","name","status","workflowType","definition","createdBy","createdAt"],"additionalProperties":false},"localErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["workflow","localErrors"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}},{"op":"workflow:run","tool":"algomo_run","description":"Execute a workflow by ID. Pass `input` values matching the inputFields declared on the workflow's trigger (undeclared keys are rejected — runtime callers only supply declared fields). This is a test invocation, so visitorId/threadId are generated for you when you omit them from `triggerPayload` — pass them only to target a specific visitor or thread. With a sessionId, the run resolves session-staged entities (an unsaved connector, workflow edits) — no need to save the session just to test. Returns the full execution trace with per-step inputs, outputs, errors, timing, and the workflow output (if a workflow_output node was reached).","input":{"type":"object","properties":{"op":{"type":"string","const":"workflow:run"},"workflowId":{"type":"string"},"sessionId":{"type":"string"},"triggerPayload":{"type":"object","additionalProperties":{},"default":{}},"input":{"type":"object","additionalProperties":{}}},"required":["op","workflowId"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"output":{"type":"object","properties":{"runId":{"type":"string","description":"The persisted run: what workflow:getRun reads, what a cache hit's sourceRunId names."},"status":{"type":"string","enum":["succeeded","failed","partial"]},"steps":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string"},"status":{"type":"string","enum":["succeeded","failed","skipped"]},"input":{},"output":{},"errorMessage":{"type":"string"},"errorName":{"type":"string"},"errorData":{"description":"What a failed step recorded beside its message: fail_workflow's data, a run_javascript script's console output as { logs }."},"cache":{"anyOf":[{"type":"object","properties":{"hit":{"type":"boolean","const":true},"sourceRunId":{"type":"string"},"sourceWorkflowId":{"type":"string"},"sourceWorkflowType":{"type":"string","enum":["workflow","tool","chatbot","card"]},"cachedAt":{"type":"string"}},"required":["hit","sourceRunId","sourceWorkflowId","cachedAt"],"additionalProperties":false},{"type":"object","properties":{"hit":{"type":"boolean","const":false},"stored":{"type":"boolean"},"reason":{"type":"string"}},"required":["hit","stored"],"additionalProperties":false}],"description":"On a node with caching on: hit: true when the output was served from the cache (sourceRunId is the run that produced it, sourceWorkflowId and sourceWorkflowType the workflow it ran in; the step charged nothing), hit: false when the step executed, with stored saying whether its output was kept for the next call."},"durationMs":{"type":"number"}},"required":["name","type","status","durationMs"],"additionalProperties":false}},"durationMs":{"type":"number"},"output":{"anyOf":[{"type":"object","additionalProperties":{}},{"type":"null"}]}},"required":["runId","status","steps","durationMs","output"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}},{"op":"workflow:listRuns","tool":"algomo_read","description":"List past runs of a workflow, newest first — one page of summaries (status, version, timestamps, credits spent; no step traces) plus the workflow's current version, so a run with an older workflowVersion executed an outdated definition. Each summary carries its origin: where the run came from (a chatbot conversation, a custom agent's tool call), when it has one. Filter by isTest and statuses; page by passing the returned nextCursor back as cursor. A workflow created in a session and not yet saved lists its runs only with that sessionId (they are test runs — pass isTest true or omit it). Read a run's full trace with workflow:getRun.","input":{"type":"object","properties":{"op":{"type":"string","const":"workflow:listRuns"},"workflowId":{"type":"string"},"sessionId":{"type":"string","description":"Read the workflow through this edit session: a workflow created in the session (not yet saved) resolves and its runs list. Omitted = the saved workflow."},"isTest":{"type":"boolean","description":"true = test runs only, false = live runs only, omitted = both."},"statuses":{"type":"array","items":{"type":"string","enum":["running","succeeded","failed"]},"minItems":1,"description":"Keep only these run states; omitted means all listed states."},"cursor":{"type":"object","properties":{"startedAt":{"type":"string","format":"date-time"},"id":{"type":"string"}},"required":["startedAt","id"],"additionalProperties":false,"description":"The previous page's nextCursor; omit for the first page."}},"required":["op","workflowId"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"output":{"type":"object","properties":{"runs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["succeeded","failed","partial","running"]},"workflowVersion":{"type":"number"},"isTest":{"type":"boolean"},"origin":{"anyOf":[{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"conversation"},"threadId":{"type":"string","format":"uuid"},"visitorId":{"type":"string","format":"uuid"},"chatbotId":{"type":"string","format":"uuid"}},"required":["kind","threadId","visitorId","chatbotId"],"additionalProperties":false,"description":"The run happened inside a chatbot conversation — threadId addresses it (the dashboard's conversation view)."},{"type":"object","properties":{"kind":{"type":"string","const":"agent_chat"},"agentId":{"type":"string","format":"uuid"},"parentRunId":{"type":"string","format":"uuid"},"parentNodeName":{"type":"string"}},"required":["kind","agentId"],"additionalProperties":false,"description":"The run was a custom agent's workflow tool call. parentRunId, when present, is the workflow run whose run_agent step invoked the agent, and parentNodeName that step's name."}]},{"type":"null"}],"description":"Where the run came from — a chatbot conversation or a custom agent's tool call; null for runs with no conversational origin (webhooks, test runs from the editor)."},"startedAt":{"type":"string","format":"date-time"},"finishedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"credits":{"type":"number","description":"Credits the run has drawn so far: each priced node's execution fee plus the model tokens and data-provider calls made inside it, and the workflow tools its run_agent steps' agents ran (runs of their own, folded onto that node). A listing that shows a run and one it made counts that spend on both, so don't total across them. Steps are charged as they land, so a running run's figure grows; 0 when nothing was charged."}},"required":["id","status","workflowVersion","isTest","origin","startedAt","finishedAt","credits"],"additionalProperties":false}},"currentVersion":{"type":"number","description":"The workflow's current entity version — a run whose workflowVersion is behind this executed an older definition."},"nextCursor":{"anyOf":[{"type":"object","properties":{"startedAt":{"type":"string","format":"date-time"},"id":{"type":"string"}},"required":["startedAt","id"],"additionalProperties":false},{"type":"null"}],"description":"Pass back as `cursor` for the next page; null on the last."}},"required":["runs","currentVersion","nextCursor"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}},{"op":"workflow:getRun","tool":"algomo_read","description":"Get a past run by ID: the full execution trace (per-step inputs, outputs, errors, timing), what it cost (credits in total and per node) and the workflow definition the run executed — including unsaved edits staged in a session, flagged by ranUncommitted — so you diagnose a run against what actually ran, not the current definition. A run of a workflow created in a session and not yet saved is readable only with that sessionId. A conversation origin means the run happened inside that chatbot conversation — point the user at it via its threadId (the dashboard's conversation view).","input":{"type":"object","properties":{"op":{"type":"string","const":"workflow:getRun"},"workflowId":{"type":"string"},"runId":{"type":"string"},"sessionId":{"type":"string","description":"The edit session that holds the workflow when it was created there and not yet saved. Omitted = the saved workflow."}},"required":["op","workflowId","runId"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"output":{"type":"object","properties":{"run":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["running","succeeded","failed","partial"]},"workflowVersion":{"type":"number"},"isTest":{"type":"boolean"},"fromDraft":{"type":"boolean","description":"The run executed an unsaved draft definition."},"triggerPayload":{"anyOf":[{"type":"object","additionalProperties":{}},{"type":"null"}]},"input":{"anyOf":[{"type":"object","additionalProperties":{}},{"type":"null"}],"description":"Caller input that seeded {{input.*}} — tool/test runs only."},"origin":{"anyOf":[{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"conversation"},"threadId":{"type":"string","format":"uuid"},"visitorId":{"type":"string","format":"uuid"},"chatbotId":{"type":"string","format":"uuid"}},"required":["kind","threadId","visitorId","chatbotId"],"additionalProperties":false,"description":"The run happened inside a chatbot conversation — threadId addresses it (the dashboard's conversation view)."},{"type":"object","properties":{"kind":{"type":"string","const":"agent_chat"},"agentId":{"type":"string","format":"uuid"},"parentRunId":{"type":"string","format":"uuid"},"parentNodeName":{"type":"string"}},"required":["kind","agentId"],"additionalProperties":false,"description":"The run was a custom agent's workflow tool call. parentRunId, when present, is the workflow run whose run_agent step invoked the agent, and parentNodeName that step's name."}]},{"type":"null"}],"description":"Where the run came from — a chatbot conversation or a custom agent's tool call; null for runs with no conversational origin (webhooks, test runs from the editor)."},"steps":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string"},"status":{"type":"string","enum":["succeeded","failed","skipped"]},"input":{},"output":{},"cache":{"anyOf":[{"type":"object","properties":{"hit":{"type":"boolean","const":true},"sourceRunId":{"type":"string"},"sourceWorkflowId":{"type":"string"},"sourceWorkflowType":{"type":"string","enum":["workflow","tool","chatbot","card"]},"cachedAt":{"type":"string"}},"required":["hit","sourceRunId","sourceWorkflowId","cachedAt"],"additionalProperties":false},{"type":"object","properties":{"hit":{"type":"boolean","const":false},"stored":{"type":"boolean"},"reason":{"type":"string"}},"required":["hit","stored"],"additionalProperties":false}]},"errorMessage":{"type":"string"},"errorName":{"type":"string"},"errorData":{},"durationMs":{"type":"number"}},"required":["name","type","status","durationMs"],"additionalProperties":false}},"startedAt":{"type":"string","format":"date-time"},"finishedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"credits":{"type":"number","description":"Credits the run has drawn so far: each priced node's execution fee plus the model tokens and data-provider calls made inside it, and the workflow tools its run_agent steps' agents ran (runs of their own, folded onto that node). A listing that shows a run and one it made counts that spend on both, so don't total across them. Steps are charged as they land, so a running run's figure grows; 0 when nothing was charged."},"nodeCredits":{"type":"array","items":{"type":"object","properties":{"nodeName":{"type":["string","null"]},"credits":{"type":"number"}},"required":["nodeName","credits"],"additionalProperties":false},"description":"Where the run's credits went, by step name: each node's execution fee plus the model tokens or provider calls it made. A null nodeName is spend recorded before nodes were attributed. Empty when nothing was charged."}},"required":["id","status","workflowVersion","isTest","fromDraft","triggerPayload","input","origin","steps","startedAt","finishedAt","credits","nodeCredits"],"additionalProperties":false},"workflow":{"type":"object","properties":{"id":{"type":"string"},"orgId":{"type":"string"},"name":{"type":"string"},"status":{"type":"string","enum":["enabled","disabled"]},"workflowType":{"$ref":"#/properties/run/properties/steps/items/properties/cache/anyOf/0/properties/sourceWorkflowType"},"definition":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string"},"version":{"type":"number"},"displayName":{"type":"string"},"valid":{"type":"boolean"},"inputs":{"type":"object","additionalProperties":{}},"inputFields":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","pattern":"^[a-zA-Z_][a-zA-Z0-9_]*$"},"type":{"type":"string","enum":["string","number","boolean"]},"description":{"type":"string"},"required":{"type":"boolean"},"enum":{"type":"array","items":{"type":["string","number"]}}},"required":["name","type","required"],"additionalProperties":false}},"lastUpdatedAt":{"type":"string"},"nextNode":{}},"required":["name","type","version","displayName","valid","inputs","lastUpdatedAt"],"additionalProperties":false},"variables":{"type":"object","additionalProperties":{"type":"string"},"default":{}},"createdBy":{"type":"string"},"createdAt":{"type":"string","format":"date-time"}},"required":["id","orgId","name","status","workflowType","definition","createdBy","createdAt"],"additionalProperties":false,"description":"The workflow definition the run executed, not the current one: the uncommitted definition and variables it ran when ranUncommitted is true, else the workflow at the run's workflowVersion."},"ranUncommitted":{"type":"boolean","description":"The run executed a definition that was never saved — edits staged in an edit session (e.g. a test conversation or MCP run inside a session) or an unsaved editor draft — so its workflowVersion is only the last saved version before it, not what ran."},"currentVersion":{"type":"number"}},"required":["run","workflow","ranUncommitted","currentVersion"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}},{"op":"workflow:listNodeDefinitions","tool":"algomo_read","description":"List available node definitions for workflows. Optionally filter by kind (trigger, action, control) and/or workflowType (only definitions allowed for that workflow type). Each carries what it costs the workspace to run (charge), absent for a free node.","input":{"type":"object","properties":{"op":{"type":"string","const":"workflow:listNodeDefinitions"},"kind":{"type":"string","enum":["trigger","action","control"]},"workflowType":{"type":"string","enum":["workflow","tool","chatbot","card"]}},"required":["op"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"output":{"type":"object","properties":{"nodeTypes":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"kind":{"type":"string"},"description":{"type":"string"},"supportedWorkflowTypes":{"type":"array","items":{"type":"string","enum":["workflow","tool","chatbot","card"]}},"configurableInputFields":{"type":"boolean"},"charge":{"type":"object","properties":{"kind":{"type":"string","enum":["fixed","per_token","per_call"]},"credits":{"type":"number","minimum":0}},"required":["kind","credits"],"additionalProperties":false,"description":"What running this node costs the workspace: credits per execution, plus the model's tokens (per_token) or the data provider's call (per_call) on top. Absent when the node is free."},"cacheable":{"type":"boolean","const":true,"description":"The node's results may be cached per resolved inputs (a cache setting on the node, see the workflow entity info). Absent on a node whose output isn't a function of its inputs alone."}},"required":["type","kind","description","supportedWorkflowTypes"],"additionalProperties":false}}},"required":["nodeTypes"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}},{"op":"workflow:getNodeDefinition","tool":"algomo_read","description":"Get the full definition of a node type. Each input field reports its uiType, whether it's required, options (allowed values for dropdown fields), entityRef (the field takes an id of that entity type — with secretType/acceptedConnections for secret/connection refs), and the raw flag (raw fields skip {{...}} interpolation and ref validation — for script/regex/template bodies). Also returns output fields, sample output and what the node costs the workspace to run (charge; absent for a free node). For triggers, configurableInputFields reports whether the workflow may declare caller-supplied inputFields on its trigger node (distinct from this op's inputFields, which describe the node's own inputs config).","input":{"type":"object","properties":{"op":{"type":"string","const":"workflow:getNodeDefinition"},"type":{"type":"string"}},"required":["op","type"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"output":{"type":"object","properties":{"type":{"type":"string"},"kind":{"type":"string"},"description":{"type":"string"},"supportedWorkflowTypes":{"type":"array","items":{"type":"string","enum":["workflow","tool","chatbot","card"]}},"configurableInputFields":{"type":"boolean"},"charge":{"type":"object","properties":{"kind":{"type":"string","enum":["fixed","per_token","per_call"]},"credits":{"type":"number","minimum":0}},"required":["kind","credits"],"additionalProperties":false,"description":"What running this node costs the workspace: credits per execution, plus the model's tokens (per_token) or the data provider's call (per_call) on top. Absent when the node is free."},"cacheable":{"type":"boolean","const":true,"description":"The node's results may be cached per resolved inputs (a cache setting on the node, see the workflow entity info). Absent on a node whose output isn't a function of its inputs alone."},"inputFields":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"displayName":{"type":"string"},"description":{"type":"string"},"required":{"type":"boolean"},"uiType":{"type":"string"},"options":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"static"},"values":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"value":{}},"required":["label"],"additionalProperties":false}}},"required":["type","values"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"dynamic"},"refreshOn":{"type":"array","items":{"type":"string"}}},"required":["type"],"additionalProperties":false}]},"entityRef":{"type":"string"},"schemaFrom":{"type":"object","properties":{"type":{"type":"string","const":"connectorInput"},"connectorField":{"type":"string"}},"required":["type","connectorField"],"additionalProperties":false},"secretType":{"type":"string"},"acceptedConnections":{"type":"array","items":{"type":"object","properties":{"service":{"type":"string"},"tokenType":{"type":"string"},"requiredScopes":{"type":"array","items":{"type":"string"}}},"required":["service","requiredScopes"],"additionalProperties":false}},"raw":{"type":"boolean"}},"required":["name","displayName","required"],"additionalProperties":false}},"outputFields":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string"},"optional":{"type":"boolean"}},"required":["name","type","optional"],"additionalProperties":false}},"sampleOutput":{}},"required":["type","kind","description","supportedWorkflowTypes","inputFields","outputFields"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}},{"op":"workflow:validate","tool":"algomo_read","description":"Validate a workflow definition. Returns all validation errors regardless of workflow status.","input":{"type":"object","properties":{"op":{"type":"string","const":"workflow:validate"},"workflowId":{"type":"string"},"sessionId":{"type":"string"}},"required":["op","workflowId"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"output":{"type":"object","properties":{"errors":{"type":"array","items":{"type":"object","properties":{"nodeName":{"type":"string"},"field":{"type":"string"},"message":{"type":"string"}},"required":["nodeName","field","message"],"additionalProperties":false}}},"required":["errors"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}},{"op":"workflow:addNode","tool":"algomo_edit","description":"Add a node after a specified node. Use pathIndex to add it at the start of a specific branch of a paths node or lane of a parallel node. Auto-generates the node name; set the node's inputs with workflow:updateNode.","gated":true,"input":{"type":"object","properties":{"op":{"type":"string","const":"workflow:addNode"},"sessionId":{"type":"string"},"workflowId":{"type":"string"},"afterNodeName":{"type":"string"},"nodeType":{"type":"string"},"pathIndex":{"type":"number","description":"When afterNodeName is a paths or parallel node: the branch (path or lane) to add the node at the start of, by index. Omit to add after the node itself."}},"required":["op","sessionId","workflowId","afterNodeName","nodeType"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"output":{"type":"object","properties":{"workflow":{"type":"object","properties":{"id":{"type":"string"},"orgId":{"type":"string"},"name":{"type":"string"},"status":{"type":"string","enum":["enabled","disabled"]},"workflowType":{"type":"string","enum":["workflow","tool","chatbot","card"]},"definition":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string"},"version":{"type":"number"},"displayName":{"type":"string"},"valid":{"type":"boolean"},"inputs":{"type":"object","additionalProperties":{}},"inputFields":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","pattern":"^[a-zA-Z_][a-zA-Z0-9_]*$"},"type":{"type":"string","enum":["string","number","boolean"]},"description":{"type":"string"},"required":{"type":"boolean"},"enum":{"type":"array","items":{"type":["string","number"]}}},"required":["name","type","required"],"additionalProperties":false}},"lastUpdatedAt":{"type":"string"},"nextNode":{}},"required":["name","type","version","displayName","valid","inputs","lastUpdatedAt"],"additionalProperties":false},"variables":{"type":"object","additionalProperties":{"type":"string"},"default":{}},"createdBy":{"type":"string"},"createdAt":{"type":"string","format":"date-time"}},"required":["id","orgId","name","status","workflowType","definition","createdBy","createdAt"],"additionalProperties":false},"localErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["workflow","localErrors"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}},{"op":"workflow:listNodeCache","tool":"algomo_read","description":"List cached results, the ones expiring last first (newest first among entries kept for one TTL), a page at a time: each entry's stored input (the key), output, when it was stored and lapses, and the run, workflow and step that stored it. Name them by workflow node (workflowId + nodeName: the entries that node's configured inputs could have stored) or by inputs (nodeType + an optional inputs template in which every {{…}} matches anything — { url: 'https://api.example.com/{{rest}}' } is every request to that host; without a template, every entry of the type, which is shared by node type and inputs across the workspace's workflows). Pass sessionId to read the edit session's cache instead of the live one.","input":{"type":"object","properties":{"op":{"type":"string","const":"workflow:listNodeCache"},"workflowId":{"type":"string","description":"By node: the workflow, with nodeName."},"nodeName":{"type":"string","description":"By node: a cacheable action node of the workflow — its configured inputs are the pattern, every {{…}} matching anything."},"nodeType":{"type":"string","description":"By inputs: a cacheable node type (http_request, llm_call, …), with an optional inputs template."},"inputs":{"type":"object","additionalProperties":{},"description":"By inputs: the shape the stored inputs must match, written like a node's configured inputs. Static text must appear verbatim; every {{…}} matches any run of characters (the name inside is irrelevant), so a trailing one is \"starts with\" ({ url: \"https://api.example.com/{{rest}}\" }), one on each side is \"contains\" ({ url: \"{{a}}/orders/{{b}}\" }), and a value that is only {{…}} matches anything. Keys left out are unconstrained; a nested object matches key by key; an array must match item by item. Omitted, every entry of the type."},"sessionId":{"type":"string","description":"Read or change the edit session's cache rather than the live one — what a sessioned run reads and writes."},"cursor":{"type":["string","null"],"description":"The previous page's nextCursor; omit for the first page."},"limit":{"type":"integer","minimum":1,"maximum":50}},"required":["op"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"output":{"type":"object","properties":{"nodeType":{"type":"string"},"entries":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"input":{"description":"The resolved inputs the entry is keyed on."},"output":{},"cachedAt":{"type":"string"},"expiresAt":{"type":"string"},"sourceRunId":{"type":"string"},"sourceWorkflowId":{"type":"string"},"sourceWorkflowName":{"type":"string"},"sourceWorkflowType":{"anyOf":[{"type":"string","enum":["workflow","tool","chatbot","card"]},{"type":"null"}],"description":"Null when the workflow that stored it has been deleted."},"sourceNodeName":{"type":"string","description":"The step that stored it; absent on older entries."}},"required":["id","cachedAt","expiresAt","sourceRunId","sourceWorkflowId","sourceWorkflowName","sourceWorkflowType"],"additionalProperties":false}},"total":{"type":["number","null"],"description":"Every entry of the node type in the scope, as an upper bound (an entry evicted early still counts until a list meets it); null when the list is narrowed by a node or an inputs template, since counting would walk the whole index."},"nextCursor":{"type":["string","null"]}},"required":["nodeType","entries","total","nextCursor"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}},{"op":"workflow:removeNodeCacheEntry","tool":"algomo_edit","description":"Drop one cached result by its id from workflow:listNodeCache, named by the same node or type. The step runs again on its next call with those inputs.","input":{"type":"object","properties":{"op":{"type":"string","const":"workflow:removeNodeCacheEntry"},"workflowId":{"type":"string","description":"By node: the workflow, with nodeName."},"nodeName":{"type":"string","description":"By node: a cacheable action node of the workflow — its configured inputs are the pattern, every {{…}} matching anything."},"nodeType":{"type":"string","description":"By inputs: a cacheable node type (http_request, llm_call, …), with an optional inputs template."},"inputs":{"type":"object","additionalProperties":{},"description":"By inputs: the shape the stored inputs must match, written like a node's configured inputs. Static text must appear verbatim; every {{…}} matches any run of characters (the name inside is irrelevant), so a trailing one is \"starts with\" ({ url: \"https://api.example.com/{{rest}}\" }), one on each side is \"contains\" ({ url: \"{{a}}/orders/{{b}}\" }), and a value that is only {{…}} matches anything. Keys left out are unconstrained; a nested object matches key by key; an array must match item by item. Omitted, every entry of the type."},"sessionId":{"type":"string","description":"Read or change the edit session's cache rather than the live one — what a sessioned run reads and writes."},"entryId":{"type":"string","description":"An entry's id from workflow:listNodeCache."}},"required":["op","entryId"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"output":{"type":"object","properties":{"ok":{"type":"boolean","const":true}},"required":["ok"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}},{"op":"workflow:clearNodeCache","tool":"algomo_edit","description":"Drop cached results: by workflow node, those its configured inputs could have stored; by nodeType with an inputs template, those matching it; by nodeType alone, every entry of the type across the workspace's workflows (or the edit session's, with sessionId). Every affected step runs again on its next call.","input":{"type":"object","properties":{"op":{"type":"string","const":"workflow:clearNodeCache"},"workflowId":{"type":"string","description":"By node: the workflow, with nodeName."},"nodeName":{"type":"string","description":"By node: a cacheable action node of the workflow — its configured inputs are the pattern, every {{…}} matching anything."},"nodeType":{"type":"string","description":"By inputs: a cacheable node type (http_request, llm_call, …), with an optional inputs template."},"inputs":{"type":"object","additionalProperties":{},"description":"By inputs: the shape the stored inputs must match, written like a node's configured inputs. Static text must appear verbatim; every {{…}} matches any run of characters (the name inside is irrelevant), so a trailing one is \"starts with\" ({ url: \"https://api.example.com/{{rest}}\" }), one on each side is \"contains\" ({ url: \"{{a}}/orders/{{b}}\" }), and a value that is only {{…}} matches anything. Keys left out are unconstrained; a nested object matches key by key; an array must match item by item. Omitted, every entry of the type."},"sessionId":{"type":"string","description":"Read or change the edit session's cache rather than the live one — what a sessioned run reads and writes."}},"required":["op"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"output":{"type":"object","properties":{"ok":{"type":"boolean","const":true}},"required":["ok"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}},{"op":"workflow:removeNode","tool":"algomo_edit","description":"Remove a node by name from the workflow definition.","gated":true,"input":{"type":"object","properties":{"op":{"type":"string","const":"workflow:removeNode"},"sessionId":{"type":"string"},"workflowId":{"type":"string"},"nodeName":{"type":"string"}},"required":["op","sessionId","workflowId","nodeName"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"output":{"type":"object","properties":{"workflow":{"type":"object","properties":{"id":{"type":"string"},"orgId":{"type":"string"},"name":{"type":"string"},"status":{"type":"string","enum":["enabled","disabled"]},"workflowType":{"type":"string","enum":["workflow","tool","chatbot","card"]},"definition":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string"},"version":{"type":"number"},"displayName":{"type":"string"},"valid":{"type":"boolean"},"inputs":{"type":"object","additionalProperties":{}},"inputFields":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","pattern":"^[a-zA-Z_][a-zA-Z0-9_]*$"},"type":{"type":"string","enum":["string","number","boolean"]},"description":{"type":"string"},"required":{"type":"boolean"},"enum":{"type":"array","items":{"type":["string","number"]}}},"required":["name","type","required"],"additionalProperties":false}},"lastUpdatedAt":{"type":"string"},"nextNode":{}},"required":["name","type","version","displayName","valid","inputs","lastUpdatedAt"],"additionalProperties":false},"variables":{"type":"object","additionalProperties":{"type":"string"},"default":{}},"createdBy":{"type":"string"},"createdAt":{"type":"string","format":"date-time"}},"required":["id","orgId","name","status","workflowType","definition","createdBy","createdAt"],"additionalProperties":false},"localErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["workflow","localErrors"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}},{"op":"workflow:updateNode","tool":"algomo_edit","description":"Update a node's displayName, inputs or cache setting. On the trigger node, may also set inputFields — the workflow's caller-supplied parameters (read as {{input.*}}), which form the tool input schema for tool workflows and the fetch args for a card's data workflow. inputFields exist only on the trigger — set on any other node they have no effect. inputs keys not declared by the node's type are rejected. cache ({ ttlSeconds }, or null to turn it off) is accepted on cacheable action nodes only (see the workflow entity info); on any other node it fails validation.","gated":true,"input":{"type":"object","properties":{"op":{"type":"string","const":"workflow:updateNode"},"sessionId":{"type":"string"},"workflowId":{"type":"string"},"nodeName":{"type":"string"},"displayName":{"type":"string"},"inputs":{"type":"object","additionalProperties":{}},"inputFields":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","pattern":"^[a-zA-Z_][a-zA-Z0-9_]*$"},"type":{"type":"string","enum":["string","number","boolean"]},"description":{"type":"string"},"required":{"type":"boolean"},"enum":{"type":"array","items":{"type":["string","number"]}}},"required":["name","type","required"],"additionalProperties":false},"description":"Trigger node only: declares the workflow's caller-supplied parameters, read as {{input.field}} in downstream nodes. They form the tool input schema for tool workflows and the fetch args for a card's data workflow; each field's description is shown to the calling LLM. A string or number field may list its allowed values in `enum` (strings for a string field, numbers for a number field; non-empty, unique) — the caller sees them as an enum and a run refuses any other value. Pass [] to clear."},"cache":{"anyOf":[{"type":"object","properties":{"ttlSeconds":{"type":"integer","exclusiveMinimum":0,"maximum":7776000}},"required":["ttlSeconds"],"additionalProperties":false},{"type":"null"}],"description":"Cacheable action nodes only: reuse the step's result for the same resolved inputs for ttlSeconds (1 second to 90 days) instead of running it again. A step served from the cache is free. Pass null to turn caching off."}},"required":["op","sessionId","workflowId","nodeName"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"output":{"type":"object","properties":{"workflow":{"type":"object","properties":{"id":{"type":"string"},"orgId":{"type":"string"},"name":{"type":"string"},"status":{"type":"string","enum":["enabled","disabled"]},"workflowType":{"type":"string","enum":["workflow","tool","chatbot","card"]},"definition":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string"},"version":{"type":"number"},"displayName":{"type":"string"},"valid":{"type":"boolean"},"inputs":{"type":"object","additionalProperties":{}},"inputFields":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","pattern":"^[a-zA-Z_][a-zA-Z0-9_]*$"},"type":{"type":"string","enum":["string","number","boolean"]},"description":{"type":"string"},"required":{"type":"boolean"},"enum":{"type":"array","items":{"type":["string","number"]}}},"required":["name","type","required"],"additionalProperties":false}},"lastUpdatedAt":{"type":"string"},"nextNode":{}},"required":["name","type","version","displayName","valid","inputs","lastUpdatedAt"],"additionalProperties":false},"variables":{"type":"object","additionalProperties":{"type":"string"},"default":{}},"createdBy":{"type":"string"},"createdAt":{"type":"string","format":"date-time"}},"required":["id","orgId","name","status","workflowType","definition","createdBy","createdAt"],"additionalProperties":false},"localErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["workflow","localErrors"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}},{"op":"workflow:replaceTrigger","tool":"algomo_edit","description":"Change the trigger type. Resets inputs and updates displayName from the node definition; declared inputFields are kept when the new trigger accepts caller inputs (configurableInputFields) and dropped otherwise. Triggers not allowed for the workflow's workflowType produce a validation error in localErrors.","gated":true,"input":{"type":"object","properties":{"op":{"type":"string","const":"workflow:replaceTrigger"},"sessionId":{"type":"string"},"workflowId":{"type":"string"},"triggerType":{"type":"string"}},"required":["op","sessionId","workflowId","triggerType"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"output":{"type":"object","properties":{"workflow":{"type":"object","properties":{"id":{"type":"string"},"orgId":{"type":"string"},"name":{"type":"string"},"status":{"type":"string","enum":["enabled","disabled"]},"workflowType":{"type":"string","enum":["workflow","tool","chatbot","card"]},"definition":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string"},"version":{"type":"number"},"displayName":{"type":"string"},"valid":{"type":"boolean"},"inputs":{"type":"object","additionalProperties":{}},"inputFields":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","pattern":"^[a-zA-Z_][a-zA-Z0-9_]*$"},"type":{"type":"string","enum":["string","number","boolean"]},"description":{"type":"string"},"required":{"type":"boolean"},"enum":{"type":"array","items":{"type":["string","number"]}}},"required":["name","type","required"],"additionalProperties":false}},"lastUpdatedAt":{"type":"string"},"nextNode":{}},"required":["name","type","version","displayName","valid","inputs","lastUpdatedAt"],"additionalProperties":false},"variables":{"type":"object","additionalProperties":{"type":"string"},"default":{}},"createdBy":{"type":"string"},"createdAt":{"type":"string","format":"date-time"}},"required":["id","orgId","name","status","workflowType","definition","createdBy","createdAt"],"additionalProperties":false},"localErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["workflow","localErrors"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}},{"op":"workflow:replaceNode","tool":"algomo_edit","description":"Replace a node with a different type, preserving its position in the chain.","gated":true,"input":{"type":"object","properties":{"op":{"type":"string","const":"workflow:replaceNode"},"sessionId":{"type":"string"},"workflowId":{"type":"string"},"nodeName":{"type":"string"},"nodeType":{"type":"string"}},"required":["op","sessionId","workflowId","nodeName","nodeType"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"output":{"type":"object","properties":{"workflow":{"type":"object","properties":{"id":{"type":"string"},"orgId":{"type":"string"},"name":{"type":"string"},"status":{"type":"string","enum":["enabled","disabled"]},"workflowType":{"type":"string","enum":["workflow","tool","chatbot","card"]},"definition":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string"},"version":{"type":"number"},"displayName":{"type":"string"},"valid":{"type":"boolean"},"inputs":{"type":"object","additionalProperties":{}},"inputFields":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","pattern":"^[a-zA-Z_][a-zA-Z0-9_]*$"},"type":{"type":"string","enum":["string","number","boolean"]},"description":{"type":"string"},"required":{"type":"boolean"},"enum":{"type":"array","items":{"type":["string","number"]}}},"required":["name","type","required"],"additionalProperties":false}},"lastUpdatedAt":{"type":"string"},"nextNode":{}},"required":["name","type","version","displayName","valid","inputs","lastUpdatedAt"],"additionalProperties":false},"variables":{"type":"object","additionalProperties":{"type":"string"},"default":{}},"createdBy":{"type":"string"},"createdAt":{"type":"string","format":"date-time"}},"required":["id","orgId","name","status","workflowType","definition","createdBy","createdAt"],"additionalProperties":false},"localErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["workflow","localErrors"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}},{"op":"workflow:addPath","tool":"algomo_edit","description":"Add a new branch to a paths node.","gated":true,"input":{"type":"object","properties":{"op":{"type":"string","const":"workflow:addPath"},"sessionId":{"type":"string"},"workflowId":{"type":"string"},"pathsNodeName":{"type":"string"}},"required":["op","sessionId","workflowId","pathsNodeName"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"output":{"type":"object","properties":{"workflow":{"type":"object","properties":{"id":{"type":"string"},"orgId":{"type":"string"},"name":{"type":"string"},"status":{"type":"string","enum":["enabled","disabled"]},"workflowType":{"type":"string","enum":["workflow","tool","chatbot","card"]},"definition":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string"},"version":{"type":"number"},"displayName":{"type":"string"},"valid":{"type":"boolean"},"inputs":{"type":"object","additionalProperties":{}},"inputFields":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","pattern":"^[a-zA-Z_][a-zA-Z0-9_]*$"},"type":{"type":"string","enum":["string","number","boolean"]},"description":{"type":"string"},"required":{"type":"boolean"},"enum":{"type":"array","items":{"type":["string","number"]}}},"required":["name","type","required"],"additionalProperties":false}},"lastUpdatedAt":{"type":"string"},"nextNode":{}},"required":["name","type","version","displayName","valid","inputs","lastUpdatedAt"],"additionalProperties":false},"variables":{"type":"object","additionalProperties":{"type":"string"},"default":{}},"createdBy":{"type":"string"},"createdAt":{"type":"string","format":"date-time"}},"required":["id","orgId","name","status","workflowType","definition","createdBy","createdAt"],"additionalProperties":false},"localErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["workflow","localErrors"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}},{"op":"workflow:removePath","tool":"algomo_edit","description":"Remove a branch from a paths node by index.","gated":true,"input":{"type":"object","properties":{"op":{"type":"string","const":"workflow:removePath"},"sessionId":{"type":"string"},"workflowId":{"type":"string"},"pathsNodeName":{"type":"string"},"pathIndex":{"type":"number"}},"required":["op","sessionId","workflowId","pathsNodeName","pathIndex"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"output":{"type":"object","properties":{"workflow":{"type":"object","properties":{"id":{"type":"string"},"orgId":{"type":"string"},"name":{"type":"string"},"status":{"type":"string","enum":["enabled","disabled"]},"workflowType":{"type":"string","enum":["workflow","tool","chatbot","card"]},"definition":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string"},"version":{"type":"number"},"displayName":{"type":"string"},"valid":{"type":"boolean"},"inputs":{"type":"object","additionalProperties":{}},"inputFields":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","pattern":"^[a-zA-Z_][a-zA-Z0-9_]*$"},"type":{"type":"string","enum":["string","number","boolean"]},"description":{"type":"string"},"required":{"type":"boolean"},"enum":{"type":"array","items":{"type":["string","number"]}}},"required":["name","type","required"],"additionalProperties":false}},"lastUpdatedAt":{"type":"string"},"nextNode":{}},"required":["name","type","version","displayName","valid","inputs","lastUpdatedAt"],"additionalProperties":false},"variables":{"type":"object","additionalProperties":{"type":"string"},"default":{}},"createdBy":{"type":"string"},"createdAt":{"type":"string","format":"date-time"}},"required":["id","orgId","name","status","workflowType","definition","createdBy","createdAt"],"additionalProperties":false},"localErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["workflow","localErrors"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}},{"op":"workflow:addLane","tool":"algomo_edit","description":"Add an empty lane to a parallel node. Fill it with workflow:addNode, passing the parallel node as afterNodeName and the lane's index as pathIndex.","gated":true,"input":{"type":"object","properties":{"op":{"type":"string","const":"workflow:addLane"},"sessionId":{"type":"string"},"workflowId":{"type":"string"},"parallelNodeName":{"type":"string"}},"required":["op","sessionId","workflowId","parallelNodeName"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"output":{"type":"object","properties":{"workflow":{"type":"object","properties":{"id":{"type":"string"},"orgId":{"type":"string"},"name":{"type":"string"},"status":{"type":"string","enum":["enabled","disabled"]},"workflowType":{"type":"string","enum":["workflow","tool","chatbot","card"]},"definition":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string"},"version":{"type":"number"},"displayName":{"type":"string"},"valid":{"type":"boolean"},"inputs":{"type":"object","additionalProperties":{}},"inputFields":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","pattern":"^[a-zA-Z_][a-zA-Z0-9_]*$"},"type":{"type":"string","enum":["string","number","boolean"]},"description":{"type":"string"},"required":{"type":"boolean"},"enum":{"type":"array","items":{"type":["string","number"]}}},"required":["name","type","required"],"additionalProperties":false}},"lastUpdatedAt":{"type":"string"},"nextNode":{}},"required":["name","type","version","displayName","valid","inputs","lastUpdatedAt"],"additionalProperties":false},"variables":{"type":"object","additionalProperties":{"type":"string"},"default":{}},"createdBy":{"type":"string"},"createdAt":{"type":"string","format":"date-time"}},"required":["id","orgId","name","status","workflowType","definition","createdBy","createdAt"],"additionalProperties":false},"localErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["workflow","localErrors"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}},{"op":"workflow:removeLane","tool":"algomo_edit","description":"Remove a lane from a parallel node by index, with every node in it.","gated":true,"input":{"type":"object","properties":{"op":{"type":"string","const":"workflow:removeLane"},"sessionId":{"type":"string"},"workflowId":{"type":"string"},"parallelNodeName":{"type":"string"},"laneIndex":{"type":"number"}},"required":["op","sessionId","workflowId","parallelNodeName","laneIndex"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"output":{"type":"object","properties":{"workflow":{"type":"object","properties":{"id":{"type":"string"},"orgId":{"type":"string"},"name":{"type":"string"},"status":{"type":"string","enum":["enabled","disabled"]},"workflowType":{"type":"string","enum":["workflow","tool","chatbot","card"]},"definition":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string"},"version":{"type":"number"},"displayName":{"type":"string"},"valid":{"type":"boolean"},"inputs":{"type":"object","additionalProperties":{}},"inputFields":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","pattern":"^[a-zA-Z_][a-zA-Z0-9_]*$"},"type":{"type":"string","enum":["string","number","boolean"]},"description":{"type":"string"},"required":{"type":"boolean"},"enum":{"type":"array","items":{"type":["string","number"]}}},"required":["name","type","required"],"additionalProperties":false}},"lastUpdatedAt":{"type":"string"},"nextNode":{}},"required":["name","type","version","displayName","valid","inputs","lastUpdatedAt"],"additionalProperties":false},"variables":{"type":"object","additionalProperties":{"type":"string"},"default":{}},"createdBy":{"type":"string"},"createdAt":{"type":"string","format":"date-time"}},"required":["id","orgId","name","status","workflowType","definition","createdBy","createdAt"],"additionalProperties":false},"localErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["workflow","localErrors"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}},{"op":"workflow:updateConditions","tool":"algomo_edit","description":"Update the conditions on a specific path of a paths node. Conditions are ANDed; each is { type: \"comparison\", firstValue, operator, secondValue } or { type: \"fallback\" }. Operators: text_equals/text_not_equals/text_contains/text_not_contains/text_starts_with/text_ends_with, text_matches/text_not_matches (a literal RE2 regex, never a reference; unanchored, (?i) for case-insensitive), list_has/list_not_has (an item equals the value) and list_has_match/list_not_has_match (an item matches the regex) on a {{reference}} to a list, number_equals/number_greater/number_less, boolean_is_true/boolean_is_false, exists/not_exists, date_older_than/date_newer_than (durations like 5m, 2h). The info:entity description for workflow has the details.","gated":true,"input":{"type":"object","properties":{"op":{"type":"string","const":"workflow:updateConditions"},"sessionId":{"type":"string"},"workflowId":{"type":"string"},"pathsNodeName":{"type":"string"},"pathIndex":{"type":"number"},"conditions":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"comparison"},"firstValue":{"type":"string"},"operator":{"type":"string","enum":["text_contains","text_not_contains","text_equals","text_not_equals","text_starts_with","text_ends_with","text_matches","text_not_matches","list_has","list_not_has","list_has_match","list_not_has_match","number_equals","number_greater","number_less","boolean_is_true","boolean_is_false","exists","not_exists","date_older_than","date_newer_than"]},"secondValue":{"type":"string"}},"required":["type","firstValue","operator","secondValue"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"fallback"}},"required":["type"],"additionalProperties":false}]}}},"required":["op","sessionId","workflowId","pathsNodeName","pathIndex","conditions"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"output":{"type":"object","properties":{"workflow":{"type":"object","properties":{"id":{"type":"string"},"orgId":{"type":"string"},"name":{"type":"string"},"status":{"type":"string","enum":["enabled","disabled"]},"workflowType":{"type":"string","enum":["workflow","tool","chatbot","card"]},"definition":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string"},"version":{"type":"number"},"displayName":{"type":"string"},"valid":{"type":"boolean"},"inputs":{"type":"object","additionalProperties":{}},"inputFields":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","pattern":"^[a-zA-Z_][a-zA-Z0-9_]*$"},"type":{"type":"string","enum":["string","number","boolean"]},"description":{"type":"string"},"required":{"type":"boolean"},"enum":{"type":"array","items":{"type":["string","number"]}}},"required":["name","type","required"],"additionalProperties":false}},"lastUpdatedAt":{"type":"string"},"nextNode":{}},"required":["name","type","version","displayName","valid","inputs","lastUpdatedAt"],"additionalProperties":false},"variables":{"type":"object","additionalProperties":{"type":"string"},"default":{}},"createdBy":{"type":"string"},"createdAt":{"type":"string","format":"date-time"}},"required":["id","orgId","name","status","workflowType","definition","createdBy","createdAt"],"additionalProperties":false},"localErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["workflow","localErrors"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}},{"op":"connection:list","tool":"algomo_read","description":"List the org's third-party connections (OAuth and API key). Returns redacted summaries — no encrypted credentials are exposed. To create, reauthorize, or delete connections, direct the user to https://dash.algomo.com/settings/connections.","input":{"type":"object","properties":{"op":{"type":"string","const":"connection:list"},"sessionId":{"type":"string"}},"required":["op"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"output":{"type":"object","properties":{"connections":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"service":{"type":"string"},"type":{"type":"string","enum":["oauth2","api_key"]},"status":{"type":"string","enum":["active","error","expired"]},"details":{"type":"object","additionalProperties":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]}}},"required":["id","service","type","status","details"],"additionalProperties":false}}},"required":["connections"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}},{"op":"connection:get","tool":"algomo_read","description":"Get a single connection by ID. Returns a redacted summary — no encrypted credentials are exposed. Use to look up a connectionId before referencing it from a workflow action input.","input":{"type":"object","properties":{"op":{"type":"string","const":"connection:get"},"connectionId":{"type":"string"},"sessionId":{"type":"string"}},"required":["op","connectionId"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"output":{"type":"object","properties":{"id":{"type":"string"},"service":{"type":"string"},"type":{"type":"string","enum":["oauth2","api_key"]},"status":{"type":"string","enum":["active","error","expired"]},"details":{"type":"object","additionalProperties":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]}}},"required":["id","service","type","status","details"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}},{"op":"connection:listForField","tool":"algomo_read","description":"List the valid values for a workflow action's connection field. Pass the field's acceptedConnections (from workflow:getNodeDefinition) and receive every option the picker would show: tenant connections plus any 'Algomo managed' built-in options the platform offers for those services. Each option's value is the exact JSON to write into the action's connectionId input — either a user connection ref { type: \"user\", id, service, tokenType? } or a managed ref { type: \"managed\", service }. Prefer this op over connection:list when wiring a connection field on a workflow node.","input":{"type":"object","properties":{"op":{"type":"string","const":"connection:listForField"},"sessionId":{"type":"string"},"acceptedConnections":{"type":"array","items":{"type":"object","properties":{"service":{"type":"string"},"tokenType":{"type":"string"},"requiredScopes":{"type":"array","items":{"type":"string"}}},"required":["service","requiredScopes"],"additionalProperties":false}}},"required":["op","acceptedConnections"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"output":{"type":"object","properties":{"options":{"type":"array","items":{"type":"object","properties":{"value":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"user"},"id":{"type":"string","format":"uuid"},"service":{"type":"string","minLength":1},"tokenType":{"type":"string"}},"required":["type","id","service"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"managed"},"service":{"type":"string","minLength":1}},"required":["type","service"],"additionalProperties":false}]},"label":{"type":"string"},"subtitle":{"type":"string"},"scopeError":{"type":["string","null"]}},"required":["value","label","subtitle","scopeError"],"additionalProperties":false}}},"required":["options"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}},{"op":"agent:list","tool":"algomo_read","description":"List all agents for the org. With sessionId, includes unsaved changes.","input":{"type":"object","properties":{"op":{"type":"string","const":"agent:list"},"sessionId":{"type":"string"}},"required":["op"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"output":{"type":"object","properties":{"agents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"orgId":{"type":"string"},"name":{"type":"string","minLength":1},"instructions":{"type":"array","items":{"type":"string"}},"provider":{"type":"string","enum":["anthropic","google","mistralai","openai"]},"model":{"type":"string","minLength":1},"temperature":{"type":"number","minimum":0,"maximum":2},"maxSteps":{"type":"integer","minimum":1,"maximum":100},"reasoning":{"type":"boolean"},"capabilities":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"knowledge_base"},"scope":{"type":"string","enum":["all","selected"]},"folderIds":{"type":"array","items":{"type":"string","format":"uuid"}}},"required":["type","scope","folderIds"],"additionalProperties":false}]}},"createdAt":{"type":"string","format":"date-time"},"tools":{"type":"object","additionalProperties":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"workflow"},"description":{"type":"string"},"workflowId":{"type":"string","format":"uuid"}},"required":["type","description","workflowId"],"additionalProperties":false}]}}},"required":["id","orgId","name","instructions","provider","model","temperature","maxSteps","reasoning","capabilities","createdAt","tools"],"additionalProperties":false}}},"required":["agents"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}},{"op":"agent:get","tool":"algomo_read","description":"Get a agent by ID.","input":{"type":"object","properties":{"op":{"type":"string","const":"agent:get"},"agentId":{"type":"string"},"sessionId":{"type":"string"}},"required":["op","agentId"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"output":{"type":"object","properties":{"id":{"type":"string"},"orgId":{"type":"string"},"name":{"type":"string","minLength":1},"instructions":{"type":"array","items":{"type":"string"}},"provider":{"type":"string","enum":["anthropic","google","mistralai","openai"]},"model":{"type":"string","minLength":1},"temperature":{"type":"number","minimum":0,"maximum":2},"maxSteps":{"type":"integer","minimum":1,"maximum":100},"reasoning":{"type":"boolean"},"capabilities":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"knowledge_base"},"scope":{"type":"string","enum":["all","selected"]},"folderIds":{"type":"array","items":{"type":"string","format":"uuid"}}},"required":["type","scope","folderIds"],"additionalProperties":false}]}},"createdAt":{"type":"string","format":"date-time"},"tools":{"type":"object","additionalProperties":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"workflow"},"description":{"type":"string"},"workflowId":{"type":"string","format":"uuid"}},"required":["type","description","workflowId"],"additionalProperties":false}]}}},"required":["id","orgId","name","instructions","provider","model","temperature","maxSteps","reasoning","capabilities","createdAt","tools"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}},{"op":"agent:create","tool":"algomo_edit","description":"Create a new agent in the session. The system generates the ID. Returns the new agent ID and any validation errors.","gated":true,"input":{"type":"object","properties":{"op":{"type":"string","const":"agent:create"},"sessionId":{"type":"string"},"params":{"type":"object","properties":{"name":{"type":"string","minLength":1},"instructions":{"type":"array","items":{"type":"string"}},"provider":{"type":"string","enum":["anthropic","google","mistralai","openai"]},"model":{"type":"string","minLength":1},"temperature":{"type":"number","minimum":0,"maximum":2},"maxSteps":{"type":"integer","minimum":1,"maximum":100},"reasoning":{"type":"boolean"},"tools":{"type":"object","additionalProperties":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"workflow"},"description":{"type":"string"},"workflowId":{"type":"string","format":"uuid"}},"required":["type","description","workflowId"],"additionalProperties":false}]}},"capabilities":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"knowledge_base"},"scope":{"type":"string","enum":["all","selected"]},"folderIds":{"type":"array","items":{"type":"string","format":"uuid"}}},"required":["type","scope","folderIds"],"additionalProperties":false}]}}},"required":["name","provider","model"],"additionalProperties":false}},"required":["op","sessionId","params"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"output":{"type":"object","properties":{"agentId":{"type":"string"},"localErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["agentId","localErrors"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}},{"op":"agent:update","tool":"algomo_edit","description":"Update a agent in the session. Provide only the fields you want to change. Tools are object-keyed by name — pass `null` to delete a tool, or a partial object to patch one.","gated":true,"input":{"type":"object","properties":{"op":{"type":"string","const":"agent:update"},"sessionId":{"type":"string"},"agentId":{"type":"string"},"params":{"type":"object","properties":{"name":{"type":"string","minLength":1},"instructions":{"type":"array","items":{"type":"string"}},"provider":{"type":"string","enum":["anthropic","google","mistralai","openai"]},"model":{"type":"string","minLength":1},"temperature":{"type":"number","minimum":0,"maximum":2},"maxSteps":{"type":"integer","minimum":1,"maximum":100},"reasoning":{"type":"boolean"},"tools":{"type":"object","additionalProperties":{"anyOf":[{"type":"object","properties":{"type":{"type":"string"},"description":{"type":"string"},"workflowId":{"type":"string"}},"additionalProperties":false},{"type":"null"}]}},"capabilities":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"knowledge_base"},"scope":{"type":"string","enum":["all","selected"]},"folderIds":{"type":"array","items":{"type":"string","format":"uuid"}}},"required":["type","scope","folderIds"],"additionalProperties":false}]}}},"additionalProperties":false}},"required":["op","sessionId","agentId","params"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"output":{"type":"object","properties":{"agent":{"type":"object","properties":{"id":{"type":"string"},"orgId":{"type":"string"},"name":{"type":"string","minLength":1},"instructions":{"type":"array","items":{"type":"string"}},"provider":{"type":"string","enum":["anthropic","google","mistralai","openai"]},"model":{"type":"string","minLength":1},"temperature":{"type":"number","minimum":0,"maximum":2},"maxSteps":{"type":"integer","minimum":1,"maximum":100},"reasoning":{"type":"boolean"},"capabilities":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"knowledge_base"},"scope":{"type":"string","enum":["all","selected"]},"folderIds":{"type":"array","items":{"type":"string","format":"uuid"}}},"required":["type","scope","folderIds"],"additionalProperties":false}]}},"createdAt":{"type":"string","format":"date-time"},"tools":{"type":"object","additionalProperties":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"workflow"},"description":{"type":"string"},"workflowId":{"type":"string","format":"uuid"}},"required":["type","description","workflowId"],"additionalProperties":false}]}}},"required":["id","orgId","name","instructions","provider","model","temperature","maxSteps","reasoning","capabilities","createdAt","tools"],"additionalProperties":false},"localErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["agent","localErrors"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}},{"op":"agent:delete","tool":"algomo_edit","description":"Mark a agent for deletion in the session.","gated":true,"input":{"type":"object","properties":{"op":{"type":"string","const":"agent:delete"},"sessionId":{"type":"string"},"agentId":{"type":"string"}},"required":["op","sessionId","agentId"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"output":{"type":"object","properties":{"agent":{"type":"object","properties":{"id":{"type":"string"},"orgId":{"type":"string"},"name":{"type":"string","minLength":1},"instructions":{"type":"array","items":{"type":"string"}},"provider":{"type":"string","enum":["anthropic","google","mistralai","openai"]},"model":{"type":"string","minLength":1},"temperature":{"type":"number","minimum":0,"maximum":2},"maxSteps":{"type":"integer","minimum":1,"maximum":100},"reasoning":{"type":"boolean"},"capabilities":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"knowledge_base"},"scope":{"type":"string","enum":["all","selected"]},"folderIds":{"type":"array","items":{"type":"string","format":"uuid"}}},"required":["type","scope","folderIds"],"additionalProperties":false}]}},"createdAt":{"type":"string","format":"date-time"},"tools":{"type":"object","additionalProperties":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"workflow"},"description":{"type":"string"},"workflowId":{"type":"string","format":"uuid"}},"required":["type","description","workflowId"],"additionalProperties":false}]}}},"required":["id","orgId","name","instructions","provider","model","temperature","maxSteps","reasoning","capabilities","createdAt","tools"],"additionalProperties":false},"localErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["agent","localErrors"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}},{"op":"agent:run","tool":"algomo_run","description":"Send a test message to a agent and get its response. Tests the saved configuration, or pass sessionId to test unsaved draft changes. Invocations are one-shot — no thread or memory is carried across calls.","input":{"type":"object","properties":{"op":{"type":"string","const":"agent:run"},"agentId":{"type":"string"},"message":{"type":"string","minLength":1},"sessionId":{"type":"string"}},"required":["op","agentId","message"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"output":{"type":"object","properties":{"response":{"type":"string","description":"The agent's final text — the reply after its last tool call."},"parts":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["text","tool"]},"text":{"type":["string","null"]},"tool":{"type":["string","null"]},"toolCallId":{"type":["string","null"]}},"required":["type","text","tool","toolCallId"],"additionalProperties":false},"description":"Ordered run content: text blocks and tool calls as they streamed."},"toolCalls":{"type":"array","items":{"type":"object","properties":{"tool":{"type":"string"},"toolCallId":{"type":"string"},"args":{},"result":{}},"additionalProperties":false}},"durationMs":{"type":"number"}},"required":["response","parts","durationMs"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}},{"op":"browser:info","tool":"algomo_read","description":"Overview of the browser:* namespace — what a paired browser extension can do and how to drive it. Call this before the other browser ops. While impersonating another org, the response also explains that browser ops act on your own browser under your real org (not the impersonated one).","input":{"type":"object","properties":{"op":{"type":"string","const":"browser:info"}},"required":["op"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"output":{"type":"object","properties":{"overview":{"type":"string"}},"required":["overview"],"additionalProperties":true,"$schema":"http://json-schema.org/draft-07/schema#"}},{"op":"browser:listSessions","tool":"algomo_read","description":"List the paired browser-extension sessions currently connected for your org, with the owning user and a browser label. Each session is one browser; use browser:listTabs to see its tabs. Returns nothing if no extension is paired and connected.","input":{"type":"object","properties":{"op":{"type":"string","const":"browser:listSessions"}},"required":["op"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"output":{"type":"object","properties":{"sessions":{"type":"array","items":{"type":"object","properties":{"browserSessionId":{"type":"string"},"label":{"type":"string"},"userId":{"type":"string"},"userName":{"type":["string","null"]},"userEmail":{"type":["string","null"]}},"required":["browserSessionId","label","userId","userName","userEmail"],"additionalProperties":false}}},"required":["sessions"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}},{"op":"browser:listTabs","tool":"algomo_read","description":"List a session's tabs that have the extension enabled, with each tab's live current URL and title. Pick a tabId from here for browser:getCaptures, browser:runScript, browser:request, and browser:navigate. Only enabled-origin tabs are listed.","input":{"type":"object","properties":{"op":{"type":"string","const":"browser:listTabs"},"browserSessionId":{"type":"string","format":"uuid"},"timeoutMs":{"type":"integer","minimum":1000,"maximum":120000}},"required":["op","browserSessionId"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"output":{"type":"object","properties":{"tabs":{"type":"array","items":{"type":"object","properties":{"tabId":{"type":"integer"},"url":{"type":"string"},"title":{"type":"string"},"active":{"type":"boolean"}},"required":["tabId","url","title","active"],"additionalProperties":false}}},"required":["tabs"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}},{"op":"browser:getCaptures","tool":"algomo_read","description":"Drain the passively-captured request/response records buffered for a specific tab (return-and-clear — repeated calls don't re-deliver). Defaults to a compact summary: one line per call (method, URL, status, content type, body sizes) — enough to discover which APIs a page uses. Pass include: \"full\" for bodies (truncated to maxBodyChars, default 2000), and maxRecords to bound the batch. Keep these bounds: a busy page can buffer megabytes, and an oversized result is rejected wholesale — the records are already cleared by then, so they are lost.","input":{"type":"object","properties":{"op":{"type":"string","const":"browser:getCaptures"},"browserSessionId":{"type":"string","format":"uuid"},"tabId":{"type":"integer"},"timeoutMs":{"type":"integer","minimum":1000,"maximum":120000},"include":{"type":"string","enum":["summary","full"]},"maxRecords":{"type":"integer","minimum":1,"maximum":1000},"maxBodyChars":{"type":"integer","minimum":0,"maximum":20000}},"required":["op","browserSessionId","tabId"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"output":{"type":"object","properties":{"captures":{"type":"array","items":{"type":"object","properties":{"method":{"type":"string"},"url":{"type":"string"},"pageUrl":{"type":"string"},"status":{"type":"number"},"opaque":{"type":"boolean"},"ts":{"type":"number"},"contentType":{"type":["string","null"]},"requestBodyChars":{"type":"integer"},"responseBodyChars":{"type":"integer"},"requestBody":{"type":["string","null"]},"responseBody":{"type":["string","null"]},"bodiesTruncated":{"type":"boolean"}},"required":["method","url","pageUrl","status","opaque","ts","contentType","requestBodyChars","responseBodyChars"],"additionalProperties":false}},"returned":{"type":"integer"},"dropped":{"type":"integer"},"note":{"type":"string"}},"required":["captures","returned","dropped","note"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}},{"op":"browser:runScript","tool":"algomo_run","description":"Run JavaScript in a specific tab's page context (MAIN world) and return its value. The code is the body of an async function — reference inputs via `args`, top-level `await` is allowed, and end with a top-level `return` of the result (same convention as connector scripts). A script that throws fails the op with the script's error. Only works on enabled-origin tabs.","input":{"type":"object","properties":{"op":{"type":"string","const":"browser:runScript"},"browserSessionId":{"type":"string","format":"uuid"},"tabId":{"type":"integer"},"code":{"type":"string","minLength":1},"args":{"type":"object","additionalProperties":{}},"timeoutMs":{"type":"integer","minimum":1000,"maximum":120000}},"required":["op","browserSessionId","tabId","code"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"output":{"type":"object","properties":{"result":{}},"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}},{"op":"browser:request","tool":"algomo_run","description":"Replay an HTTP request from inside a specific tab, so it carries that page's cookies (including HttpOnly/SameSite), Origin, and Referer exactly as the app's own calls do — use this to probe the site's APIs. Pass the call to replay as a nested `request` object ({ url, method, headers, body }); the reply comes back under `response` (status, headers, body). Only works on enabled-origin tabs.","input":{"type":"object","properties":{"op":{"type":"string","const":"browser:request"},"browserSessionId":{"type":"string","format":"uuid"},"tabId":{"type":"integer"},"request":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"method":{"type":"string","enum":["GET","POST","PUT","PATCH","DELETE"],"default":"GET"},"headers":{"type":"object","additionalProperties":{"type":"string"}},"body":{}},"required":["url"],"additionalProperties":false},"timeoutMs":{"type":"integer","minimum":1000,"maximum":120000}},"required":["op","browserSessionId","tabId","request"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"output":{"type":"object","properties":{"response":{"type":"object","properties":{"status":{"type":"number"},"headers":{"type":"object","additionalProperties":{"type":"string"}},"body":{}},"required":["status","headers"],"additionalProperties":false}},"required":["response"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}},{"op":"browser:navigate","tool":"algomo_run","description":"Navigate a specific tab to a URL and wait for the load to settle, returning the tab's final url and title (so redirects are visible). Both the tab's current origin and the destination origin must be enabled for the extension — you can move a tab around the client's own site(s), but not to arbitrary origins.","input":{"type":"object","properties":{"op":{"type":"string","const":"browser:navigate"},"browserSessionId":{"type":"string","format":"uuid"},"tabId":{"type":"integer"},"url":{"type":"string","format":"uri"},"timeoutMs":{"type":"integer","minimum":1000,"maximum":120000}},"required":["op","browserSessionId","tabId","url"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"output":{"type":"object","properties":{"url":{"type":"string"},"title":{"type":"string"}},"required":["url","title"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}},{"op":"browser:screenshot","tool":"algomo_read","description":"Capture a screenshot of a tab's visible viewport (jpeg by default, or png; quality applies to jpeg only). The image is uploaded to short-lived private storage — you get back a presigned image URL valid for about an hour (the object itself is deleted within a day) plus its pixel dimensions. Only enabled-origin tabs can be captured; the extension briefly activates the target tab to take the shot.","input":{"type":"object","properties":{"op":{"type":"string","const":"browser:screenshot"},"browserSessionId":{"type":"string","format":"uuid"},"tabId":{"type":"integer"},"format":{"type":"string","enum":["jpeg","png"]},"quality":{"type":"integer","minimum":1,"maximum":100},"timeoutMs":{"type":"integer","minimum":1000,"maximum":120000}},"required":["op","browserSessionId","tabId"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"output":{"type":"object","properties":{"url":{"type":"string"},"expiresInSeconds":{"type":"integer"},"width":{"type":"integer"},"height":{"type":"integer"},"byteLength":{"type":"integer"}},"required":["url","expiresInSeconds","width","height","byteLength"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}},{"op":"task:list","tool":"algomo_read","description":"List the org's tasks (things a user or agent needs to resolve). Defaults to open tasks; pass status to inspect done/dismissed, or kind to filter.","input":{"type":"object","properties":{"op":{"type":"string","const":"task:list"},"status":{"type":"string","enum":["open","done","dismissed"]},"kind":{"type":"string","enum":["onboarding","workflow_failure","plan_part"]}},"required":["op"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"output":{"type":"object","properties":{"tasks":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["onboarding","workflow_failure","plan_part"]},"title":{"type":"string"},"description":{"type":["string","null"]},"status":{"type":"string","enum":["open","done","dismissed"]},"resolvableBy":{"type":"string","enum":["agent","user_and_agent"]},"subtasks":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"title":{"type":"string"},"instructions":{"type":"string"},"status":{"type":"string","enum":["open","done","skipped"]}},"required":["key","title","instructions","status"],"additionalProperties":false}},"context":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"onboarding"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"workflow_failure"},"workflowId":{"type":"string","format":"uuid"}},"required":["kind","workflowId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"plan_part"},"planVersion":{"type":"integer"},"partIndex":{"anyOf":[{"type":"integer"},{"type":"null"}]}},"required":["kind","planVersion","partIndex"],"additionalProperties":false}]},"createdAt":{"type":"string"},"completedAt":{"type":["string","null"]}},"required":["id","kind","title","description","status","resolvableBy","subtasks","context","createdAt","completedAt"],"additionalProperties":false}}},"required":["tasks"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}},{"op":"task:get","tool":"algomo_read","description":"Get one task by ID, including its subtasks and their instructions.","input":{"type":"object","properties":{"op":{"type":"string","const":"task:get"},"taskId":{"type":"string"}},"required":["op","taskId"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"output":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["onboarding","workflow_failure","plan_part"]},"title":{"type":"string"},"description":{"type":["string","null"]},"status":{"type":"string","enum":["open","done","dismissed"]},"resolvableBy":{"type":"string","enum":["agent","user_and_agent"]},"subtasks":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"title":{"type":"string"},"instructions":{"type":"string"},"status":{"type":"string","enum":["open","done","skipped"]}},"required":["key","title","instructions","status"],"additionalProperties":false}},"context":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"onboarding"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"workflow_failure"},"workflowId":{"type":"string","format":"uuid"}},"required":["kind","workflowId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"plan_part"},"planVersion":{"type":"integer"},"partIndex":{"anyOf":[{"type":"integer"},{"type":"null"}]}},"required":["kind","planVersion","partIndex"],"additionalProperties":false}]},"createdAt":{"type":"string"},"completedAt":{"type":["string","null"]}},"required":["id","kind","title","description","status","resolvableBy","subtasks","context","createdAt","completedAt"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}},{"op":"task:complete","tool":"algomo_edit","description":"Mark a whole task as done.","input":{"type":"object","properties":{"op":{"type":"string","const":"task:complete"},"taskId":{"type":"string"}},"required":["op","taskId"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"output":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["onboarding","workflow_failure","plan_part"]},"title":{"type":"string"},"description":{"type":["string","null"]},"status":{"type":"string","enum":["open","done","dismissed"]},"resolvableBy":{"type":"string","enum":["agent","user_and_agent"]},"subtasks":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"title":{"type":"string"},"instructions":{"type":"string"},"status":{"type":"string","enum":["open","done","skipped"]}},"required":["key","title","instructions","status"],"additionalProperties":false}},"context":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"onboarding"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"workflow_failure"},"workflowId":{"type":"string","format":"uuid"}},"required":["kind","workflowId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"plan_part"},"planVersion":{"type":"integer"},"partIndex":{"anyOf":[{"type":"integer"},{"type":"null"}]}},"required":["kind","planVersion","partIndex"],"additionalProperties":false}]},"createdAt":{"type":"string"},"completedAt":{"type":["string","null"]}},"required":["id","kind","title","description","status","resolvableBy","subtasks","context","createdAt","completedAt"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}},{"op":"task:dismiss","tool":"algomo_edit","description":"Dismiss a task — hide it without acting on it. Use complete when the work was actually done.","input":{"type":"object","properties":{"op":{"type":"string","const":"task:dismiss"},"taskId":{"type":"string"}},"required":["op","taskId"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"output":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["onboarding","workflow_failure","plan_part"]},"title":{"type":"string"},"description":{"type":["string","null"]},"status":{"type":"string","enum":["open","done","dismissed"]},"resolvableBy":{"type":"string","enum":["agent","user_and_agent"]},"subtasks":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"title":{"type":"string"},"instructions":{"type":"string"},"status":{"type":"string","enum":["open","done","skipped"]}},"required":["key","title","instructions","status"],"additionalProperties":false}},"context":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"onboarding"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"workflow_failure"},"workflowId":{"type":"string","format":"uuid"}},"required":["kind","workflowId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"plan_part"},"planVersion":{"type":"integer"},"partIndex":{"anyOf":[{"type":"integer"},{"type":"null"}]}},"required":["kind","planVersion","partIndex"],"additionalProperties":false}]},"createdAt":{"type":"string"},"completedAt":{"type":["string","null"]}},"required":["id","kind","title","description","status","resolvableBy","subtasks","context","createdAt","completedAt"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}},{"op":"task:completeSubtask","tool":"algomo_edit","description":"Mark one subtask (by its key) done. The task auto-closes once every subtask is resolved.","input":{"type":"object","properties":{"op":{"type":"string","const":"task:completeSubtask"},"taskId":{"type":"string"},"key":{"type":"string"}},"required":["op","taskId","key"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"output":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["onboarding","workflow_failure","plan_part"]},"title":{"type":"string"},"description":{"type":["string","null"]},"status":{"type":"string","enum":["open","done","dismissed"]},"resolvableBy":{"type":"string","enum":["agent","user_and_agent"]},"subtasks":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"title":{"type":"string"},"instructions":{"type":"string"},"status":{"type":"string","enum":["open","done","skipped"]}},"required":["key","title","instructions","status"],"additionalProperties":false}},"context":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"onboarding"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"workflow_failure"},"workflowId":{"type":"string","format":"uuid"}},"required":["kind","workflowId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"plan_part"},"planVersion":{"type":"integer"},"partIndex":{"anyOf":[{"type":"integer"},{"type":"null"}]}},"required":["kind","planVersion","partIndex"],"additionalProperties":false}]},"createdAt":{"type":"string"},"completedAt":{"type":["string","null"]}},"required":["id","kind","title","description","status","resolvableBy","subtasks","context","createdAt","completedAt"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}},{"op":"task:skipSubtask","tool":"algomo_edit","description":"Mark one subtask (by its key) not-applicable. Counts as resolved for auto-close.","input":{"type":"object","properties":{"op":{"type":"string","const":"task:skipSubtask"},"taskId":{"type":"string"},"key":{"type":"string"}},"required":["op","taskId","key"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"output":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["onboarding","workflow_failure","plan_part"]},"title":{"type":"string"},"description":{"type":["string","null"]},"status":{"type":"string","enum":["open","done","dismissed"]},"resolvableBy":{"type":"string","enum":["agent","user_and_agent"]},"subtasks":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"title":{"type":"string"},"instructions":{"type":"string"},"status":{"type":"string","enum":["open","done","skipped"]}},"required":["key","title","instructions","status"],"additionalProperties":false}},"context":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"onboarding"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"workflow_failure"},"workflowId":{"type":"string","format":"uuid"}},"required":["kind","workflowId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"plan_part"},"planVersion":{"type":"integer"},"partIndex":{"anyOf":[{"type":"integer"},{"type":"null"}]}},"required":["kind","planVersion","partIndex"],"additionalProperties":false}]},"createdAt":{"type":"string"},"completedAt":{"type":["string","null"]}},"required":["id","kind","title","description","status","resolvableBy","subtasks","context","createdAt","completedAt"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}},{"op":"settings:getMessenger","tool":"algomo_read","description":"Get the org's messenger (chat widget) channel settings. `allowedDomains` restricts which website domains the widget may open on; an EMPTY list means the widget is allowed on every domain — do not clear the list to disable the widget. `title` is shown in the widget header and empty state; `avatarUrl` is the public URL of the uploaded avatar shown on bot messages (null = default icon), scaled within its frame by `avatarScale` (percent); `mainColor` is the accent hex behind the trigger bubble, the visitor's message bubbles, and the default avatar; `horizontalOffset`/`bottomOffset` inset the trigger bubble from the page's bottom-right corner, in px.","input":{"type":"object","properties":{"op":{"type":"string","const":"settings:getMessenger"}},"required":["op"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"output":{"type":"object","properties":{"allowedDomains":{"type":"array","items":{"type":"string"}},"title":{"type":"string"},"avatarUrl":{"type":["string","null"]},"avatarScale":{"type":"number"},"avatarBackground":{"type":"boolean"},"mainColor":{"type":"string"},"horizontalOffset":{"type":"number"},"bottomOffset":{"type":"number"}},"required":["allowedDomains","title","avatarUrl","avatarScale","avatarBackground","mainColor","horizontalOffset","bottomOffset"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}},{"op":"settings:updateMessenger","tool":"algomo_edit","description":"Update the org's messenger (chat widget) channel settings — a partial update; omitted fields keep their current value. `allowedDomains`, when provided, is the FULL new list (not a patch) of bare domains like example.com — no protocol or path; entries are normalised (lowercase, www stripped) and deduplicated, max 200; an empty list allows the widget on every domain. `title` (1–80 chars) is shown in the widget header and empty state. `avatarUrl` is the image shown as the bot avatar: a URL from the avatar upload flow (validated as this org's file) or any other public https image URL, stored as-is; pass null to clear it. `avatarScale` (25–200 percent, default 100) scales the uploaded avatar image within its frame and `avatarBackground` (default true) toggles the frame's solid fill behind it — neither affects the default icon. `mainColor` (hex like #4f46e5, default #091724) is the accent behind the trigger bubble, the visitor's message bubbles, and the default avatar; the widget picks light or dark foreground automatically. `horizontalOffset`/`bottomOffset` (0–400 px, default 16) inset the trigger bubble from the page's bottom-right corner. Live op — takes effect immediately, no session/save step.","gated":true,"input":{"type":"object","properties":{"op":{"type":"string","const":"settings:updateMessenger"},"allowedDomains":{"type":"array","items":{"type":"string","minLength":1},"maxItems":200},"title":{"type":"string","minLength":1,"maxLength":80},"avatarUrl":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"avatarScale":{"type":"integer","minimum":25,"maximum":200},"avatarBackground":{"type":"boolean"},"mainColor":{"type":"string","pattern":"^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6})$"},"horizontalOffset":{"type":"integer","minimum":0,"maximum":400},"bottomOffset":{"type":"integer","minimum":0,"maximum":400}},"required":["op"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"output":{"type":"object","properties":{"allowedDomains":{"type":"array","items":{"type":"string"}},"title":{"type":"string"},"avatarUrl":{"type":["string","null"]},"avatarScale":{"type":"number"},"avatarBackground":{"type":"boolean"},"mainColor":{"type":"string"},"horizontalOffset":{"type":"number"},"bottomOffset":{"type":"number"}},"required":["allowedDomains","title","avatarUrl","avatarScale","avatarBackground","mainColor","horizontalOffset","bottomOffset"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}},{"op":"setup:status","tool":"algomo_read","description":"Get the agent-onboarding state for this workspace: whether setup is required before configuration changes are allowed, spec progress per part, and the next action to take.","input":{"type":"object","properties":{"op":{"type":"string","const":"setup:status"}},"required":["op"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"output":{"type":"object","properties":{"onboardingRequired":{"type":"boolean"},"specComplete":{"type":"boolean"},"planSubmitted":{"type":"boolean"},"recipesRead":{"type":"integer"},"recipesTotal":{"type":"integer"},"unreadRecipeIds":{"type":"array","items":{"type":"string"}},"browserPaired":{"type":"boolean"},"browserEvidence":{"type":"string","enum":["ready","missing","waived"]},"websiteAccess":{"type":"string","enum":["unverified","verified","waived"]},"parts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"state":{"type":"string","enum":["complete","current","locked"]},"answeredCount":{"type":"integer"},"questionCount":{"type":"integer"}},"required":["id","title","state","answeredCount","questionCount"],"additionalProperties":false}},"plan":{"anyOf":[{"type":"object","properties":{"version":{"type":"integer"},"partCount":{"type":"integer"},"submittedAt":{"type":"string"}},"required":["version","partCount","submittedAt"],"additionalProperties":false},{"type":"null"}]},"nextAction":{"type":"string"}},"required":["onboardingRequired","specComplete","planSubmitted","recipesRead","recipesTotal","unreadRecipeIds","browserPaired","browserEvidence","websiteAccess","parts","plan","nextAction"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}},{"op":"setup:getSpec","tool":"algomo_read","description":"Get the workspace spec — questions about the customer's company, website, existing interactions, and goals. Parts unlock sequentially; answer the current part via setup:answerSpec. Gather real evidence (browse the site, use browser:* ops, or ask your user) — do not guess.","input":{"type":"object","properties":{"op":{"type":"string","const":"setup:getSpec"}},"required":["op"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"output":{"type":"object","properties":{"specComplete":{"type":"boolean"},"browserPaired":{"type":"boolean"},"browserEvidence":{"type":"string","enum":["ready","missing","waived"]},"parts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"state":{"type":"string","enum":["complete","current","locked"]},"intro":{"type":"string"},"questions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"question":{"type":"string"},"hint":{"type":"string"},"answer":{"type":["string","null"]}},"required":["id","question","answer"],"additionalProperties":false}}},"required":["id","title","state"],"additionalProperties":false}},"instructions":{"type":"string"}},"required":["specComplete","browserPaired","browserEvidence","parts","instructions"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}},{"op":"setup:answerSpec","tool":"algomo_edit","description":"Answer spec questions. Accepts answers for the current (and earlier) parts only — future parts stay locked until the current one is complete. Once every part is answered, the next step is a build plan (setup:submitPlan).","input":{"type":"object","properties":{"op":{"type":"string","const":"setup:answerSpec"},"answers":{"type":"array","items":{"type":"object","properties":{"questionId":{"type":"string"},"answer":{"type":"string","minLength":1}},"required":["questionId","answer"],"additionalProperties":false},"minItems":1}},"required":["op","answers"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"output":{"type":"object","properties":{"accepted":{"type":"integer"},"specComplete":{"type":"boolean"},"currentPart":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"missingQuestionIds":{"type":"array","items":{"type":"string"}}},"required":["id","title","missingQuestionIds"],"additionalProperties":false},{"type":"null"}]},"nextAction":{"type":"string"}},"required":["accepted","specComplete","currentPart","nextAction"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}},{"op":"setup:waiveBrowserEvidence","tool":"algomo_edit","description":"Record that the user explicitly declined pairing the Algomo browser extension, unblocking the evidence-gated spec parts on fallback evidence. ONLY call this after your user has clearly declined in chat — never to route around the requirement yourself. The reason is recorded verbatim and audited.","input":{"type":"object","properties":{"op":{"type":"string","const":"setup:waiveBrowserEvidence"},"reason":{"type":"string","minLength":10}},"required":["op","reason"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"output":{"type":"object","properties":{"waived":{"type":"boolean"},"reason":{"type":"string"},"nextAction":{"type":"string"}},"required":["waived","reason","nextAction"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}},{"op":"setup:verifyWebsiteAccess","tool":"algomo_run","description":"Verify the chatbot's website-browsing tools against what the site actually shows — the mandatory finish line of the website-access build task. YOU gather the rendered side: drive the user's paired browser to each page (browser:navigate — tell your user first, you will steer their tab for a minute) and read the rendered text and main-content links (browser:runScript, extraction adapted to the site — SPAs, cookie banners, odd DOM are yours to handle). Submit at least two pages (a listing page and a detail page) with the tool + input that should reproduce each. The server then runs your tool itself and scores the match mechanically: text coverage and item-link coverage. If a page paginates, make sure your tool follows the pages — coverage is scored per page, so completeness beyond page 1 is on you. Iterate until every page passes; the scores are stored and quoted in your final report.","input":{"type":"object","properties":{"op":{"type":"string","const":"setup:verifyWebsiteAccess"},"sessionId":{"type":"string"},"pages":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"toolWorkflowId":{"type":"string"},"input":{"type":"object","additionalProperties":{}},"renderedText":{"type":"string","minLength":1},"renderedLinks":{"type":"array","items":{"type":"string"}}},"required":["url","toolWorkflowId","renderedText","renderedLinks"],"additionalProperties":false},"minItems":2,"maxItems":5}},"required":["op","pages"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"output":{"type":"object","properties":{"verified":{"type":"boolean"},"pages":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"toolWorkflowId":{"type":"string"},"passed":{"type":"boolean"},"textCoverage":{"type":["number","null"]},"linkCoverage":{"type":["number","null"]},"renderedLinkCount":{"type":"integer"},"matchedLinkCount":{"type":"integer"},"failures":{"type":"array","items":{"type":"string"}},"error":{"type":["string","null"]}},"required":["url","toolWorkflowId","passed","textCoverage","linkCoverage","renderedLinkCount","matchedLinkCount","failures","error"],"additionalProperties":false}},"guidance":{"type":"string"}},"required":["verified","pages","guidance"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}},{"op":"setup:waiveWebsiteAccess","tool":"algomo_edit","description":"Record that verified website access is not achievable for this site and the user accepts proceeding without it. ONLY call this after your user has explicitly accepted in chat — never to skip verification effort. The reason is recorded verbatim and audited.","input":{"type":"object","properties":{"op":{"type":"string","const":"setup:waiveWebsiteAccess"},"reason":{"type":"string","minLength":10}},"required":["op","reason"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"output":{"type":"object","properties":{"waived":{"type":"boolean"},"reason":{"type":"string"},"nextAction":{"type":"string"}},"required":["waived","reason","nextAction"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}},{"op":"setup:getPlan","tool":"algomo_read","description":"Get the current build plan (latest submitted version) and setup progress toward it.","input":{"type":"object","properties":{"op":{"type":"string","const":"setup:getPlan"}},"required":["op"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"output":{"type":"object","properties":{"plan":{"anyOf":[{"type":"object","properties":{"version":{"type":"integer"},"parts":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string","minLength":1},"description":{"type":"string","minLength":1}},"required":["title","description"],"additionalProperties":false}},"searchDecision":{"anyOf":[{"anyOf":[{"type":"object","properties":{"decision":{"type":"string","const":"planned"}},"required":["decision"],"additionalProperties":false},{"type":"object","properties":{"decision":{"type":"string","const":"skipped"},"reason":{"type":"string","minLength":1}},"required":["decision","reason"],"additionalProperties":false}]},{"type":"null"}]},"submittedAt":{"type":"string"}},"required":["version","parts","searchDecision","submittedAt"],"additionalProperties":false},{"type":"null"}]},"versionCount":{"type":"integer"},"nextAction":{"type":"string"}},"required":["plan","versionCount","nextAction"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}},{"op":"setup:submitPlan","tool":"algomo_edit","description":"Submit the build plan: the parts you intend to build (title + description each), grounded in the spec answers, plus a searchDecision — sites with search get a search tool by default: 'planned' spawns its own build task (never write search as a plan part), and skipping requires a recorded reason your user has accepted. IMPORTANT: present the plan to your user in chat and get their explicit go-ahead BEFORE submitting. Requires a complete spec. Re-submitting replaces the plan (versions are kept; open build tasks are re-synced). Submitting completes setup, unlocks configuration ops, and spawns one build task per plan part plus fixed messenger-config and test-and-report tasks — work through them via task:list.","input":{"type":"object","properties":{"op":{"type":"string","const":"setup:submitPlan"},"parts":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string","minLength":1},"description":{"type":"string","minLength":1}},"required":["title","description"],"additionalProperties":false},"minItems":1},"searchDecision":{"anyOf":[{"type":"object","properties":{"decision":{"type":"string","const":"planned"}},"required":["decision"],"additionalProperties":false},{"type":"object","properties":{"decision":{"type":"string","const":"skipped"},"reason":{"type":"string","minLength":1}},"required":["decision","reason"],"additionalProperties":false}],"description":"The plan's stance on site search — sites with search get a search tool by default. { decision: \"planned\" } spawns a dedicated build task for the search tool (website-search recipe) — do not also write search as a plan part. { decision: \"skipped\", reason } records why not — a reason your user has seen and accepted. Check the spec's site_search/search_endpoint answers."}},"required":["op","parts","searchDecision"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"output":{"type":"object","properties":{"version":{"type":"integer"},"partCount":{"type":"integer"},"setupComplete":{"type":"boolean"},"nextAction":{"type":"string"}},"required":["version","partCount","setupComplete","nextAction"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}},{"op":"recipe:list","tool":"algomo_read","description":"List the recipe catalog — capability playbooks with best practices. Read them ALL with recipe:get before planning: setup:submitPlan is blocked until every recipe has been read, because a plan is only as good as your knowledge of what the product can do.","input":{"type":"object","properties":{"op":{"type":"string","const":"recipe:list"}},"required":["op"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"output":{"type":"object","properties":{"recipes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"summary":{"type":"string"},"hasTemplate":{"type":"boolean"}},"required":["id","title","summary","hasTemplate"],"additionalProperties":false}}},"required":["recipes"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}},{"op":"recipe:get","tool":"algomo_read","description":"Get a recipe's full playbook (markdown) and, for template recipes, the JSON Schema of recipe:apply's input.","input":{"type":"object","properties":{"op":{"type":"string","const":"recipe:get"},"recipeId":{"type":"string"}},"required":["op","recipeId"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"output":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"summary":{"type":"string"},"content":{"type":"string"},"inputSchema":{"anyOf":[{"type":"object","additionalProperties":{}},{"type":"null"}]}},"required":["id","title","summary","content","inputSchema"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}},{"op":"recipe:apply","tool":"algomo_edit","description":"Stage a recipe's template into a session: a known-good, pre-wired starting point (entities created and attached). Read the recipe first (recipe:get) — its input schema and the customization guidance matter. Review what was staged with session:diff and customize it against the workspace spec before saving.","gated":true,"input":{"type":"object","properties":{"op":{"type":"string","const":"recipe:apply"},"recipeId":{"type":"string"},"sessionId":{"type":"string"},"input":{"type":"object","additionalProperties":{}}},"required":["op","recipeId","sessionId"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"output":{"type":"object","properties":{"staged":{"type":"object","additionalProperties":{"type":"string"}},"summary":{"type":"string"}},"required":["staged","summary"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}},{"op":"link:get","tool":"algomo_read","description":"Build a dashboard link to any app page for your user. `target.page` names the page and the rest of `target` its params (see the schema: a chatbot, a workflow's runs tab, a conversation, a wiki page by its folder-slug/page-slug path, the settings pages). Pass `sessionId` to open the page with that edit session selected, so the user sees the staged changes in place — this is how you show your user what you built before it is saved. Never assemble dashboard URLs yourself.","input":{"type":"object","properties":{"op":{"type":"string","const":"link:get"},"target":{"anyOf":[{"type":"object","properties":{"page":{"type":"string","const":"home"}},"required":["page"],"additionalProperties":false},{"type":"object","properties":{"page":{"type":"string","const":"conversations"}},"required":["page"],"additionalProperties":false},{"type":"object","properties":{"page":{"type":"string","const":"conversation"},"threadId":{"type":"string","minLength":1}},"required":["page","threadId"],"additionalProperties":false},{"type":"object","properties":{"page":{"type":"string","const":"contacts"}},"required":["page"],"additionalProperties":false},{"type":"object","properties":{"page":{"type":"string","const":"contact"},"contactId":{"$ref":"#/properties/target/anyOf/2/properties/threadId"},"tab":{"type":"string","enum":["activity"]}},"required":["page","contactId"],"additionalProperties":false},{"type":"object","properties":{"page":{"type":"string","const":"companies"}},"required":["page"],"additionalProperties":false},{"type":"object","properties":{"page":{"type":"string","const":"company"},"domain":{"$ref":"#/properties/target/anyOf/2/properties/threadId"},"tab":{"type":"string","enum":["activity"]}},"required":["page","domain"],"additionalProperties":false},{"type":"object","properties":{"page":{"type":"string","const":"chatbots"}},"required":["page"],"additionalProperties":false},{"type":"object","properties":{"page":{"type":"string","const":"chatbot"},"chatbotId":{"$ref":"#/properties/target/anyOf/2/properties/threadId"},"tab":{"type":"string","enum":["general","goals"]}},"required":["page","chatbotId"],"additionalProperties":false},{"type":"object","properties":{"page":{"type":"string","const":"workflows"}},"required":["page"],"additionalProperties":false},{"type":"object","properties":{"page":{"type":"string","const":"workflow"},"workflowId":{"$ref":"#/properties/target/anyOf/2/properties/threadId"},"tab":{"type":"string","enum":["overview","runs"]}},"required":["page","workflowId"],"additionalProperties":false},{"type":"object","properties":{"page":{"type":"string","const":"agents"}},"required":["page"],"additionalProperties":false},{"type":"object","properties":{"page":{"type":"string","const":"agent"},"agentId":{"$ref":"#/properties/target/anyOf/2/properties/threadId"}},"required":["page","agentId"],"additionalProperties":false},{"type":"object","properties":{"page":{"type":"string","const":"tools"}},"required":["page"],"additionalProperties":false},{"type":"object","properties":{"page":{"type":"string","const":"tool"},"toolId":{"$ref":"#/properties/target/anyOf/2/properties/threadId"},"tab":{"$ref":"#/properties/target/anyOf/10/properties/tab"}},"required":["page","toolId"],"additionalProperties":false},{"type":"object","properties":{"page":{"type":"string","const":"cards"}},"required":["page"],"additionalProperties":false},{"type":"object","properties":{"page":{"type":"string","const":"card"},"cardId":{"$ref":"#/properties/target/anyOf/2/properties/threadId"},"tab":{"type":"string","enum":["css","js"]}},"required":["page","cardId"],"additionalProperties":false},{"type":"object","properties":{"page":{"type":"string","const":"cardWorkflow"},"cardId":{"$ref":"#/properties/target/anyOf/2/properties/threadId"},"tab":{"$ref":"#/properties/target/anyOf/10/properties/tab"}},"required":["page","cardId"],"additionalProperties":false},{"type":"object","properties":{"page":{"type":"string","const":"connectors"}},"required":["page"],"additionalProperties":false},{"type":"object","properties":{"page":{"type":"string","const":"connector"},"connectorId":{"$ref":"#/properties/target/anyOf/2/properties/threadId"}},"required":["page","connectorId"],"additionalProperties":false},{"type":"object","properties":{"page":{"type":"string","const":"calendars"}},"required":["page"],"additionalProperties":false},{"type":"object","properties":{"page":{"type":"string","const":"calendar"},"calendarId":{"$ref":"#/properties/target/anyOf/2/properties/threadId"}},"required":["page","calendarId"],"additionalProperties":false},{"type":"object","properties":{"page":{"type":"string","const":"knowledgeBase"}},"required":["page"],"additionalProperties":false},{"type":"object","properties":{"page":{"type":"string","const":"wikiPage"},"path":{"type":"string","pattern":"^[^/]+\\/[^/]+$"}},"required":["page","path"],"additionalProperties":false},{"type":"object","properties":{"page":{"type":"string","const":"settingsGeneral"}},"required":["page"],"additionalProperties":false},{"type":"object","properties":{"page":{"type":"string","const":"settingsTeam"}},"required":["page"],"additionalProperties":false},{"type":"object","properties":{"page":{"type":"string","const":"settingsConnections"}},"required":["page"],"additionalProperties":false},{"type":"object","properties":{"page":{"type":"string","const":"settingsMessenger"}},"required":["page"],"additionalProperties":false},{"type":"object","properties":{"page":{"type":"string","const":"settingsBrowsers"}},"required":["page"],"additionalProperties":false},{"type":"object","properties":{"page":{"type":"string","const":"settingsBilling"},"tab":{"type":"string","enum":["usage"]}},"required":["page"],"additionalProperties":false}]},"sessionId":{"type":"string","minLength":1}},"required":["op","target"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"output":{"type":"object","properties":{"url":{"type":"string"}},"required":["url"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}},{"op":"testCase:run","tool":"algomo_run","description":"Play one test case against its target and judge the result, waiting for the answer. Each rep is a fresh test conversation (isTest: true in chat:listThreads) recorded as a run with its transcript, every check's outcome, the judge's verdict per turn and on the rubric, and the versions of the case and target it ran on. Tests the saved configuration, or pass sessionId to run the staged case against the staged target. The chatbot's tool workflows execute for real on a test run: stage a session where nodes that submit, email or write to a CRM are gated or removed, and pass it as sessionId. A tool that fails — a thrown tool, or a workflow tool whose run failed, an authored fail_workflow ending included — fails the run on the spot with score 0 and a `failure` naming the tool, the turn and the workflow run; the turns after it are not played. Every rep is a separate conversation, so a chatbot's own stability shows as reps that disagree. The call is synchronous and returns when every rep has finished, which takes as long as the conversations do (each rep is ended as an error after the run timeout, keeping the turns that landed): run it as a background task when you can. A rep that fails for a reason the next one would meet too (out of credits, a target that cannot be resolved) ends the reps; the rest are recorded as errors naming it. A rep that could not start at all (a case that vanished, a session that no longer exists) has no run: it is one of `batch.failures` with the reason, and `pass` is false. Tool arguments and results on a run are cut to a few hundred characters (`truncated`); the full payloads are on the conversation thread. For several cases, or more reps, use testCase:runBatch.","input":{"type":"object","properties":{"op":{"type":"string","const":"testCase:run"},"testCaseId":{"type":"string","format":"uuid"},"sessionId":{"type":"string","description":"Run against this edit session's staged config (the case and its target); omit for the saved config."},"reps":{"type":"integer","minimum":1,"maximum":3,"default":1,"description":"How many times to play the case, to see how stable a behaviour is (at most 3 per call)."}},"required":["op","testCaseId"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"output":{"type":"object","properties":{"pass":{"type":"boolean"},"batch":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"orgId":{"type":"string"},"createdBy":{"type":"string"},"targetId":{"type":"string","format":"uuid"},"selection":{"type":"object","properties":{"testCaseIds":{"type":"array","items":{"type":"string","format":"uuid"},"default":[]},"tags":{"type":"array","items":{"type":"string","minLength":1},"default":[]}},"additionalProperties":false},"testCaseIds":{"type":"array","items":{"type":"string","format":"uuid"}},"reps":{"type":"integer","minimum":1,"maximum":10},"sessionId":{"type":["string","null"]},"status":{"type":"string","enum":["running","done","interrupted"]},"counts":{"type":"object","properties":{"planned":{"type":"integer","minimum":0},"completed":{"type":"integer","minimum":0},"passed":{"type":"integer","minimum":0},"failed":{"type":"integer","minimum":0},"errored":{"type":"integer","minimum":0}},"required":["planned","completed","passed","failed","errored"],"additionalProperties":false},"failures":{"type":"array","items":{"type":"object","properties":{"testCaseId":{"type":"string","format":"uuid"},"message":{"type":"string"}},"required":["testCaseId","message"],"additionalProperties":false}},"startedAt":{"type":"string","format":"date-time"},"finishedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":["id","orgId","createdBy","targetId","selection","testCaseIds","reps","sessionId","status","counts","failures","startedAt","finishedAt"],"additionalProperties":false},"runs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"orgId":{"type":"string"},"batchId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"testCaseId":{"type":"string","format":"uuid"},"caseVersion":{"type":"string"},"kind":{"type":"string","enum":["chatbot_conversation"]},"targetId":{"type":"string","format":"uuid"},"targetVersion":{"type":"string"},"sessionId":{"type":["string","null"]},"status":{"type":"string","enum":["running","passed","failed","error"]},"threadId":{"type":["string","null"]},"transcript":{"type":"array","items":{"type":"object","properties":{"turnKey":{"type":"string"},"message":{"type":"string"},"reply":{"type":"string"},"toolCalls":{"type":"array","items":{"type":"object","properties":{"toolCallId":{"type":"string"},"tool":{"type":"string"},"args":{},"result":{},"truncated":{"type":"boolean"},"workflowId":{"type":["string","null"]},"workflowRunId":{"type":["string","null"]},"error":{"type":["string","null"]}},"required":["toolCallId","tool","truncated","workflowId","workflowRunId","error"],"additionalProperties":false}},"durationMs":{"type":"integer","minimum":0}},"required":["turnKey","message","reply","toolCalls","durationMs"],"additionalProperties":false}},"turns":{"type":"array","items":{"type":"object","properties":{"turnKey":{"type":"string"},"checks":{"type":"array","items":{"type":"object","properties":{"checkKey":{"type":"string"},"kind":{"type":"string","enum":["workflow_tool","builtin_tool","text"]},"pass":{"type":"boolean"},"detail":{"type":"string"}},"required":["checkKey","kind","pass","detail"],"additionalProperties":false}},"verdict":{"anyOf":[{"type":"object","properties":{"pass":{"type":"boolean"},"continue":{"type":"boolean"},"reason":{"type":"string"}},"required":["pass","continue","reason"],"additionalProperties":false},{"type":"null"}]},"pass":{"type":"boolean"}},"required":["turnKey","checks","verdict","pass"],"additionalProperties":false}},"caseVerdict":{"anyOf":[{"type":"object","properties":{"pass":{"type":"boolean"},"score":{"type":"number","minimum":0,"maximum":1},"reasons":{"type":"array","items":{"type":"string"}}},"required":["pass","score","reasons"],"additionalProperties":false},{"type":"null"}]},"endedBecause":{"anyOf":[{"type":"string","enum":["script_done","judge_stop","tool_failed","error"]},{"type":"null"}]},"failure":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"tool_failed"},"turnKey":{"type":"string"},"toolCallId":{"type":"string"},"tool":{"type":"string"},"workflowId":{"type":["string","null"]},"workflowRunId":{"type":["string","null"]},"message":{"type":"string"}},"required":["kind","turnKey","toolCallId","tool","workflowId","workflowRunId","message"],"additionalProperties":false},{"type":"null"}]},"errorMessage":{"type":["string","null"]},"judgeModel":{"type":["string","null"]},"startedAt":{"type":"string","format":"date-time"},"finishedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":["id","orgId","batchId","testCaseId","caseVersion","kind","targetId","targetVersion","sessionId","status","threadId","transcript","turns","caseVerdict","endedBecause","failure","errorMessage","judgeModel","startedAt","finishedAt"],"additionalProperties":false}},"conversationUrls":{"type":"array","items":{"type":"string"}},"summary":{"type":"string"}},"required":["pass","batch","runs","conversationUrls","summary"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}},{"op":"testCase:runBatch","tool":"algomo_run","description":"Run a set of a chatbot's test cases in the background: by id, by tag, or every case of the target, each played `reps` times. Returns the batch at once; poll testCase:getBatch for its counts and runs as they land. Runs of one org share a small number of slots, so a large batch takes a while. The chatbot's tool workflows execute for real on a test run: stage a session where nodes that submit, email or write to a CRM are gated or removed, and pass it as sessionId. Pass sessionId to run the staged cases against the staged target.","input":{"type":"object","properties":{"op":{"type":"string","const":"testCase:runBatch"},"targetId":{"type":"string","format":"uuid","description":"The chatbot whose cases to run."},"testCaseIds":{"type":"array","items":{"type":"string","format":"uuid"},"default":[],"description":"Cases to run by id; combined with `tags`."},"tags":{"type":"array","items":{"type":"string","minLength":1},"default":[],"description":"Run every case of the target carrying any of these tags. With neither ids nor tags, every case of the target runs."},"reps":{"type":"integer","minimum":1,"maximum":10,"default":1,"description":"How many times to play each case."},"sessionId":{"type":"string","description":"Run against this edit session's staged config (the cases and their target); omit for the saved config."}},"required":["op","targetId"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"output":{"type":"object","properties":{"batch":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"orgId":{"type":"string"},"createdBy":{"type":"string"},"targetId":{"type":"string","format":"uuid"},"selection":{"type":"object","properties":{"testCaseIds":{"type":"array","items":{"type":"string","format":"uuid"},"default":[]},"tags":{"type":"array","items":{"type":"string","minLength":1},"default":[]}},"additionalProperties":false},"testCaseIds":{"type":"array","items":{"type":"string","format":"uuid"}},"reps":{"type":"integer","minimum":1,"maximum":10},"sessionId":{"type":["string","null"]},"status":{"type":"string","enum":["running","done","interrupted"]},"counts":{"type":"object","properties":{"planned":{"type":"integer","minimum":0},"completed":{"type":"integer","minimum":0},"passed":{"type":"integer","minimum":0},"failed":{"type":"integer","minimum":0},"errored":{"type":"integer","minimum":0}},"required":["planned","completed","passed","failed","errored"],"additionalProperties":false},"failures":{"type":"array","items":{"type":"object","properties":{"testCaseId":{"type":"string","format":"uuid"},"message":{"type":"string"}},"required":["testCaseId","message"],"additionalProperties":false}},"startedAt":{"type":"string","format":"date-time"},"finishedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":["id","orgId","createdBy","targetId","selection","testCaseIds","reps","sessionId","status","counts","failures","startedAt","finishedAt"],"additionalProperties":false},"summary":{"type":"string"}},"required":["batch","summary"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}},{"op":"testCase:getBatch","tool":"algomo_read","description":"A batch with its counts and the runs that have landed so far. `status` is running until every planned run landed (done), or interrupted when the server stopped first.","input":{"type":"object","properties":{"op":{"type":"string","const":"testCase:getBatch"},"batchId":{"type":"string","format":"uuid"}},"required":["op","batchId"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"output":{"type":"object","properties":{"batch":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"orgId":{"type":"string"},"createdBy":{"type":"string"},"targetId":{"type":"string","format":"uuid"},"selection":{"type":"object","properties":{"testCaseIds":{"type":"array","items":{"type":"string","format":"uuid"},"default":[]},"tags":{"type":"array","items":{"type":"string","minLength":1},"default":[]}},"additionalProperties":false},"testCaseIds":{"type":"array","items":{"type":"string","format":"uuid"}},"reps":{"type":"integer","minimum":1,"maximum":10},"sessionId":{"type":["string","null"]},"status":{"type":"string","enum":["running","done","interrupted"]},"counts":{"type":"object","properties":{"planned":{"type":"integer","minimum":0},"completed":{"type":"integer","minimum":0},"passed":{"type":"integer","minimum":0},"failed":{"type":"integer","minimum":0},"errored":{"type":"integer","minimum":0}},"required":["planned","completed","passed","failed","errored"],"additionalProperties":false},"failures":{"type":"array","items":{"type":"object","properties":{"testCaseId":{"type":"string","format":"uuid"},"message":{"type":"string"}},"required":["testCaseId","message"],"additionalProperties":false}},"startedAt":{"type":"string","format":"date-time"},"finishedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":["id","orgId","createdBy","targetId","selection","testCaseIds","reps","sessionId","status","counts","failures","startedAt","finishedAt"],"additionalProperties":false},"runs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"orgId":{"type":"string"},"batchId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"testCaseId":{"type":"string","format":"uuid"},"caseVersion":{"type":"string"},"kind":{"type":"string","enum":["chatbot_conversation"]},"targetId":{"type":"string","format":"uuid"},"targetVersion":{"type":"string"},"sessionId":{"type":["string","null"]},"status":{"type":"string","enum":["running","passed","failed","error"]},"threadId":{"type":["string","null"]},"caseVerdict":{"anyOf":[{"type":"object","properties":{"pass":{"type":"boolean"},"score":{"type":"number","minimum":0,"maximum":1},"reasons":{"type":"array","items":{"type":"string"}}},"required":["pass","score","reasons"],"additionalProperties":false},{"type":"null"}]},"endedBecause":{"anyOf":[{"type":"string","enum":["script_done","judge_stop","tool_failed","error"]},{"type":"null"}]},"failure":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"tool_failed"},"turnKey":{"type":"string"},"toolCallId":{"type":"string"},"tool":{"type":"string"},"workflowId":{"type":["string","null"]},"workflowRunId":{"type":["string","null"]},"message":{"type":"string"}},"required":["kind","turnKey","toolCallId","tool","workflowId","workflowRunId","message"],"additionalProperties":false},{"type":"null"}]},"errorMessage":{"type":["string","null"]},"judgeModel":{"type":["string","null"]},"startedAt":{"type":"string","format":"date-time"},"finishedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":["id","orgId","batchId","testCaseId","caseVersion","kind","targetId","targetVersion","sessionId","status","threadId","caseVerdict","endedBecause","failure","errorMessage","judgeModel","startedAt","finishedAt"],"additionalProperties":false}},"summary":{"type":"string"}},"required":["batch","runs","summary"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}},{"op":"testCase:listBatches","tool":"algomo_read","description":"A chatbot's batches, newest first, with their counts.","input":{"type":"object","properties":{"op":{"type":"string","const":"testCase:listBatches"},"targetId":{"type":"string","format":"uuid"},"limit":{"type":"integer","minimum":1,"maximum":100,"default":20}},"required":["op","targetId"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"output":{"type":"object","properties":{"batches":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"orgId":{"type":"string"},"createdBy":{"type":"string"},"targetId":{"type":"string","format":"uuid"},"selection":{"type":"object","properties":{"testCaseIds":{"type":"array","items":{"type":"string","format":"uuid"},"default":[]},"tags":{"type":"array","items":{"type":"string","minLength":1},"default":[]}},"additionalProperties":false},"testCaseIds":{"type":"array","items":{"type":"string","format":"uuid"}},"reps":{"type":"integer","minimum":1,"maximum":10},"sessionId":{"type":["string","null"]},"status":{"type":"string","enum":["running","done","interrupted"]},"counts":{"type":"object","properties":{"planned":{"type":"integer","minimum":0},"completed":{"type":"integer","minimum":0},"passed":{"type":"integer","minimum":0},"failed":{"type":"integer","minimum":0},"errored":{"type":"integer","minimum":0}},"required":["planned","completed","passed","failed","errored"],"additionalProperties":false},"failures":{"type":"array","items":{"type":"object","properties":{"testCaseId":{"type":"string","format":"uuid"},"message":{"type":"string"}},"required":["testCaseId","message"],"additionalProperties":false}},"startedAt":{"type":"string","format":"date-time"},"finishedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":["id","orgId","createdBy","targetId","selection","testCaseIds","reps","sessionId","status","counts","failures","startedAt","finishedAt"],"additionalProperties":false}}},"required":["batches"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}},{"op":"testCase:listRuns","tool":"algomo_read","description":"Runs of one case (newest first) or of one batch (in start order), without their transcripts. Read a run in full with testCase:getRun.","input":{"type":"object","properties":{"op":{"type":"string","const":"testCase:listRuns"},"testCaseId":{"type":"string","format":"uuid"},"batchId":{"type":"string","format":"uuid"},"limit":{"type":"integer","minimum":1,"maximum":100,"default":20}},"required":["op"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"output":{"type":"object","properties":{"runs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"orgId":{"type":"string"},"batchId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"testCaseId":{"type":"string","format":"uuid"},"caseVersion":{"type":"string"},"kind":{"type":"string","enum":["chatbot_conversation"]},"targetId":{"type":"string","format":"uuid"},"targetVersion":{"type":"string"},"sessionId":{"type":["string","null"]},"status":{"type":"string","enum":["running","passed","failed","error"]},"threadId":{"type":["string","null"]},"caseVerdict":{"anyOf":[{"type":"object","properties":{"pass":{"type":"boolean"},"score":{"type":"number","minimum":0,"maximum":1},"reasons":{"type":"array","items":{"type":"string"}}},"required":["pass","score","reasons"],"additionalProperties":false},{"type":"null"}]},"endedBecause":{"anyOf":[{"type":"string","enum":["script_done","judge_stop","tool_failed","error"]},{"type":"null"}]},"failure":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"tool_failed"},"turnKey":{"type":"string"},"toolCallId":{"type":"string"},"tool":{"type":"string"},"workflowId":{"type":["string","null"]},"workflowRunId":{"type":["string","null"]},"message":{"type":"string"}},"required":["kind","turnKey","toolCallId","tool","workflowId","workflowRunId","message"],"additionalProperties":false},{"type":"null"}]},"errorMessage":{"type":["string","null"]},"judgeModel":{"type":["string","null"]},"startedAt":{"type":"string","format":"date-time"},"finishedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":["id","orgId","batchId","testCaseId","caseVersion","kind","targetId","targetVersion","sessionId","status","threadId","caseVerdict","endedBecause","failure","errorMessage","judgeModel","startedAt","finishedAt"],"additionalProperties":false}}},"required":["runs"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}},{"op":"testCase:getRun","tool":"algomo_read","description":"One run in full: the transcript with tool calls, every check's outcome, the judge's verdicts, the failure if a tool failed, and the dashboard link to its test conversation.","input":{"type":"object","properties":{"op":{"type":"string","const":"testCase:getRun"},"runId":{"type":"string","format":"uuid"}},"required":["op","runId"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"output":{"type":"object","properties":{"run":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"orgId":{"type":"string"},"batchId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"testCaseId":{"type":"string","format":"uuid"},"caseVersion":{"type":"string"},"kind":{"type":"string","enum":["chatbot_conversation"]},"targetId":{"type":"string","format":"uuid"},"targetVersion":{"type":"string"},"sessionId":{"type":["string","null"]},"status":{"type":"string","enum":["running","passed","failed","error"]},"threadId":{"type":["string","null"]},"transcript":{"type":"array","items":{"type":"object","properties":{"turnKey":{"type":"string"},"message":{"type":"string"},"reply":{"type":"string"},"toolCalls":{"type":"array","items":{"type":"object","properties":{"toolCallId":{"type":"string"},"tool":{"type":"string"},"args":{},"result":{},"truncated":{"type":"boolean"},"workflowId":{"type":["string","null"]},"workflowRunId":{"type":["string","null"]},"error":{"type":["string","null"]}},"required":["toolCallId","tool","truncated","workflowId","workflowRunId","error"],"additionalProperties":false}},"durationMs":{"type":"integer","minimum":0}},"required":["turnKey","message","reply","toolCalls","durationMs"],"additionalProperties":false}},"turns":{"type":"array","items":{"type":"object","properties":{"turnKey":{"type":"string"},"checks":{"type":"array","items":{"type":"object","properties":{"checkKey":{"type":"string"},"kind":{"type":"string","enum":["workflow_tool","builtin_tool","text"]},"pass":{"type":"boolean"},"detail":{"type":"string"}},"required":["checkKey","kind","pass","detail"],"additionalProperties":false}},"verdict":{"anyOf":[{"type":"object","properties":{"pass":{"type":"boolean"},"continue":{"type":"boolean"},"reason":{"type":"string"}},"required":["pass","continue","reason"],"additionalProperties":false},{"type":"null"}]},"pass":{"type":"boolean"}},"required":["turnKey","checks","verdict","pass"],"additionalProperties":false}},"caseVerdict":{"anyOf":[{"type":"object","properties":{"pass":{"type":"boolean"},"score":{"type":"number","minimum":0,"maximum":1},"reasons":{"type":"array","items":{"type":"string"}}},"required":["pass","score","reasons"],"additionalProperties":false},{"type":"null"}]},"endedBecause":{"anyOf":[{"type":"string","enum":["script_done","judge_stop","tool_failed","error"]},{"type":"null"}]},"failure":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"tool_failed"},"turnKey":{"type":"string"},"toolCallId":{"type":"string"},"tool":{"type":"string"},"workflowId":{"type":["string","null"]},"workflowRunId":{"type":["string","null"]},"message":{"type":"string"}},"required":["kind","turnKey","toolCallId","tool","workflowId","workflowRunId","message"],"additionalProperties":false},{"type":"null"}]},"errorMessage":{"type":["string","null"]},"judgeModel":{"type":["string","null"]},"startedAt":{"type":"string","format":"date-time"},"finishedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":["id","orgId","batchId","testCaseId","caseVersion","kind","targetId","targetVersion","sessionId","status","threadId","transcript","turns","caseVerdict","endedBecause","failure","errorMessage","judgeModel","startedAt","finishedAt"],"additionalProperties":false},"conversationUrl":{"type":["string","null"]}},"required":["run","conversationUrl"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}},{"op":"testCase:passRates","tool":"algomo_read","description":"How a chatbot's cases have fared, one row per (case, case version, chatbot version) across every batch and day. A version is the committed entity version, or draft:<fingerprint> for a staged config. A case edit or a chatbot save starts a new row, so a rate never mixes what ran.","input":{"type":"object","properties":{"op":{"type":"string","const":"testCase:passRates"},"targetId":{"type":"string","format":"uuid"},"testCaseIds":{"type":"array","items":{"type":"string","format":"uuid"},"description":"Narrow to these cases; omit for every case of the target."}},"required":["op","targetId"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"output":{"type":"object","properties":{"rates":{"type":"array","items":{"type":"object","properties":{"testCaseId":{"type":"string","format":"uuid"},"caseVersion":{"type":"string"},"targetVersion":{"type":"string"},"total":{"type":"integer","minimum":0},"passed":{"type":"integer","minimum":0},"failed":{"type":"integer","minimum":0},"errored":{"type":"integer","minimum":0},"lastRunAt":{"type":"string","format":"date-time"}},"required":["testCaseId","caseVersion","targetVersion","total","passed","failed","errored","lastRunAt"],"additionalProperties":false}}},"required":["rates"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}},{"op":"schema","tool":"algomo_read","description":"Discover available operations and their input/output schemas. Call with no target to list all ops, each with the tool it is called through. Call with a target op name to get the JSON Schema for that op's input and output. For entity ops, provide entityType to get the entity-specific params schema.","input":{"type":"object","properties":{"op":{"type":"string","const":"schema"},"target":{"type":"object","properties":{"op":{"type":"string"},"entityType":{"type":"string","enum":["chatbot","page","conversionRule","cardDefinition","bookingCalendar","connector","testCase","wikiPage","wikiFolder"]}},"required":["op"],"additionalProperties":false}},"required":["op"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"output":{"type":"object","properties":{"ops":{"type":"array","items":{"type":"object","properties":{"op":{"type":"string"},"tool":{"type":"string"},"description":{"type":"string"},"entityTypes":{"type":"array","items":{"type":"string"}}},"required":["op","tool","description"],"additionalProperties":false}},"tool":{"type":"string"},"input":{"type":"object","additionalProperties":{}},"output":{"type":"object","additionalProperties":{}}},"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}],"entityTypes":[{"entityType":"page","summary":"A website page identified by URL.","description":"A website page identified by URL.","relationships":[]},{"entityType":"chatbot","summary":"AI chatbot with goal-driven lead capture and conversation.","description":"An AI chatbot configuration. An org can have multiple chatbots; exactly one is the default (isDefault=true), and widget conversations resolve to it. Omit isDefault when creating — the org's first chatbot becomes the default automatically. To make a different chatbot the default, set isDefault: true on it (create or update) — the previous default is unset automatically when the session saves; a save that would leave no default (e.g. deleting the default chatbot) is rejected, so reassign the default first.\n\nEach visitor has at most one open thread with each chatbot in an org. Visitor messages and workflow chatbot messages use that thread, starting a new one when none is open and the visitor has no active timeout. Abuse and spam closures pause new threads with that chatbot for 24 hours from the stored closure time. Closed threads remain closed. The new conversation workflow trigger fires when the thread is created.\n\nChatbot replies automatically include the latest 30 stored messages from the current thread, plus saved visitor facts. The built-in tools `listPreviousThreads` and `getThreadTranscript` let the chatbot discover older threads and retrieve their text, or read earlier messages from its current thread. The model selects a thread ID and can pass back an opaque cursor to continue reading; the server enforces organization, visitor, chatbot and test/live ownership on every read. Transcripts return bounded chunks, oldest first, with `hasMore` and `nextCursor`, and mark messages that continue across pages. Responses exclude synthetic instructions and tool payloads. These tools are available independently of billing and classification.\n\nStructure:\n- builtinFields: enabled built-in detail fields, an array of keys from the fixed catalog: \"full-name\", \"email\", \"phone\", \"company\", \"role\". Builtins have a fixed name/description/type (string) and their collected values are additionally written to the visitor's official contact columns (so they surface on the contact page). Enable/disable by including/omitting the key.\n- fields: custom typed working-memory fields, an array of { key, name, description, type } where type is \"string\" | \"number\" | \"enum\" (\"enum\" additionally requires non-empty enumOptions: string[]). `key` is the stable slug identity (the working-memory key and the LLM tool property name — lowercase letters/digits with single dashes or underscores, e.g. \"annual_budget\"; enforced); `name` is the display label. Builtin catalog keys are reserved and rejected here — enable the builtin instead. These are shared across all goals. Omit `key` when creating and it is derived from `name`; keys must be unique within the chatbot and should not be changed afterwards (renaming a key orphans collected working memory — change `name` instead).\n- goals: array of { key, name, isDefault, instructions, toolIds, cardDefinitionIds, calendarIds }. `key` is the stable slug identity (referenced by a visitor's active goal and the switch-goal tool); `name` is the display label. Exactly one goal must have isDefault: true (the starting goal). instructions is an array of named sections (see below). Omit `key` when creating and it is derived from `name`; keys must be unique and should not change afterwards.\n- The chatbot itself carries the same config block as each goal (instructions, toolIds, cardDefinitionIds, calendarIds): chatbot-level config is always active, the active goal's config applies on top.\n- toolIds: ids of tool-type workflows exposed to the LLM as callable tools (create them with workflowType: \"tool\"). The workflow's name is the tool's LLM-facing name and the trigger's \"description\" input is the tool's description. Input schema is derived from the workflow trigger's inputFields; output from its workflow_output node. Workflows with a chatbot_tool trigger also receive visitorId and threadId as trigger output.\n- cardDefinitionIds: ids of cardDefinitions exposed as card-rendering tools. The tool's input schema is derived from the card's propsSchema; calling it renders the card to the visitor.\n- calendarIds: ids of BookingCalendar entities exposed as native booking tools (slot picker + identity form → bookSlot mutation → Google Calendar event with native invite).\n- instructions: an array of named sections { key, name, content } of global instructions that always apply; the active goal's instructions are layered on top. At least one section is required and every section needs non-empty content. `name` is rendered as a markdown heading in the system prompt; `content` is the section body. `key` is the stable slug identity — omit it and it is derived from `name`; keys must be unique within the array. The same section shape applies to each goal's instructions.\n- workflowIds: ids of chatbot-type workflows assigned to run for this chatbot (create them with workflowType: \"chatbot\"); they fire on the conversation triggers (chatbot_session_started, first_chatbot_session_started, new_conversation, first_visitor_message, message_received, human_takeover_changed, conversation_closed) and on the visitor-scoped triggers (page_view, link_click — the dispatcher resolves the visitor's chatbot and scopes by this assignment), always scoped to this chatbot.\n- Greetings are not configured on the chatbot — they run as chatbot-type workflows triggered by first_chatbot_session_started (see the workflow ops).\n- capabilities: built-in abilities from a hardcoded catalog, each an object with a `type`: { type: \"knowledge_base\", scope, folderIds } (lets the chatbot search and read the org's knowledge base pages — see the wikiPage entity; scope \"all\" reads the whole knowledge base, scope \"selected\" only the wikiFolder ids in folderIds; the folderIds selection is kept either way, but only enforced under \"selected\") , { type: \"response_buttons\" } (lets the bot offer tappable quick-reply buttons that send a message when clicked), { type: \"human_handover\" } (lets the chatbot hand a conversation over to a person with a summary for whoever picks it up; the chatbot then stops replying until the conversation is released, and the human_takeover_changed trigger fires with the summary), { type: \"progress_updates\" } (while the chatbot looks things up, the visitor sees short transient notes on what it is checking beside the typing indicator — pair it with an instruction to say what it is about to do first; see the working-out-loud recipe), and { type: \"image_uploads\", mode } (lets visitors attach images to their messages, which the chatbot reads; mode \"always\" shows the attach button from the start, mode \"on_request\" — start with this one — hides it until the chatbot calls its requestImageUpload tool or a person takes over, after which it stays for that conversation; the system prompt tells the chatbot how to ask, so pair the capability with an instruction on when a picture is worth asking for — see the image-uploads recipe; needs a model that can read images: the platform default can, a model override must, else the save is refused). knowledge_base, response_buttons and progress_updates default on with full knowledge base access — active unless explicitly removed; human_handover and image_uploads are off unless added. Deleting a wiki folder automatically removes it from any chatbot's folderIds.\n- model: a conversation-model override as a \"provider/model\" string (e.g. \"openrouter/moonshotai/kimi-k2.6\"), or null (the default) for the platform's standard model. Only available where the model-override feature is enabled for the workspace — staging a change to it elsewhere is rejected on save. Set null to return to the standard model.\n- enabled: boolean, defaults to true.\n\nCreation: entity:create injects no template defaults — supply builtinFields, fields, goals (at least one, exactly one isDefault: true) and instructions yourself, authored for this customer. An omitted goals array is a validation error in localErrors, never a silently injected boilerplate goal.\n\nUpdate semantics: with entity:update, builtinFields, fields and goals are arrays that replace wholesale — send the full desired array, preserving existing keys for entries you keep. Scalars and id arrays also replace entirely. To change one member without resending the whole array, use the granular item ops (entity:pushItem, entity:deleteItem, entity:updateItem, entity:moveItem) addressed by a dotted path that alternates object keys and member keys: \"goals\" is the goals array, \"goals.support\" is the goal whose key is \"support\", \"goals.support.instructions\" is that goal's instructions array, and \"goals.support.instructions.intro\" is that section. pushItem appends to an array path (omit the new item's key to derive it from the name; pass afterKey to insert after an existing member); deleteItem and updateItem address a member path (updateItem shallow-merges a patch and keeps the member's key); moveItem reorders a member (afterKey: the key to place it after, or null for the front) — section order is the system-prompt order, so use it to rearrange instructions. These work on the keyed collections (goals, fields, the global and per-goal instructions); primitive arrays (builtinFields, toolIds, etc.) still replace wholesale via entity:update. Item ops do not auto-reconcile invariants — keeping exactly one goal with isDefault is your responsibility.\n\nUse chat:generateTestReply to try a reply by hand, and testCase entities with testCase:run to state how the chatbot should behave and check it repeatably. Use chat:listThreads and chat:getMessages to review conversations — real customer threads and test threads, filterable by chatbot, visitor, date range, and takeover/closed status.","relationships":["toolIds reference tool-type workflows","cardDefinitionIds reference cardDefinitions","calendarIds reference bookingCalendars"]},{"entityType":"conversionRule","summary":"Tracks conversion events (page views, clicks, form submissions).","description":"Defines what counts as a conversion event. Supports three rule types: page_view (URL match), link_click (URL and/or text match), and form_submission (form ID/name/fields). Org-wide.","relationships":["belongs to an org"]},{"entityType":"workflow","summary":"Automation workflow with triggers, actions, and branching paths.","description":"Workflows automate actions in response to events. Managed via workflow:* ops (not entity:*).\n\nA workflow has a workflowType, a trigger (manual, chatbot_tool, tool, new_conversation, first_visitor_message, message_received, human_takeover_changed, conversation_closed, page_view, meeting_booked, webhook), a chain of action nodes (use `workflow:listNodeDefinitions` to enumerate available types), branching via paths nodes with conditions, and concurrency via parallel nodes: a parallel node holds lanes that all run at once, then the chain continues once every lane has finished. A node in a lane can reference the nodes before the parallel node and the lane's own earlier nodes; the nodes after it can reference every lane's nodes by name, with no joining step. A lane that fails fails the run. workflow_output and skip_card can't sit in a lane. Build one with workflow:addNode (nodeType parallel, two empty lanes), workflow:addLane / workflow:removeLane, and workflow:addNode with pathIndex to put nodes in a lane.\n\nJudgement calls belong to the Jev nodes, never to llm_call. Whenever a workflow has to decide something fuzzy about text or a JSON object — which category a message falls in, whether a lead is qualified, how urgent a request is, whether a page matches an intent — use jev_choice (pick one option from a list you describe), jev_noul (a yes/no with a probability) or jev_score (a position on an ordered scale you describe). Each returns typed fields (`choice`, `answer`/`probability`, `score`/`level`, plus calibrated probabilities and a confidence) that a paths node branches on directly, with no text to parse; their content input takes a JSON object or list as a real object so the question can name its fields. Jev is a dedicated classification model priced on input tokens only, at a small fraction of any llm_call model's rate, so classifying every message or run is affordable where an LLM call would not be. Reserve llm_call for generating text — a summary, a draft, an extraction that Jev's three primitives can't express. The jev-decisions recipe is the playbook (primitives, criteria, use cases) and classify-and-route stages any of the three with its routing.\n\nDeterministic data work belongs to run_javascript, never to llm_call: reshaping an API body for the next node, filtering and sorting a list, date maths, combining two calls, parsing. The script gets one object, `input` (an object field, so every value can be a `{{ref}}` — the only door for workflow data), and returns a plain object, array, string, number, boolean or null (the value is serialised across the sandbox boundary: a Date arrives as its ISO string, a Map as {}, a function is dropped): its output is `{ result, logs }`, read downstream as `{{node.result.field}}` (untyped until a run — a test run makes the picker show the real shape). `code` is raw: no `{{...}}` inside it. It has `fetch` under the same guarded client and the same per-request price as an http_request node (at most 1000 per run), `DOMParser` (a fetched HTML page becomes a document with the standard DOM — selectors, textContent, attributes, innerHTML, mutation; parsing runs in the sandbox at roughly a second per MB — 130 ms for a 190 KB page, up to 3.5 s for a page at the 2 MB fetch cap — so size timeoutMs for the pages read, up to its 30 s ceiling), `URL`, `TextEncoder`, `atob`/`btoa`, `console.log` — and no filesystem, packages, environment or secrets, so an authenticated API is an http_request node with its connection and the script shapes what comes back. Limits: timeoutMs 1–30 s, 128 MB, a 1 MB result; a script cut off by a restart runs again from the start, like any node. The scripted-data recipe has the patterns and the pitfalls.\n\nThe page_view trigger fires on every page view of the site, so scope it with its filter inputs (visitType, pathStartsWith, urlContains — set via workflow:updateNode on the trigger). Filters are evaluated on the server before dispatch: a view outside them creates no run at all. Use a paths node after the trigger only for richer logic than the filters express (those runs execute and are traced); workflow:run and editor test runs bypass the filters.\n\nThe workflowType (\"workflow\" | \"tool\" | \"chatbot\", immutable after creation; when omitted at creation it is inferred from the definition's trigger — chatbot_tool/tool → \"tool\", otherwise \"workflow\") determines what the workflow is for and which triggers it may use. \"workflow\" runs on events and allows every trigger except chatbot_tool and tool. \"tool\" is invoked as a chatbot/agent tool and only allows the chatbot_tool or tool triggers. \"chatbot\" runs for whichever chatbots assign it (a chatbot lists its workflows in its workflowIds) and allows the conversation triggers (chatbot_session_started, first_chatbot_session_started, first_visitor_message, new_conversation, message_received — every message from the visitor, the chatbot or a person, with a role filter input; a workflow never triggers on a message it sent itself — human_takeover_changed — a person took the conversation over or handed it back, with who did it and the chatbot's summary for the person picking up — and conversation_closed — the conversation ended, with the reason) plus the visitor-scoped page_view and link_click; each run is scoped to the chatbot whose assignment fired it (for the visitor-scoped triggers the server resolves the visitor's chatbot itself — their trigger outputs carry no chatbotId). Conversation actions come in two families. On chatbot-type workflows they inherit the run's chatbot: send_chatbot_message and generate_chatbot_message take only a visitorId, and the workflow must be created with workflowType: \"chatbot\" and assigned via the chatbot's workflowIds. On workflow-type workflows (webhooks and other events) they name the chatbot explicitly with a required chatbotId: send_message_as_chatbot and generate_message_as_chatbot (the same sends, as the chosen chatbot), send_message_as_visitor (posts as the visitor, waits for the chatbot's reply and returns it as response — a sync webhook run answers with it — while message_received carries the reply on as well), send_message_as_human_assistant (a reply as a person with a required name, taking the conversation over), set_human_takeover (hand over with a summary, or release), and close_conversation (end the open conversation as a handoff or operator close, attributed to the workflow). All address the conversation by visitorId — the visitor is created on first sight and the open thread with that chatbot is reused or started (set_human_takeover and close_conversation act on an open one only, and a test run refuses a live visitor) — so a webhook payload only needs the visitorId it received from an earlier trigger. The actions that make the chatbot compose a reply (send_message_as_visitor, generate_message_as_chatbot, generate_chatbot_message) refuse a disabled chatbot and an exhausted credit balance before any thread is started — send_message_as_visitor skips both when a person already has the visitor's open conversation, since no reply follows; a fixed line and a person's reply are never gated that way. A visitor whose new threads are paused after an abuse or spam closure fails the step (409 on a sync webhook). A workflow never receives the message_received or human_takeover_changed event its own action caused. Every conversation trigger output (and the get_visitor_conversation result) carries isTest — true for draft, preview, test-link and editor/MCP test conversations — so a workflow forwarding conversations to an external system can skip test traffic with a paths condition. update_visitor_details is available on every workflow type: it writes a flat map of details into the visitor's working memory (the record the chatbot's detail collection maintains, injected into its prompt; any key is allowed, a null value clears it, absent keys are kept), addressed by visitorId. set_chatbot_goal is chatbot-type only: it switches the visitor's active goal — it takes a static chatbotId plus one of that chatbot's goal keys, and saving validates the goal exists on that chatbot. A trigger outside the workflow's type produces a validation error. Pass workflowType to workflow:listNodeDefinitions to see only the definitions allowed for that type, and to workflow:list to filter workflows by type. Nodes reference preceding step outputs via {{stepName.field}} (using the step's name, not the literal \"step\"), workflow variables via {{variables.key}} (static workflow-level constants for values reused across nodes — the same for every run), and caller-supplied input values via {{input.field}} (declared as inputFields on the trigger, different per invocation).\n\nCall `workflow:getNodeDefinition` before configuring a node to read its full input/output contract. Each input field reports how to fill it: `uiType` and `required`; `options` — for dropdown fields, the allowed values (choose from `options.values[].value`; `dynamic` options are resolved in the editor, not here); `entityRef` — the field's value must be a valid id of that entity type (e.g. \"chatbot\", \"secret\", \"connection\"), with `secretType` naming the expected secret kind on secret refs and `acceptedConnections` listing the services/scopes on connection refs; and `raw`. A `text_or_object` field takes plain text or a JSON object/list: pass structure as a real object (a JSON string stays text). A `raw` field is treated as a literal blob — its `{{...}}` references are NOT interpolated at run time and NOT ref-validated, because the field's content is its own language (a script body, regex, or template) where `{{...}}` is meaningful syntax or an injection risk. Never put a `{{step.field}}` reference in a raw field expecting it to resolve; pass any dynamic data such a node needs through a separate, non-raw input instead.\n\nWhat a run costs is the sum of its nodes, charged step by step as each executes. Both catalogue ops report each node's `charge` at the workspace's rates: nodes that reach an outside service (an HTTP request, an email, a Slack message, a connector, the visitor's browser, the webhook trigger) cost a small fee per execution; model nodes (an LLM call, an agent run) cost that fee plus their tokens; the Jev nodes cost that fee plus their input tokens only, at a rate far below the cheapest llm_call model, so a Jev question is close to the price of a plain node; data-provider nodes (Apollo, LinkedIn, Glanos, Exa) cost their call and no fee, and so does run_javascript, whose calls are the script's own fetches (each priced like an http_request execution; a script that makes none is free); every other node — conversation replies included — is free and carries no `charge`. A workspace out of credits runs no workflow, whatever its nodes cost (`workflow:run` and a sync webhook answer 402). Add up a definition's `charge`s to estimate a run; `workflow:listRuns` and `workflow:getRun` report what past runs actually drew, the latter per node; a run's `credits` include the tool runs its run_agent steps' agents made, so a listing that shows a run beside one it made counts that spend on both — don't total across them.\n\nLinkedIn post URNs flow as opaque strings between linkedin_* actions — passthrough identifiers, not entities. Output → input chains:\n- `linkedin_get_profile_posts.posts[0].urn` → `linkedin_get_profile_post_and_comments.urn`\n- `linkedin_get_company_posts.posts[0].urn` → `linkedin_get_company_post_comments.urn`\n- `linkedin_get_profile_comments.items[0].threadUrn` → `linkedin_get_profile_post_and_comments.urn`\n- `linkedin_search_people.items[0].username` → `linkedin_enrich_profile`, `linkedin_get_profile_posts`, `linkedin_get_profile_recent_activity_time`, `linkedin_get_profile_comments`\n- `linkedin_search_companies.items[0].universalName` → `linkedin_enrich_company` (kind=slug), `linkedin_get_company_insights`, `linkedin_get_company_posts`\n\nWhen chaining via `items[0]` / `posts[0]` / `comments[0]`, an empty results array makes the downstream action fail at input validation (no element to read). To handle that path explicitly, guard with a paths node checking `{{step.count}} == 0` (or `number_equals 0`) before the dependent action.\n\nThe tool, chatbot_tool, card_instance_created and manual triggers can define inputFields — typed parameters (string, number, boolean) that the caller supplies when invoking the workflow: the LLM for tool/chatbot_tool workflows, the agent's card fetch args for a card's data workflow (card_instance_created), and the person running a manual workflow (the Run action prompts for them; workflow:run takes them as input). These are available as {{input.fieldName}} in all downstream nodes. Declare them as inputFields on the trigger node — via workflow:updateNode (nodeName = the trigger's name) or definition.inputFields at creation; each field is { name, type: \"string\" | \"number\" | \"boolean\", description?, required?, enum? }, and the description is shown to the calling LLM. A string or number field may restrict its value with enum — its allowed values (strings for a string field, numbers for a number field; non-empty, unique): the caller sees them as an enum in the tool schema and a run refuses any other value, so a field like \"category\" or \"priority\" that picks from a fixed set declares one instead of describing the options in prose. A required string field refuses an empty string. Do NOT use workflow variables to stand in for caller inputs — variables are static constants shared by every run and never vary per invocation; a \"search query\" or similar per-call value must be an inputField. Event-driven triggers (page_view, meeting_booked, webhook, new_conversation, the session/message triggers) have no caller supplying arguments, so {{input.*}} is always empty for them — don't rely on inputFields there. The chatbot_tool trigger also outputs visitorId and threadId from the conversation context (available as {{trigger.visitorId}} and {{trigger.threadId}}), making it usable as a chatbot tool. The tool trigger has no trigger output (no conversation context), so its workflows can be called from both chatbots and agents — agent tools can only reference tool-triggered workflows.\n\nEvery run exposes its own facts under the reserved workflow root, needing no declaration: {{workflow.startedAt}} is the run's start as an ISO 8601 UTC timestamp, the same value on a resumed run — for a timestamp an outside system requires (a CRM note's time, a webhook's sent-at).\n\nWhen a tool-type workflow is exposed as an LLM tool, the workflow's name is the tool's name (it may be referenced verbatim in chatbot goal instructions — keep it function-like, e.g. \"searchProducts\") and the trigger's optional \"description\" input is the tool's description shown to the LLM. Set it via the trigger inputs when creating or updating tool workflows.\n\nThe workflow_output node defines what the workflow returns to its caller. It must be the last node in its chain — execution stops when reached. Its single input `result` is a record of user-defined output fields keyed by name, each value a literal or {{variable}} reference; the resolved map is returned directly. Multiple output nodes are allowed across different branches; their schemas are merged (same-type fields kept, missing fields become nullable, conflicting types are a validation error).\n\nThe fail_workflow node ends the run as failed and raises an issue task on the workspace home page — reserve it for genuine failures (typically inside a paths branch). Like workflow_output it must be the last node in its chain. Inputs: a required `message` (surfaced to the caller) and an optional `data` map of extra detail; when run as a tool, the calling agent/chatbot receives them as a structured `{ status: \"failed\", message, data }` result to reason over. For expected endings that aren't failures — an empty search result, nothing to do — prefer a workflow_output returning the empty result plus an explanatory field (e.g. `{ results: [], note: \"...\" }`), or skip_card in a card workflow: the caller reasons over it just as well, and the run doesn't read as failed.\n\nThe skip_card node (card workflows only) ends the run successfully without rendering the card — use it (typically inside a paths branch) when there's nothing worth showing, e.g. an empty search result. Like workflow_output it must be the last node in its chain. Inputs: a required `message` and an optional `data` map; the rendering agent receives `{ cardInstanceId: null, message, data }` instead of a card and answers in text. Reserve fail_workflow for genuine failures — an expected empty result should skip, not fail.\n\nCaching: an action node whose result depends only on its inputs (http_request, llm_call, run_agent, run_connector, run_javascript, the Jev nodes and the Apollo, LinkedIn, Exa and Glanos nodes — every node definition reports it as cacheable) may carry a cache setting ({ ttlSeconds }, set via workflow:updateNode, 1 second to 90 days). The engine keys an entry on the step's resolved inputs (run_agent also on the agent, and run_connector on the connector, at the state it reads it: its saved version, or its staged config in an edit session, so editing the agent or connector is a miss) and serves it instead of executing, for that long: a step served from the cache reports cache.hit: true on the run with the run and workflow that produced it, and charges nothing. workflow:run returns its runId, so a later hit's sourceRunId can be matched to it. Entries are shared by node type and inputs across every workflow in the workspace (a live run's) or the edit session (a sessioned run's); a step whose output was empty or, for http_request, not a 2xx answer is not kept. run_connector leaves visitorId and timeoutMs out of the key, so one visitor's read of a page serves every visitor (test runs through a paired browser included) for the TTL — turn it on only for a connector whose answer depends on nothing but its variables, never one that reads the visitor's own session (an account page, a cart). Every other node with side effects (sends, the other visitor browser nodes, conversation actions) never caches, and setting cache on them fails validation. workflow:listNodeCache pages cached entries (each with its stored input, output, timestamps and the run, workflow and step that stored it), named either by workflow node (workflowId + nodeName: what that node's configured inputs could have stored) or by inputs (nodeType + an optional inputs template where every {{…}} matches anything, so a trailing one means \"starts with\" and the whole type is the template left out); workflow:removeNodeCacheEntry drops one by id and workflow:clearNodeCache drops what the same naming covers. With a sessionId, all three act on the edit session's cache rather than the live one.\n\nWebhook trigger secrets cannot be created, regenerated, or deleted via MCP — direct the user to the workflow's edit page (link:get with target { page: \"workflow\", workflowId }) to manage the secret in the trigger's settings panel. The workflow update ops can still set or clear `secretId` on the trigger inputs once a secret exists, but creating the secret itself requires the dashboard.\n\nWebhook requests are a POST with a JSON object body (exposed as {{trigger.data}}); a secret is presented as `Authorization: Bearer <secret>`. The trigger's `responseMode` input (`async` by default, `sync`) decides the response:\n- `async`: 202 `{ \"received\": true }` as soon as the run is accepted; the run happens in the background and its outcome is only visible in the run list.\n- `sync`: the request is held until the run finishes (up to a server-side timeout, 5 minutes by default) and answers with the run's outcome. 200 with the workflow_output node's `result` object as the body (`{}` when the workflow has no output node), 422 `{ \"error\": <fail_workflow message>, \"data\": <fail_workflow data or null>, \"runId\" }` for an authored fail_workflow, the failing step's own status and message `{ \"error\", \"step\", \"runId\" }` when a step refused on a domain error the caller can act on (409 a conflict such as a reply to that visitor still in progress, 400 a refused input such as a disabled chatbot, 402 out of credits), 500 `{ \"error\": \"Workflow run failed\", \"step\", \"runId\" }` when a step failed on anything else (the run row holds the step error), 504 `{ \"error\" }` when the run outlived the timeout (the run still completes in the background).\nBoth modes: 400 the body is not a JSON object, 401 the secret is missing or wrong, 402 the org is out of credits (sync only; an async run is silently skipped), 404 no such workflow, 409 the workflow is disabled or its trigger is not a webhook, 429 the workflow's rate limit was hit (`Retry-After` header).\n\nPaths conditions compare one value with one operator; the conditions of a path are ANDed, separate paths are the OR. Text operators (text_equals, text_not_equals, text_contains, text_not_contains, text_starts_with, text_ends_with) compare the value as text; text_matches / text_not_matches test it against a regex. List operators read the first value as items — point them at a single {{reference}} to a list, never an interpolated string: list_has / list_not_has pass when an item equals the value exactly, list_has_match / list_not_has_match when an item matches the regex (a missing value is an empty list). A text operator on a list compares the items joined by commas, so prefer the list operators for lists. Regex patterns are literal text, never a {{reference}} (braces in a pattern are regex characters), in RE2 syntax, matched as an unanchored, case-sensitive search: ^ and $ anchor, (?i) ignores case, lookarounds and backreferences are refused, and a pattern that doesn't compile is a validation error. Example: a greeting in Greek when any of the visitor's browser languages ({{trigger.languages}} on the session triggers, e.g. [\"el-GR\",\"en-US\",\"en\"]) is Greek is a paths node with {{trigger.languages}} list_has_match ^el(-|$), else the fallback. Number operators (number_equals, number_greater, number_less), boolean_is_true / boolean_is_false, exists / not_exists and date_older_than / date_newer_than (a duration such as 5m, 2h, 3d) complete the set.\n\nSome lookup actions return null when no record matches (e.g. get_visitor, get_visitor_conversation) rather than erroring. Use a paths node with exists/not_exists conditions to branch on nulls — inside an exists branch the referenced value is treated as non-null for downstream nodes, so field accesses like {{visitor.email}} are safe after {{visitor}} exists.\n\nA `{{…}}` reference can carry fallbacks: `{{a.email || b.email || \"unknown\"}}` uses the first value that is present (not null, missing or `\"\"`; `0` and `false` count), else the last one. Only the last operand may be a literal (a quoted string, number, `true`, `false` or `null`). Use it in node inputs and workflow_output results where a value may be empty, instead of a paths node that only supplies a default. Its type is the union of the operands it can reach, nullable only when every operand can be empty. Fallbacks aren't allowed in paths conditions.\n\nKey ops: workflow:create, workflow:get, workflow:list, workflow:update, workflow:delete, workflow:validate, workflow:run. Run history: workflow:listRuns (paged run summaries, newest first, filterable by isTest/statuses) and workflow:getRun (a past run's full step-by-step trace plus the workflow definition the run executed — unsaved edits staged in a session included, flagged ranUncommitted) — use them to check whether a workflow has been firing and to diagnose failed runs. Both take an optional sessionId: a workflow created in a session and not yet saved shows its runs only through that session. Runs carry an origin when they came from a chatbot conversation (its threadId addresses the dashboard's conversation view — use it to point the user at the conversation) or a custom agent's tool call (with parentRunId and parentNodeName naming the run and run_agent step that invoked the agent, when one did). Node discovery: workflow:listNodeDefinitions (optionally filter by kind: trigger, action, control) and workflow:getNodeDefinition (full details for a specific type). Granular definition mutations: workflow:addNode, workflow:removeNode, workflow:updateNode, workflow:replaceTrigger, workflow:replaceNode, workflow:addPath, workflow:removePath, workflow:updateConditions. All mutation ops require sessionId, auto-generate node names, and return the updated workflow + validation errors.\n\nWorkflows have enabled/disabled status. Disabled workflows can be saved with validation errors — except workflow-type gating errors, which are structural and block saves regardless of status; enabled workflows must pass validation in full.","relationships":["may reference connections for authenticated actions"]},{"entityType":"connection","summary":"Stored credentials for a third-party service integration.","description":"An org-scoped credential record for a third-party service (Slack, Gmail, Outlook, Notion, Apollo, etc.) used by workflow actions to authenticate API calls. Apollo connections power apollo_enrich_person, apollo_enrich_organization, apollo_search_people, and apollo_search_organizations. Exa connections power exa_search. Glanos connections power glanos_company_search and glanos_company_lookup. send_email's connectionId picks the sender: the built-in { type: \"managed\", service: \"email\" } (Algomo's own address, and the default when the input is omitted) or a connected Gmail or Outlook mailbox, which sends from that mailbox. To continue a conversation, pass a previous send_email's `thread` output (or the Message-ID of an email being replied to) to the follow-up's `thread` input, with a \"Re:\" subject. Replies to a received email thread for the recipient from any sender. Follow-ups to an earlier send_email thread for the recipient when sent from Algomo's address or Outlook; a follow-up sent from Gmail threads in that Gmail mailbox only, since Gmail assigns its own Message-ID on send. For a conversation the recipient sees threaded from a Gmail user, send from Algomo's address with replyTo set to that mailbox. Workflow action inputs reference a connection by ID (entityRef: connection).\n\nWhen wiring a connection field on a workflow action, call connection:listForField (not connection:list) — it returns the exact set of valid values for that field, including any \"Algomo managed\" built-in options the platform offers in addition to tenant connections. connection:list is for browsing all stored connections, not field wiring.\n\nManaged via connection:* ops, which are read-only: connection:list and connection:get return a redacted summary (id, service, type, status, details) with no encrypted credential material. To create, reauthorize, or delete connections, direct the user to https://dash.algomo.com/settings/connections — the agent cannot start an OAuth flow or modify credentials. A connection still referenced by a workflow or booking calendar cannot be deleted — validation blocks the delete until those references are removed.","relationships":["referenced by workflow action inputs via connectionId with entityRef: connection","referenced by booking calendars via hostConnectionId"]},{"entityType":"secret","summary":"Stored hashed secret used to authenticate inbound requests.","description":"An org-scoped secret with a one-way HMAC-SHA-256 hash and a non-reversible `preview` (e.g. `wwh_****abcd`). Plaintext is shown once at creation and never again. Currently the only `type` is `workflow_webhook`, used by webhook triggers to authenticate incoming POST requests. Managed via secrets:* ops; the secret picker on a webhook trigger generates and references one.","relationships":["referenced by webhook trigger inputs via secretId with entityRef: secret"]},{"entityType":"wikiPage","summary":"A page in the org's knowledge base — the general-purpose store for org information.","description":"The knowledge base is the org's general-purpose information store, made of wiki pages. Durable information the org TELLS you that is not on their website — policies, SLAs, internal processes, spec sheets, escalation rules, domain knowledge — belongs here as a wiki page, unless it is configuration owned by another entity. Chatbots and custom agents read these pages at runtime through their \"knowledge_base\" capability, so well-maintained pages directly improve every agent's and chatbot's answers.\n\nCRITICAL: never copy website content into wiki pages. If information is on the org's website, the chatbot must reach it live through connectors (see the website-browsing recipes) — a scraped copy silently goes stale the day the site changes. The test for a wiki page is: \"would this still be true if the website were redesigned tomorrow, and is it absent from the site?\"\n\nEvery page lives in exactly one folder (see the wikiFolder entity), and its address is the path \"folder-slug/page-slug\" — the page's slug only needs to be unique within its folder. Pages carry slug, title, summary, content (markdown), and keywords. Inline cross-references between pages use [label](wiki:folder-slug/page-slug) markdown links; bare [label](known-path) links are auto-normalized to the wiki: form on create/update. Every wiki: link must point at a page that exists by the time the session saves — a dangling target blocks the save (creating the linked page in the same session is fine). Renaming or moving a page — or renaming a folder — rewrites every inbound wiki: link automatically, so never hand-edit other pages after a rename. Keep pages focused (one topic per page), cross-linked, and keyword-tagged, and update an existing page rather than creating a near-duplicate.\n\nManaged via the standard entity:* ops — writes are session-tracked and land on session save:\n- entity:list — metadata for every page (path, title, summary, keywords, section headings; no content); filter with { folder } to list one folder\n- entity:get — full page by entityId, or by path via params: { path: \"folder-slug/page-slug\" }\n- entity:create — title, content, and folderId (the folder's entityId, from its create result or entity:list wikiFolder; create the folder first — it must exist by session save) required; slug is derived from the title unless passed; summary/keywords optional\n- entity:update / entity:delete — standard session-tracked edits; update accepts folderId to move the page. A page that other pages still link to can't be deleted unless those links are removed in the same session. When a rename or move rewrites other pages' links, the update response lists them under \"cascaded\"","relationships":["belongs to one wikiFolder (folder slug + page slug form its path)","read at runtime by chatbots and agents with the knowledge_base capability","change history tracked in entity_versions"]},{"entityType":"wikiFolder","summary":"A top-level folder grouping wiki pages; its slug is the first segment of every member page's path.","description":"Folders are the knowledge base's single level of grouping: every wiki page belongs to exactly one folder, and the page's address is \"folder-slug/page-slug\". Folders carry slug, name, and an optional description explaining what belongs inside — write one so future agents file pages consistently. Use a handful of broad, stable folders (e.g. product, support, policies) rather than many narrow ones.\n\nManaged via the standard entity:* ops — writes are session-tracked and land on session save:\n- entity:list — every folder (slug, name, description)\n- entity:get — by entityId, or by slug via params: { slug }\n- entity:create — name required; slug is derived from the name unless passed. The returned entityId is what pages reference as their folderId\n- entity:update — rename or edit the description (changing the slug changes every member page's path; inbound wiki: links are rewritten automatically, and the response lists the rewritten pages under \"cascaded\")\n- entity:delete — only allowed once the folder has no pages. Chatbots and agents whose knowledge base scope lists the folder drop it automatically","relationships":["has many wikiPages (members reference it by folderId)","referenced by chatbot and agent knowledge base scopes (capabilities folderIds)","change history tracked in entity_versions"]},{"entityType":"agent","summary":"User-authored AI agent configuration usable in workflows.","description":"A reusable AI agent definition the user authors and then references from workflows. Carries instructions, a provider+model pair (anthropic, google, mistralai, openai), temperature, maxSteps, an optional reasoning toggle (only meaningful for models that support it), a list of workflow tools (each pointing at an existing workflow by id; the workflow must have a \"tool\" trigger since agents have no conversation context — create it with workflowType: \"tool\"), and a list of capabilities from a hardcoded catalog, each an object with a `type`: { type: \"knowledge_base\", scope, folderIds } (lets the agent search and read the org's knowledge base pages — see the wikiPage entity; scope \"all\" reads the whole knowledge base, scope \"selected\" only the wikiFolder ids in folderIds; the folderIds selection is kept either way, but only enforced under \"selected\"). Deleting a wiki folder automatically removes it from any agent's folderIds.\n\nThe full list of supported provider/model pairs is returned in the `models` field of this op's response — call `info:entity` with `entityType: \"agent\"` to fetch it before creating or updating an agent.\n\nInvocations are one-shot — agents are run from workflows and don't carry persistent memory across calls.\n\nManaged via agent:* ops (not entity:*). All mutation ops require sessionId and return the resulting entity + per-entity validation errors. Available ops:\n- agent:list / agent:get — read agents (sessionId optional; pass it to see unsaved drafts)\n- agent:create / agent:update / agent:delete — session-tracked CRUD\n- agent:run — send a single message to the agent and get its response (with tool-call trace). Honors sessionId so unsaved drafts can be tested before save.\n\nTool definitions on update use object-keyed shape (record by tool name) so an agent can patch a single tool by name, send `null` to delete a tool entry, or add a new tool by including a previously-unseen key.\n\nDistinct from chatbot: chatbots are visitor-facing widgets with goal-driven lead capture; agents are headless and the user composes them to automate work via workflows.","relationships":["tools reference workflows (entityRef: workflow)"],"models":[{"provider":"anthropic","id":"claude-opus-4.7","label":"Claude Opus 4.7","supportsReasoning":true},{"provider":"anthropic","id":"claude-opus-4.6","label":"Claude Opus 4.6","supportsReasoning":true},{"provider":"anthropic","id":"claude-sonnet-4.6","label":"Claude Sonnet 4.6","supportsReasoning":true},{"provider":"google","id":"gemini-3.1-pro-preview","label":"Gemini 3.1 Pro","supportsReasoning":true},{"provider":"google","id":"gemini-3.1-flash-lite-preview","label":"Gemini 3.1 Flash Lite","supportsReasoning":false},{"provider":"mistralai","id":"mistral-small-2603","label":"Mistral Small 4","supportsReasoning":false},{"provider":"openai","id":"gpt-5.4-pro","label":"GPT-5.4 Pro","supportsReasoning":true},{"provider":"openai","id":"gpt-5.4","label":"GPT-5.4","supportsReasoning":true},{"provider":"openai","id":"gpt-5.4-mini","label":"GPT-5.4 Mini","supportsReasoning":true},{"provider":"openai","id":"gpt-5.4-nano","label":"GPT-5.4 Nano","supportsReasoning":false},{"provider":"openai","id":"gpt-5.3-codex","label":"GPT-5.3 Codex","supportsReasoning":true}]},{"entityType":"cardDefinition","summary":"AI-authored interactive card template — plain JS module + Tailwind, served inside an iframe.","description":"A card definition is a reusable UI template authored as a plain ES module that default-exports `(root, props) => void`. Each definition declares a `propsSchema` (a bounded JSON-Schema-style descriptor: object/array/string/number/boolean with optional description and enum) describing the props the card accepts. It applies in `props` mode only — it shapes the tool input the agent fills; in `workflow` mode it is ignored (the data workflow's output is the props verbatim). Cards render inside a sandboxed iframe and can send a message into the chat on the visitor's behalf via `window.card.sendMessage({ message })`; the card's compiled props are also exposed at `window.card.props`.\n\n`description` is the LLM-facing description used when a card is exposed to a chatbot as a tool — describe what the card is for so the model knows when to render it.\n\n## Modes\n\n`mode` decides who fills the card's props. `props` (default): the agent fills them directly per `propsSchema`. `workflow`: the card owns a single data workflow (`dataWorkflowId`, a card-type workflow) that runs once at display time, and its output becomes the props verbatim (not validated against `propsSchema`). The owned workflow is 1:1 (no other card may point at it) and is deleted with the card. A workflow-mode card must set `dataWorkflowId`; flipping back to `props` keeps the id dormant.\n\nIn workflow mode, the data workflow's trigger `inputFields` declare the fetch args the rendering agent supplies when it shows the card (a search query, an id, ...) — they become the card's tool input schema and reach the workflow as `{{input.*}}`, while `{{trigger.visitorId}}` carries the visitor context. Declare them via workflow:updateNode on the trigger node; do not use workflow variables for per-render values (variables are static constants). When there's nothing worth showing (an empty search result), end the data workflow with a skip_card node instead of an output — no card renders and the agent answers from the skip message in text.\n\n## Functions\n\n`functions` attaches tool-type workflows the card's own code can call: `[{ name, workflowId, kind }]`, where `name` is a JavaScript identifier (unique within the card), `workflowId` a workflow with a `tool` or `chatbot_tool` trigger (any other workflow type is refused on save; a workflow can be attached once per card), and `kind` says what a call does — `read` for a function that returns data (a lookup, a search, a price), or `action` for one that changes something (a booking, a message, a sign-up). There is no default: choose one per function. A read's answer is kept in the visitor's browser for up to an hour, per card instance, function and input, so a card rendered again (a stage card the visitor steps back to) asks nothing of the server, and a read already in flight for the same input is shared; `card.fn.<name>(input, { fresh: true })` skips the kept answer and replaces it. An action runs on every call, and once it succeeds the card's kept reads are dropped, since it may have changed what they said. A read may not run a tool that sends a message or an email, writes to the conversation or the visitor, or acts on the visitor's page — the save refuses it, naming the node; mark such a function an action. In the card's module they are `card.fn.<name>(input)`: `input` is an object matching the workflow's trigger `inputFields` (`{{input.*}}`), the call returns a promise of the workflow's `workflow_output` value, and it rejects with an `Error` carrying the failure message (a `fail_workflow` message, invalid input, a missing function). A `chatbot_tool` trigger also receives the conversation's `visitorId` and `threadId`. Calls run for the visitor the card was rendered to and count like any other tool run. Previews (the editor, the gallery) have no conversation and run nothing: there `card.fn.<name>()` resolves with the authored sample in `previewResults[workflowId]` (the value a real call would return, keyed by the function's `workflowId`) and rejects when none is set — so **author one sample per function, as you do `previewProps`**, and handle the rejection for the rest. Delete of a referenced workflow is refused while a card still names it.\n\n## Display: inline or stage\n\n`display` decides how the card shows in a conversation. `inline` (default): the card renders in the chat thread, in a slot about 308px wide. `stage`: the card has two surfaces — a **CTA** (`ctaSource`, a second ES module with the same `(root, props) => void` contract and the same props) renders in the thread as a compact teaser, and the card itself (`source`) opens on a **stage** — a 560px pane as tall as the chat, with no inset, so the card fills it edge to edge (no outer padding, border or radius on the outermost element) — when the CTA calls `window.card.open()`. A stage card must set `ctaSource`. Its `stageTitle` names it in the stage's header (required, default `\"Details\"`): plain text with the card's props as `{{props.<name>}}` (nested fields and array items too, e.g. `{{props.company.name}}`, `{{props.items[0].title}}`), with fallbacks for props that may be empty — `{{props.nickname || props.name || \"Your plan\"}}` uses the first that has a value. Each ref must be text, a number or a yes/no value, not an object or list. A missing value reads as empty, and a title that comes out empty shows \"Details\". In `props` mode the refs must exist in `propsSchema`; in `workflow` mode in the data workflow's output, and a workflow edit that drops a field the title uses is refused. Both surfaces share one stylesheet (`customCss` plus the Tailwind utilities scanned from both sources). Use `stage` for rich content a 308px slot would cramp — galleries, comparisons, maps, multi-column layouts — and keep the CTA short: a title, a one-line tease, an image or swatches, and a clear button that calls `window.card.open()`. Nothing opens implicitly, so a CTA without that call is a dead end. A stage card the chatbot sends opens by itself as it arrives (replayed history never does), so send one per reply. A card can read which surface it renders as via `window.card.surface` (`\"full\"` or `\"cta\"`). The CTA must show whether its card is currently open: `window.card.staged` flips, `<html data-staged>` is set (style with a `html[data-staged] .x` rule or Tailwind variants like `[html[data-staged]_&]:bg-indigo-50`), and an `alg-card-state` event fires on `window` with `detail.staged`. While open, the CTA should read as \"showing\" and offer the way back with `window.card.close()` (its button toggles between open and close); the card on the stage is `staged` too and may close the stage itself (a Done button), and Escape inside either surface closes it. A stage card that arrives while the chat is closed opens when the visitor opens the chat, where the stage sits beside it; on phones and tablets its CTA waits in the thread. The stage adapts to the screen — beside the chat on desktops, taking the chat panel over on tablets, a bottom sheet on phones — and the visitor can step through every stage item in the conversation. Markdown tables in replies open on the stage by themselves (an expand button), so a comparison table needs no card. The `stage-card` recipe stages a complete starter with both surfaces.\n\nManaged via `entity:*` ops. Provide `name`, `description`, `source` (the ES module text), `propsSchema`, `previewProps`, optional `customCss`, optionally `display` + `ctaSource` + `stageTitle`, optionally `mode` + `dataWorkflowId`, and optionally `functions` + `previewResults`; the server minifies the sources (esbuild) and compiles a per-card Tailwind v4 stylesheet on create/update. The compiled outputs are server-computed and excluded from MCP output.\n\n`previewProps` is a sample prop bag used to render the card outside a conversation (the dashboard's card editor preview and gallery tiles). Previews are sandboxed and cannot fetch, so they look broken without it — **always author realistic `previewProps`** (plausible names, URLs, items; in `workflow` mode, a representative sample of the data workflow's output) and keep it in sync when the props shape changes. A card with `functions` needs `previewResults` the same way: one sample output per attached function, keyed by its `workflowId`, kept in sync with the tool's output shape.\n\n`customCss` is arbitrary CSS prepended to the Tailwind v4 input — anything valid in a stylesheet works (selectors, `@media`, `@keyframes`, `@font-face`, etc.). Because it's compiled as part of the Tailwind input, it can also configure design tokens via `@theme` (custom colors, fonts, spacing scale) and use `@layer`. Tailwind utilities used in `source` are scanned and emitted automatically; you don't need to list them in `customCss`.\n\n## Links and navigation\n\nUse plain `<a href=\"...\">` anchors. The runtime intercepts clicks and routes them through the host: in the widget the visitor's current tab navigates; on the dashboard the URL opens in a new tab. Use `<a href=\"...\" target=\"_blank\">` to always open a new tab regardless of context. `window.card.navigate(url)` is also available for programmatic navigation and uses the same routing. Only `http:` / `https:` URLs are honored. In-card hash links (`<a href=\"#section\">`), modifier-clicks (cmd/ctrl/shift-click, middle-click), and non-http schemes (`mailto:`, `tel:`, ...) fall through to native browser behavior.\n\nIn the visitor-facing widget, the runtime automatically appends UTM params to every http(s) link (`utm_source=algomo-chat`, `utm_medium=card`, `utm_campaign=<card name slug>`) plus `alg-nav=card` (consumed once by the pixel on the destination page, surfacing `navigationSource: \"card\"` on that page_view — the hook for chat-driven follow-up workflows), and records link clicks as visitor `link_click` events — do not hand-add UTM parameters to card links. Query params already present on a link are never overridden, so a deliberate custom `utm_*` value wins. Dashboard and preview embeds render clean links and track nothing.\n\n## Iframe-layout rules\n\nThe iframe sizes itself to the card's content — there's no breathing room around it in the chat UI. Author cards as if they sit flush against the iframe's edges:\n\n- **No outer padding or margin.** Don't put `p-*` / `m-*` (or equivalent CSS) on the outermost element. The card's content should sit flush against the iframe edges. Inner padding *inside* the card chrome (e.g. inside a bordered/rounded panel) is fine — it's the content's own breathing room, not a gap to the iframe.\n- **No shadows that bleed past the iframe.** `box-shadow` on the outermost element (or hover-shadows on edge elements) gets clipped by the iframe and looks broken. Use borders, background contrast, or transform-based hover effects instead.","relationships":["referenced by chatbots via cards[].definitionId — exposes the card to the chatbot as a tool the LLM can call to render it","owns a card-type data workflow via dataWorkflowId (workflow mode) — 1:1, cascade-deleted with the card","exposes tool-type workflows to its own code via functions[].workflowId (`card.fn.<name>()`), each marked `read` or `action` — shared refs, a referenced workflow can't be deleted"]},{"entityType":"bookingCalendar","summary":"Booking calendar — a reusable meeting type with host, availability, and meeting length.","description":"A booking calendar represents a single meeting type that visitors can schedule (e.g. 'Sales intro 30min'). Each calendar belongs to an org and references a single OAuth connection as the host; events are written to that account's default calendar. Supported host services: `google-calendar`, `outlook-calendar`.\n\nKey fields:\n- `name`: human-facing label.\n- `slug`: per-org unique URL-safe identifier (lowercase letters, numbers, hyphens).\n- `hostConnectionId`: id of a calendar OAuth connection that owns the calendar. The connection's service determines which calendar provider is used. `hostConfig` is derived server-side from this connection — agents do not pass it.\n- `meetingLengthMinutes`: 15–120. The fixed length of each slot.\n- `leadTimeMinutes`: minimum notice before a slot can be booked (e.g. `60` blocks slots within the next hour).\n- `bufferBeforeMinutes` / `bufferAfterMinutes`: padding around busy intervals on the host's calendar when computing availability. Each capped at 240 minutes (4 hours) so misconfiguration can't make every slot unbookable.\n- `workingHours`: array of `{ day: 0..6, startMinutes, endMinutes }` — Sunday is `0`. Each block defines a window of bookable time on that weekday. Multiple blocks per day are allowed for split shifts.\n- `timezone`: IANA timezone for `workingHours` (e.g. `Europe/London`).\n- `meetingLinkPlatform`: one of `google_meet` (requires google-calendar host), `teams` (requires outlook-calendar host whose connection reports Teams capability), or `custom` (requires `customMeetingUrl`).\n- `customMeetingUrl`: required when `meetingLinkPlatform` is `custom`. Must be an http(s) URL.","relationships":["hostConnectionId references a connection (entityRef: connection, service must be google-calendar or outlook-calendar)"]},{"entityType":"task","summary":"Something a user or (more often) an agent needs to resolve — an onboarding step or a failing workflow.","description":"A task is an item in the org's task stack — work for a user or agent to take care of. Three kinds today:\n- onboarding — the agent-onboarding checklist (answer the workspace spec, submit a build plan). Its subtasks each carry instructions pointing at the right setup:* ops; they resolve automatically as the stages complete.\n- plan_part — one part of the submitted build plan, spawned by setup:submitPlan (plus the verified-website-access task, a website-search build task when the plan's searchDecision is \"planned\", and a final test-and-report task). Each carries the part's description and build instructions: read the relevant recipes, apply templates with recipe:apply, build in a session, test, complete the task. `context.planVersion`/`context.partIndex` tie it to the plan; resubmitting the plan replaces the open set.\n- workflow_failure — raised automatically when a workflow's non-test run fails. `context.workflowId` points at the failing workflow; inspect and fix it (workflow:get), then complete the task once you've confirmed it's healthy.\n\nManaged via task:* ops. These are live — no session, no diff/save step; each op takes effect immediately. Available ops:\n- task:list — the org's tasks, open by default (pass status/kind to filter)\n- task:get — one task with its subtasks and their instructions\n- task:complete — mark a whole task done (the work was actually done)\n- task:dismiss — hide a task without acting on it (secondary; prefer complete)\n- task:completeSubtask / task:skipSubtask — resolve one subtask by its key; the task auto-closes once every subtask is resolved\n\nA task may have no subtasks (it's then atomic — resolve it with task:complete). Subtasks are addressed by their stable `key`, never by position. `resolvableBy` says who a task is for: \"agent\" tasks are yours to resolve (the dashboard offers the user no resolution for them); \"user_and_agent\" tasks can be resolved by either.","relationships":["workflow_failure tasks reference a workflow via context.workflowId","plan_part tasks reference the onboarding plan via context.planVersion/partIndex"]},{"entityType":"connector","summary":"A single reusable recipe (an HTTP request or script) that calls a website's own API from the visitor's browser.","description":"A connector is one reusable \"recipe\" that leverages a website's own API from within the visitor's live, logged-in browser session (user-space only). It's the managed layer over ad-hoc visitor HTTP/script workflow nodes: named, versioned, and reused across workflows and tools.\n\nFields:\n- `name`: the connector's tool-facing name.\n- `description`: tells the model what it does.\n- `domain`: the website the recipe is allowed to run on, as a bare domain (e.g. \"shop.acme.com\"). Required — it scopes where the recipe may run (and, in test runs relayed through the paired browser extension, which tab is used).\n- `kind`: what a run does to the world — `read` (the default) fetches or inspects something and may be run again when the visitor's page changes mid-call; `action` changes something (places an order, submits a form) and is never repeated by the platform — an interrupted action fails and the chatbot decides whether to call it again. Set `action` on anything that must not happen twice.\n- `spec`: the recipe definition (see below).\n- `inputSchema` / `outputSchema`: the I/O contract (see below).\n- `complete` (read-only): whether it's configured enough to run — an http recipe has a URL, a script recipe has code, and either has a valid domain. A blank connector saves as a valid draft but fails at call time until it's complete.\n\n`spec` is a discriminated union on `type`:\n- `http`: { type: \"http\", method (GET|POST|PUT|PATCH|DELETE), urlTemplate (full URL incl. query string), headers (record), body (a JSON string, or null for none) }. Runs as a browser fetch against the visitor's session (their cookies), so it can reach endpoints only available to a logged-in visitor. `urlTemplate` must be a valid absolute URL (e.g. https://shop.acme.com/api) unless it carries a `{{variable}}`, in which case URL-format validation is skipped.\n- `script`: { type: \"script\", code }. Runs JavaScript in the visitor's page. `code` is the BODY of an async function, not a function expression: `args` is in scope, top-level `await` is allowed, and it must end with a top-level `return` of the result. Writing a function expression (`async (args) => {...}`) is the classic mistake — it evaluates to nothing and the call fails with \"script returned nothing\". Example: `const res = await fetch(args.path); return { status: res.status };`. The body is not interpolated — variables arrive on `args`.\n\n`inputSchema` (variables the caller supplies) and `outputSchema` (the response shape) are single JSON-Schema-style descriptors (object/array/string/number/boolean/any, with optional description, enum, nullable, default). Both are required; set to { type: \"any\" } when there is nothing meaningful to declare. At call time (non-`any` schemas only) the variables are validated against `inputSchema` and the response (an http recipe's body, a script recipe's result) against `outputSchema`; a mismatch fails the call naming the offending fields. Setting `outputSchema` to { type: \"any\" } skips response validation entirely — a deliberate debugging affordance: use it to see what a call actually returns, then declare the real shape. In an `http` recipe, variables are inserted as `{{name}}` in the urlTemplate/headers/body, and nested fields drill in via dotted/indexed paths (`{{address.city}}`, `{{items[0]}}`); in a `script` recipe they arrive on the `args` object (`args.address.city`). Every `{{...}}` reference in an http recipe must resolve through `inputSchema` (an `any` input accepts anything) — an undeclared variable fails validation.\n\nSecurity: a connector runs in the visitor's browser, so anything in its headers or code is visible to the visitor. It carries no credential or secret references — never put a platform secret in one. For authenticated server-side API calls, use a workflow http_request node with a connection instead.\n\nManaged via entity:* ops.","relationships":["invoked from workflows via a run_connector node (entityRef: connector); only a complete connector can be referenced — a draft can't be used in a workflow, and a connector that a workflow references can't be saved back into a draft state"]},{"entityType":"testCase","summary":"A scripted check of how an entity should behave — today a visitor conversation run against a chatbot and judged turn by turn.","description":"A test case states how an entity should behave for a scripted input, and is checked by running it. Cases are persistent: a suite built while configuring a chatbot catches a later change breaking it. Tests never run on their own — not on save, not on a schedule. Available where the test_cases feature is enabled for the workspace; elsewhere every testCase op is refused.\n\nFields:\n- `name`, `tags`: a tag is how cases are grouped for a run (`lead-capture`, `booking`); there is no suite entity.\n- `kind`: the harness, fixed at creation. `chatbot_conversation` targets a chatbot.\n- `targetId`: the entity under test (a chatbot id for `chatbot_conversation`). Deleting the target deletes its cases.\n- `config` for `chatbot_conversation`:\n  - `turns`: the visitor's scripted messages in order (at most 30). Each turn has `message` (sent verbatim as the visitor), an optional `should` (prose for how that reply should go — what it must do and must not do — judged by an LLM against the transcript so far), and `checks` (deterministic, evaluated in code against that reply).\n  - `rubric`: optional prose for how the whole conversation should go, judged once at the end. Use it for cross-turn properties: nothing asked twice, exactly one submission, order of operations.\n- Checks, each with a `kind`:\n  - `workflow_tool`: `workflowId` names a tool workflow attached to the target chatbot (never the tool's name — a rename must not break the case). `times` is `once`, `never` or `at_least_once`. An optional `where` tests a value inside the call: `path` addresses `args.<field>` or `result.<field>`, `op` is `equals` (deep), `contains` (substring, or array member) or `exists`, `value` the expected value (not for `exists`; not allowed with `never`).\n  - `builtin_tool`: the same for a built-in chatbot tool by key: getPageContent, handoverToHuman, requestImageUpload, viewImage, showResponseButtons, setConversationLanguage, updateWorkingMemory, switchGoal, closeConversation, getTimeInTimezone, listPreviousThreads, getThreadTranscript.\n  - `text`: the reply's text `contains` / `not_contains` a string, or matches a `regex` (RE2 syntax, unanchored, case-sensitive).\n- Turns and checks carry a `key` for addressing; omit it on create and one is minted.\n\nPrefer a check over prose wherever the expectation is a value (which tool ran, what it was called with); keep `should` and `rubric` for behaviour (one question per reply, no price quoted, tone). Prose is judged by a small model against the description alone: a reply fails only for what the `should` requires or forbids, and what it leaves unsaid (wording, length, order within the reply, tool calls it does not name) is not judged, so write expectations, never tolerances. The `rubric` is judged the same way over the whole conversation; it passes unless one of its conditions is violated, so keep it to qualities no single turn carries (tone, nothing invented, nothing asked twice). Verdicts vary a little between runs.\n\nSave-time validation: the target must exist, and every `workflowId` in a check must be a tool workflow attached to the target chatbot (`toolIds` or a goal's `toolIds`), or the save is refused. A workflow a case checks can't be deleted or detached from the chatbot until the case is changed.\n\nManaged via entity:* ops. Running is its own op set: testCase:run plays one case and waits (it is synchronous — it returns once every rep has been played and judged — so run it as a background task when you can); testCase:runBatch runs cases by id, tag or all of a target in the background (poll testCase:getBatch); testCase:listBatches, testCase:listRuns and testCase:getRun read what ran; testCase:passRates groups finished runs by (case, case version, target version), so a rate never mixes what ran.","relationships":["targetId references a chatbot (for kind chatbot_conversation); deleting the chatbot deletes its test cases","config.turns[].checks[].workflowId references a tool workflow attached to the target chatbot (entityRef: workflow); a referenced workflow can't be deleted or detached while the case checks it"]}],"entitySchemas":{"chatbot":{"entity:create":{"input":{"type":"object","properties":{"name":{"type":"string","minLength":1},"isDefault":{"type":"boolean"},"builtinFields":{"type":"array","items":{"type":"string","enum":["full-name","email","phone","company","role"]}},"fields":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"key":{"type":"string","pattern":"^[a-z0-9]+(?:[-_][a-z0-9]+)*$"},"name":{"type":"string"},"description":{"type":"string"},"type":{"type":"string","const":"string"}},"required":["name","description","type"],"additionalProperties":false},{"type":"object","properties":{"key":{"$ref":"#/properties/fields/items/anyOf/0/properties/key"},"name":{"$ref":"#/properties/fields/items/anyOf/0/properties/name"},"description":{"$ref":"#/properties/fields/items/anyOf/0/properties/description"},"type":{"type":"string","const":"number"}},"required":["name","description","type"],"additionalProperties":false},{"type":"object","properties":{"key":{"$ref":"#/properties/fields/items/anyOf/0/properties/key"},"name":{"$ref":"#/properties/fields/items/anyOf/0/properties/name"},"description":{"$ref":"#/properties/fields/items/anyOf/0/properties/description"},"type":{"type":"string","const":"enum"},"enumOptions":{"type":"array","items":{"type":"string"},"minItems":1}},"required":["name","description","type","enumOptions"],"additionalProperties":false}]},"description":"Supports granular item ops: entity:pushItem/updateItem/deleteItem address single members by dotted path instead of resending the array.","x-itemOps":true},"goals":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"name":{"type":"string","minLength":1},"isDefault":{"type":"boolean"},"instructions":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"name":{"type":"string","minLength":1},"content":{"type":"string"}},"required":["name","content"],"additionalProperties":false},"description":"Supports granular item ops: entity:pushItem/updateItem/deleteItem address single members by dotted path instead of resending the array. Order is semantic — reorder with entity:moveItem.","x-itemOps":true,"x-itemOpsOrdered":true},"toolIds":{"type":"array","items":{"type":"string","format":"uuid"}},"cardDefinitionIds":{"type":"array","items":{"type":"string","format":"uuid"}},"calendarIds":{"type":"array","items":{"type":"string","format":"uuid"}}},"required":["name","instructions"],"additionalProperties":false},"description":"Supports granular item ops: entity:pushItem/updateItem/deleteItem address single members by dotted path instead of resending the array.","x-itemOps":true},"instructions":{"type":"array","items":{"$ref":"#/properties/goals/items/properties/instructions/items"},"description":"Supports granular item ops: entity:pushItem/updateItem/deleteItem address single members by dotted path instead of resending the array. Order is semantic — reorder with entity:moveItem.","x-itemOps":true,"x-itemOpsOrdered":true},"toolIds":{"type":"array","items":{"type":"string","format":"uuid"}},"cardDefinitionIds":{"type":"array","items":{"type":"string","format":"uuid"}},"calendarIds":{"type":"array","items":{"type":"string","format":"uuid"}},"workflowIds":{"type":"array","items":{"type":"string","format":"uuid"}},"capabilities":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"knowledge_base"},"scope":{"type":"string","enum":["all","selected"]},"folderIds":{"type":"array","items":{"type":"string","format":"uuid"}}},"required":["type","scope","folderIds"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"response_buttons"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"human_handover"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"progress_updates"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"image_uploads"},"mode":{"type":"string","enum":["always","on_request"]}},"required":["type","mode"],"additionalProperties":false}]},"description":"Supports granular item ops: entity:pushItem/updateItem/deleteItem address single members by dotted path instead of resending the array.","x-itemOps":true},"model":{"type":["string","null"]},"enabled":{"type":"boolean"}},"required":["name"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"output":{"type":"object","properties":{"entityId":{"type":"string"},"localErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["entityId","localErrors"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}},"entity:get":{"input":{"type":"object","properties":{"op":{"type":"string","const":"entity:get"},"sessionId":{"type":"string"},"entityType":{"type":"string","enum":["chatbot","page","conversionRule","cardDefinition","bookingCalendar","connector","testCase","wikiPage","wikiFolder"]},"entityId":{"type":"string"},"params":{"type":"object","additionalProperties":{}}},"required":["op","entityType"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"output":{"type":"object","properties":{"id":{"type":"string"},"orgId":{"type":"string"},"isDefault":{"type":"boolean"},"name":{"type":"string","minLength":1},"builtinFields":{"type":"array","items":{"type":"string","enum":["full-name","email","phone","company","role"]}},"fields":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"key":{"type":"string","minLength":1},"name":{"type":"string"},"description":{"type":"string"},"type":{"type":"string","const":"string"}},"required":["key","name","description","type"],"additionalProperties":false},{"type":"object","properties":{"key":{"$ref":"#/properties/fields/items/anyOf/0/properties/key"},"name":{"$ref":"#/properties/fields/items/anyOf/0/properties/name"},"description":{"$ref":"#/properties/fields/items/anyOf/0/properties/description"},"type":{"type":"string","const":"number"}},"required":["key","name","description","type"],"additionalProperties":false},{"type":"object","properties":{"key":{"$ref":"#/properties/fields/items/anyOf/0/properties/key"},"name":{"$ref":"#/properties/fields/items/anyOf/0/properties/name"},"description":{"$ref":"#/properties/fields/items/anyOf/0/properties/description"},"type":{"type":"string","const":"enum"},"enumOptions":{"type":"array","items":{"type":"string"},"minItems":1}},"required":["key","name","description","type","enumOptions"],"additionalProperties":false}]}},"goals":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"isDefault":{"type":"boolean"},"instructions":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"content":{"type":"string","minLength":1}},"required":["key","name","content"],"additionalProperties":false}},"toolIds":{"type":"array","items":{"type":"string","format":"uuid"}},"cardDefinitionIds":{"type":"array","items":{"type":"string","format":"uuid"}},"calendarIds":{"type":"array","items":{"type":"string","format":"uuid"}}},"required":["key","name","isDefault","instructions","toolIds","cardDefinitionIds","calendarIds"],"additionalProperties":false}},"instructions":{"$ref":"#/properties/goals/items/properties/instructions"},"toolIds":{"$ref":"#/properties/goals/items/properties/toolIds"},"cardDefinitionIds":{"$ref":"#/properties/goals/items/properties/cardDefinitionIds"},"calendarIds":{"$ref":"#/properties/goals/items/properties/calendarIds"},"workflowIds":{"type":"array","items":{"type":"string","format":"uuid"}},"capabilities":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"knowledge_base"},"scope":{"type":"string","enum":["all","selected"]},"folderIds":{"type":"array","items":{"type":"string","format":"uuid"}}},"required":["type","scope","folderIds"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"response_buttons"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"human_handover"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"progress_updates"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"image_uploads"},"mode":{"type":"string","enum":["always","on_request"]}},"required":["type","mode"],"additionalProperties":false}]}},"model":{"type":["string","null"]},"enabled":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"}},"required":["id","orgId","isDefault","name","builtinFields","fields","goals","instructions","toolIds","cardDefinitionIds","calendarIds","workflowIds","capabilities","model","enabled","createdAt"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}},"entity:list":{"input":{"anyOf":[{"not":{}},{"type":"object","properties":{},"additionalProperties":false}],"$schema":"http://json-schema.org/draft-07/schema#"},"output":{"type":"object","properties":{"entities":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"orgId":{"type":"string"},"isDefault":{"type":"boolean"},"name":{"type":"string","minLength":1},"builtinFields":{"type":"array","items":{"type":"string","enum":["full-name","email","phone","company","role"]}},"fields":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"key":{"type":"string","minLength":1},"name":{"type":"string"},"description":{"type":"string"},"type":{"type":"string","const":"string"}},"required":["key","name","description","type"],"additionalProperties":false},{"type":"object","properties":{"key":{"$ref":"#/properties/entities/items/properties/fields/items/anyOf/0/properties/key"},"name":{"$ref":"#/properties/entities/items/properties/fields/items/anyOf/0/properties/name"},"description":{"$ref":"#/properties/entities/items/properties/fields/items/anyOf/0/properties/description"},"type":{"type":"string","const":"number"}},"required":["key","name","description","type"],"additionalProperties":false},{"type":"object","properties":{"key":{"$ref":"#/properties/entities/items/properties/fields/items/anyOf/0/properties/key"},"name":{"$ref":"#/properties/entities/items/properties/fields/items/anyOf/0/properties/name"},"description":{"$ref":"#/properties/entities/items/properties/fields/items/anyOf/0/properties/description"},"type":{"type":"string","const":"enum"},"enumOptions":{"type":"array","items":{"type":"string"},"minItems":1}},"required":["key","name","description","type","enumOptions"],"additionalProperties":false}]}},"goals":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"isDefault":{"type":"boolean"},"instructions":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"content":{"type":"string","minLength":1}},"required":["key","name","content"],"additionalProperties":false}},"toolIds":{"type":"array","items":{"type":"string","format":"uuid"}},"cardDefinitionIds":{"type":"array","items":{"type":"string","format":"uuid"}},"calendarIds":{"type":"array","items":{"type":"string","format":"uuid"}}},"required":["key","name","isDefault","instructions","toolIds","cardDefinitionIds","calendarIds"],"additionalProperties":false}},"instructions":{"$ref":"#/properties/entities/items/properties/goals/items/properties/instructions"},"toolIds":{"$ref":"#/properties/entities/items/properties/goals/items/properties/toolIds"},"cardDefinitionIds":{"$ref":"#/properties/entities/items/properties/goals/items/properties/cardDefinitionIds"},"calendarIds":{"$ref":"#/properties/entities/items/properties/goals/items/properties/calendarIds"},"workflowIds":{"type":"array","items":{"type":"string","format":"uuid"}},"capabilities":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"knowledge_base"},"scope":{"type":"string","enum":["all","selected"]},"folderIds":{"type":"array","items":{"type":"string","format":"uuid"}}},"required":["type","scope","folderIds"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"response_buttons"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"human_handover"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"progress_updates"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"image_uploads"},"mode":{"type":"string","enum":["always","on_request"]}},"required":["type","mode"],"additionalProperties":false}]}},"model":{"type":["string","null"]},"enabled":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"}},"required":["id","orgId","isDefault","name","builtinFields","fields","goals","instructions","toolIds","cardDefinitionIds","calendarIds","workflowIds","capabilities","model","enabled","createdAt"],"additionalProperties":false}}},"required":["entities"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}},"entity:update":{"input":{"type":"object","properties":{"name":{"type":"string","minLength":1},"isDefault":{"type":"boolean"},"builtinFields":{"type":"array","items":{"type":"string","enum":["full-name","email","phone","company","role"]}},"fields":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"key":{"type":"string","pattern":"^[a-z0-9]+(?:[-_][a-z0-9]+)*$"},"name":{"type":"string"},"description":{"type":"string"},"type":{"type":"string","const":"string"}},"required":["name","description","type"],"additionalProperties":false},{"type":"object","properties":{"key":{"$ref":"#/properties/fields/items/anyOf/0/properties/key"},"name":{"$ref":"#/properties/fields/items/anyOf/0/properties/name"},"description":{"$ref":"#/properties/fields/items/anyOf/0/properties/description"},"type":{"type":"string","const":"number"}},"required":["name","description","type"],"additionalProperties":false},{"type":"object","properties":{"key":{"$ref":"#/properties/fields/items/anyOf/0/properties/key"},"name":{"$ref":"#/properties/fields/items/anyOf/0/properties/name"},"description":{"$ref":"#/properties/fields/items/anyOf/0/properties/description"},"type":{"type":"string","const":"enum"},"enumOptions":{"type":"array","items":{"type":"string"},"minItems":1}},"required":["name","description","type","enumOptions"],"additionalProperties":false}]},"description":"Supports granular item ops: entity:pushItem/updateItem/deleteItem address single members by dotted path instead of resending the array.","x-itemOps":true},"goals":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"name":{"type":"string","minLength":1},"isDefault":{"type":"boolean"},"instructions":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"name":{"type":"string","minLength":1},"content":{"type":"string"}},"required":["name","content"],"additionalProperties":false},"description":"Supports granular item ops: entity:pushItem/updateItem/deleteItem address single members by dotted path instead of resending the array. Order is semantic — reorder with entity:moveItem.","x-itemOps":true,"x-itemOpsOrdered":true},"toolIds":{"type":"array","items":{"type":"string","format":"uuid"}},"cardDefinitionIds":{"type":"array","items":{"type":"string","format":"uuid"}},"calendarIds":{"type":"array","items":{"type":"string","format":"uuid"}}},"required":["name","instructions"],"additionalProperties":false},"description":"Supports granular item ops: entity:pushItem/updateItem/deleteItem address single members by dotted path instead of resending the array.","x-itemOps":true},"instructions":{"type":"array","items":{"$ref":"#/properties/goals/items/properties/instructions/items"},"description":"Supports granular item ops: entity:pushItem/updateItem/deleteItem address single members by dotted path instead of resending the array. Order is semantic — reorder with entity:moveItem.","x-itemOps":true,"x-itemOpsOrdered":true},"toolIds":{"type":"array","items":{"type":"string","format":"uuid"}},"cardDefinitionIds":{"type":"array","items":{"type":"string","format":"uuid"}},"calendarIds":{"type":"array","items":{"type":"string","format":"uuid"}},"workflowIds":{"type":"array","items":{"type":"string","format":"uuid"}},"capabilities":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"knowledge_base"},"scope":{"type":"string","enum":["all","selected"]},"folderIds":{"type":"array","items":{"type":"string","format":"uuid"}}},"required":["type","scope","folderIds"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"response_buttons"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"human_handover"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"progress_updates"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"image_uploads"},"mode":{"type":"string","enum":["always","on_request"]}},"required":["type","mode"],"additionalProperties":false}]},"description":"Supports granular item ops: entity:pushItem/updateItem/deleteItem address single members by dotted path instead of resending the array.","x-itemOps":true},"model":{"type":["string","null"]},"enabled":{"type":"boolean"}},"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"output":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"orgId":{"type":"string"},"isDefault":{"type":"boolean"},"name":{"type":"string","minLength":1},"builtinFields":{"type":"array","items":{"type":"string","enum":["full-name","email","phone","company","role"]}},"fields":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"key":{"type":"string","minLength":1},"name":{"type":"string"},"description":{"type":"string"},"type":{"type":"string","const":"string"}},"required":["key","name","description","type"],"additionalProperties":false},{"type":"object","properties":{"key":{"$ref":"#/properties/data/properties/fields/items/anyOf/0/properties/key"},"name":{"$ref":"#/properties/data/properties/fields/items/anyOf/0/properties/name"},"description":{"$ref":"#/properties/data/properties/fields/items/anyOf/0/properties/description"},"type":{"type":"string","const":"number"}},"required":["key","name","description","type"],"additionalProperties":false},{"type":"object","properties":{"key":{"$ref":"#/properties/data/properties/fields/items/anyOf/0/properties/key"},"name":{"$ref":"#/properties/data/properties/fields/items/anyOf/0/properties/name"},"description":{"$ref":"#/properties/data/properties/fields/items/anyOf/0/properties/description"},"type":{"type":"string","const":"enum"},"enumOptions":{"type":"array","items":{"type":"string"},"minItems":1}},"required":["key","name","description","type","enumOptions"],"additionalProperties":false}]}},"goals":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"isDefault":{"type":"boolean"},"instructions":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"content":{"type":"string","minLength":1}},"required":["key","name","content"],"additionalProperties":false}},"toolIds":{"type":"array","items":{"type":"string","format":"uuid"}},"cardDefinitionIds":{"type":"array","items":{"type":"string","format":"uuid"}},"calendarIds":{"type":"array","items":{"type":"string","format":"uuid"}}},"required":["key","name","isDefault","instructions","toolIds","cardDefinitionIds","calendarIds"],"additionalProperties":false}},"instructions":{"$ref":"#/properties/data/properties/goals/items/properties/instructions"},"toolIds":{"$ref":"#/properties/data/properties/goals/items/properties/toolIds"},"cardDefinitionIds":{"$ref":"#/properties/data/properties/goals/items/properties/cardDefinitionIds"},"calendarIds":{"$ref":"#/properties/data/properties/goals/items/properties/calendarIds"},"workflowIds":{"type":"array","items":{"type":"string","format":"uuid"}},"capabilities":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"knowledge_base"},"scope":{"type":"string","enum":["all","selected"]},"folderIds":{"type":"array","items":{"type":"string","format":"uuid"}}},"required":["type","scope","folderIds"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"response_buttons"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"human_handover"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"progress_updates"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"image_uploads"},"mode":{"type":"string","enum":["always","on_request"]}},"required":["type","mode"],"additionalProperties":false}]}},"model":{"type":["string","null"]},"enabled":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"}},"required":["id","orgId","isDefault","name","builtinFields","fields","goals","instructions","toolIds","cardDefinitionIds","calendarIds","workflowIds","capabilities","model","enabled","createdAt"],"additionalProperties":false},"localErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["data","localErrors"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}},"page":{"entity:create":{"input":{"type":"object","properties":{"url":{"type":"string","minLength":1}},"required":["url"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"output":{"type":"object","properties":{"entityId":{"type":"string"},"localErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["entityId","localErrors"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}},"entity:list":{"input":{"type":"object","properties":{},"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"output":{"type":"object","properties":{"entities":{"type":"array","items":{"type":"object","additionalProperties":{}}}},"required":["entities"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}},"entity:update":{"input":{"type":"object","properties":{"url":{"type":"string","minLength":1}},"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"output":{"type":"object","properties":{"diff":{"type":"array","items":{"type":"object","properties":{"path":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"key"},"key":{"type":"string"}},"required":["kind","key"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"member"},"key":{"type":"string"}},"required":["kind","key"],"additionalProperties":false}]}},"op":{"type":"string","enum":["add","remove","replace","move"]},"before":{},"after":{},"fromIndex":{"type":"integer"},"toIndex":{"type":"integer"}},"required":["path","op"],"additionalProperties":false}},"localErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}},"cascaded":{"type":"array","items":{"type":"object","properties":{"entityType":{"type":"string","enum":["chatbot","page","conversionRule","cardDefinition","bookingCalendar","connector","testCase","wikiPage","wikiFolder"]},"entityId":{"type":"string"}},"required":["entityType","entityId"],"additionalProperties":false},"description":"Other entities this update also changed via cascade (e.g. pages whose wiki: links a rename rewrote); fetch with entity:get"}},"required":["diff","localErrors"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}},"conversionRule":{"entity:create":{"input":{"type":"object","properties":{"name":{"type":"string","minLength":1},"definition":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"page_view"},"matchType":{"type":"string","enum":["equals","contains","starts-with"]},"url":{"type":"string","minLength":1}},"required":["type","matchType","url"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"link_click"},"matchType":{"type":"string","enum":["equals","contains","starts-with"]},"url":{"type":"string"},"text":{"type":"string"}},"required":["type","matchType"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"form_submission"},"formId":{"type":"string"},"formName":{"type":"string"},"formFields":{"type":"array","items":{"type":"string"}}},"required":["type","formFields"],"additionalProperties":false}]}},"required":["name","definition"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"output":{"type":"object","properties":{"entityId":{"type":"string"},"localErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["entityId","localErrors"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}},"entity:list":{"input":{"type":"object","properties":{},"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"output":{"type":"object","properties":{"entities":{"type":"array","items":{"type":"object","additionalProperties":{}}}},"required":["entities"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}},"entity:update":{"input":{"type":"object","properties":{"name":{"type":"string","minLength":1},"definition":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"page_view"},"matchType":{"type":"string","enum":["equals","contains","starts-with"]},"url":{"type":"string","minLength":1}},"required":["type","matchType","url"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"link_click"},"matchType":{"type":"string","enum":["equals","contains","starts-with"]},"url":{"type":"string"},"text":{"type":"string"}},"required":["type","matchType"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"form_submission"},"formId":{"type":"string"},"formName":{"type":"string"},"formFields":{"type":"array","items":{"type":"string"}}},"required":["type","formFields"],"additionalProperties":false}]}},"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"output":{"type":"object","properties":{"diff":{"type":"array","items":{"type":"object","properties":{"path":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"key"},"key":{"type":"string"}},"required":["kind","key"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"member"},"key":{"type":"string"}},"required":["kind","key"],"additionalProperties":false}]}},"op":{"type":"string","enum":["add","remove","replace","move"]},"before":{},"after":{},"fromIndex":{"type":"integer"},"toIndex":{"type":"integer"}},"required":["path","op"],"additionalProperties":false}},"localErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}},"cascaded":{"type":"array","items":{"type":"object","properties":{"entityType":{"type":"string","enum":["chatbot","page","conversionRule","cardDefinition","bookingCalendar","connector","testCase","wikiPage","wikiFolder"]},"entityId":{"type":"string"}},"required":["entityType","entityId"],"additionalProperties":false},"description":"Other entities this update also changed via cascade (e.g. pages whose wiki: links a rename rewrote); fetch with entity:get"}},"required":["diff","localErrors"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}},"cardDefinition":{"entity:create":{"input":{"type":"object","properties":{"name":{"type":"string","minLength":1},"description":{"type":"string"},"source":{"type":"string","minLength":1},"customCss":{"type":"string"},"display":{"type":"string","enum":["inline","stage"]},"ctaSource":{"type":"string"},"stageTitle":{"type":"string"},"propsSchema":{"type":"object","properties":{"type":{"type":"string","const":"object"},"description":{"type":"string"},"properties":{"type":"object","additionalProperties":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"string"},"description":{"type":"string"},"enum":{"type":"array","items":{"type":"string"}}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"number"},"description":{"type":"string"},"enum":{"type":"array","items":{"type":"number"}}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"boolean"},"description":{"type":"string"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"object"},"description":{"type":"string"},"properties":{"type":"object","additionalProperties":{"$ref":"#/properties/propsSchema/properties/properties/additionalProperties"}},"required":{"type":"array","items":{"type":"string"}}},"required":["type","properties"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"array"},"description":{"type":"string"},"items":{"$ref":"#/properties/propsSchema/properties/properties/additionalProperties"}},"required":["type","items"],"additionalProperties":false}]}},"required":{"type":"array","items":{"type":"string"}}},"required":["type","properties"],"additionalProperties":false},"previewProps":{"type":"object","additionalProperties":{}},"mode":{"type":"string","enum":["props","workflow"]},"dataWorkflowId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"functions":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"workflowId":{"type":"string","format":"uuid"},"kind":{"type":"string","enum":["read","action"]}},"required":["name","workflowId","kind"],"additionalProperties":false}},"previewResults":{"type":"object","additionalProperties":{}}},"required":["name","description","source","propsSchema"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"output":{"type":"object","properties":{"entityId":{"type":"string"},"localErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["entityId","localErrors"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}},"entity:get":{"input":{"type":"object","properties":{"op":{"type":"string","const":"entity:get"},"sessionId":{"type":"string"},"entityType":{"type":"string","enum":["chatbot","page","conversionRule","cardDefinition","bookingCalendar","connector","testCase","wikiPage","wikiFolder"]},"entityId":{"type":"string"},"params":{"type":"object","additionalProperties":{}}},"required":["op","entityType"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"output":{"type":"object","properties":{"id":{"type":"string"},"orgId":{"type":"string"},"name":{"type":"string","minLength":1},"description":{"type":"string"},"source":{"type":"string","minLength":1},"customCss":{"type":"string"},"display":{"type":"string","enum":["inline","stage"]},"ctaSource":{"type":"string"},"stageTitle":{"type":"string"},"propsSchema":{"type":"object","properties":{"type":{"type":"string","const":"object"},"description":{"type":"string"},"properties":{"type":"object","additionalProperties":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"string"},"description":{"type":"string"},"enum":{"type":"array","items":{"type":"string"}}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"number"},"description":{"type":"string"},"enum":{"type":"array","items":{"type":"number"}}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"boolean"},"description":{"type":"string"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"object"},"description":{"type":"string"},"properties":{"type":"object","additionalProperties":{"$ref":"#/properties/propsSchema/properties/properties/additionalProperties"}},"required":{"type":"array","items":{"type":"string"}}},"required":["type","properties"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"array"},"description":{"type":"string"},"items":{"$ref":"#/properties/propsSchema/properties/properties/additionalProperties"}},"required":["type","items"],"additionalProperties":false}]}},"required":{"type":"array","items":{"type":"string"}}},"required":["type","properties"],"additionalProperties":false},"previewProps":{"type":"object","additionalProperties":{}},"mode":{"type":"string","enum":["props","workflow"]},"dataWorkflowId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"functions":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"workflowId":{"type":"string","format":"uuid"},"kind":{"type":"string","enum":["read","action"]}},"required":["name","workflowId","kind"],"additionalProperties":false}},"previewResults":{"type":"object","additionalProperties":{}},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","orgId","name","description","source","customCss","display","ctaSource","stageTitle","propsSchema","previewProps","mode","dataWorkflowId","functions","previewResults","createdAt","updatedAt"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}},"entity:list":{"input":{"anyOf":[{"not":{}},{"type":"object","properties":{},"additionalProperties":false}],"$schema":"http://json-schema.org/draft-07/schema#"},"output":{"type":"object","properties":{"entities":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"orgId":{"type":"string"},"name":{"type":"string","minLength":1},"description":{"type":"string"},"source":{"type":"string","minLength":1},"customCss":{"type":"string"},"display":{"type":"string","enum":["inline","stage"]},"ctaSource":{"type":"string"},"stageTitle":{"type":"string"},"propsSchema":{"type":"object","properties":{"type":{"type":"string","const":"object"},"description":{"type":"string"},"properties":{"type":"object","additionalProperties":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"string"},"description":{"type":"string"},"enum":{"type":"array","items":{"type":"string"}}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"number"},"description":{"type":"string"},"enum":{"type":"array","items":{"type":"number"}}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"boolean"},"description":{"type":"string"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"object"},"description":{"type":"string"},"properties":{"type":"object","additionalProperties":{"$ref":"#/properties/entities/items/properties/propsSchema/properties/properties/additionalProperties"}},"required":{"type":"array","items":{"type":"string"}}},"required":["type","properties"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"array"},"description":{"type":"string"},"items":{"$ref":"#/properties/entities/items/properties/propsSchema/properties/properties/additionalProperties"}},"required":["type","items"],"additionalProperties":false}]}},"required":{"type":"array","items":{"type":"string"}}},"required":["type","properties"],"additionalProperties":false},"previewProps":{"type":"object","additionalProperties":{}},"mode":{"type":"string","enum":["props","workflow"]},"dataWorkflowId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"functions":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"workflowId":{"type":"string","format":"uuid"},"kind":{"type":"string","enum":["read","action"]}},"required":["name","workflowId","kind"],"additionalProperties":false}},"previewResults":{"type":"object","additionalProperties":{}},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","orgId","name","description","source","customCss","display","ctaSource","stageTitle","propsSchema","previewProps","mode","dataWorkflowId","functions","previewResults","createdAt","updatedAt"],"additionalProperties":false}}},"required":["entities"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}},"entity:update":{"input":{"type":"object","properties":{"name":{"type":"string","minLength":1},"description":{"type":"string"},"source":{"type":"string","minLength":1},"customCss":{"type":"string"},"display":{"type":"string","enum":["inline","stage"]},"ctaSource":{"type":"string"},"stageTitle":{"type":"string"},"propsSchema":{"type":"object","properties":{"type":{"type":"string","const":"object"},"description":{"type":"string"},"properties":{"type":"object","additionalProperties":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"string"},"description":{"type":"string"},"enum":{"type":"array","items":{"type":"string"}}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"number"},"description":{"type":"string"},"enum":{"type":"array","items":{"type":"number"}}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"boolean"},"description":{"type":"string"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"object"},"description":{"type":"string"},"properties":{"type":"object","additionalProperties":{"$ref":"#/properties/propsSchema/properties/properties/additionalProperties"}},"required":{"type":"array","items":{"type":"string"}}},"required":["type","properties"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"array"},"description":{"type":"string"},"items":{"$ref":"#/properties/propsSchema/properties/properties/additionalProperties"}},"required":["type","items"],"additionalProperties":false}]}},"required":{"type":"array","items":{"type":"string"}}},"required":["type","properties"],"additionalProperties":false},"previewProps":{"type":"object","additionalProperties":{}},"mode":{"type":"string","enum":["props","workflow"]},"dataWorkflowId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"functions":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"workflowId":{"type":"string","format":"uuid"},"kind":{"type":"string","enum":["read","action"]}},"required":["name","workflowId","kind"],"additionalProperties":false}},"previewResults":{"type":"object","additionalProperties":{}}},"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"output":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"orgId":{"type":"string"},"name":{"type":"string","minLength":1},"description":{"type":"string"},"source":{"type":"string","minLength":1},"customCss":{"type":"string"},"display":{"type":"string","enum":["inline","stage"]},"ctaSource":{"type":"string"},"stageTitle":{"type":"string"},"propsSchema":{"type":"object","properties":{"type":{"type":"string","const":"object"},"description":{"type":"string"},"properties":{"type":"object","additionalProperties":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"string"},"description":{"type":"string"},"enum":{"type":"array","items":{"type":"string"}}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"number"},"description":{"type":"string"},"enum":{"type":"array","items":{"type":"number"}}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"boolean"},"description":{"type":"string"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"object"},"description":{"type":"string"},"properties":{"type":"object","additionalProperties":{"$ref":"#/properties/data/properties/propsSchema/properties/properties/additionalProperties"}},"required":{"type":"array","items":{"type":"string"}}},"required":["type","properties"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"array"},"description":{"type":"string"},"items":{"$ref":"#/properties/data/properties/propsSchema/properties/properties/additionalProperties"}},"required":["type","items"],"additionalProperties":false}]}},"required":{"type":"array","items":{"type":"string"}}},"required":["type","properties"],"additionalProperties":false},"previewProps":{"type":"object","additionalProperties":{}},"mode":{"type":"string","enum":["props","workflow"]},"dataWorkflowId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"functions":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"workflowId":{"type":"string","format":"uuid"},"kind":{"type":"string","enum":["read","action"]}},"required":["name","workflowId","kind"],"additionalProperties":false}},"previewResults":{"type":"object","additionalProperties":{}},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","orgId","name","description","source","customCss","display","ctaSource","stageTitle","propsSchema","previewProps","mode","dataWorkflowId","functions","previewResults","createdAt","updatedAt"],"additionalProperties":false},"localErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["data","localErrors"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}},"bookingCalendar":{"entity:create":{"input":{"type":"object","properties":{"name":{"type":"string","minLength":1},"slug":{"type":"string","pattern":"^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$"},"hostConnectionId":{"type":"string","format":"uuid"},"meetingLengthMinutes":{"type":"integer","minimum":15,"maximum":120,"default":30},"leadTimeMinutes":{"type":"integer","minimum":0,"default":60},"bufferBeforeMinutes":{"type":"integer","minimum":0,"maximum":240,"default":0},"bufferAfterMinutes":{"type":"integer","minimum":0,"maximum":240,"default":0},"workingHours":{"type":"array","items":{"type":"object","properties":{"day":{"type":"integer","minimum":0,"maximum":6},"startMinutes":{"type":"integer","minimum":0,"maximum":1439},"endMinutes":{"type":"integer","minimum":1,"maximum":1440}},"required":["day","startMinutes","endMinutes"],"additionalProperties":false}},"timezone":{"type":"string","minLength":1},"meetingLinkPlatform":{"type":"string","enum":["google_meet","teams","custom"],"default":"google_meet"},"customMeetingUrl":{"type":"string","format":"uri"}},"required":["name","slug","hostConnectionId","workingHours","timezone"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"output":{"type":"object","properties":{"entityId":{"type":"string"},"localErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["entityId","localErrors"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}},"entity:get":{"input":{"type":"object","properties":{"op":{"type":"string","const":"entity:get"},"sessionId":{"type":"string"},"entityType":{"type":"string","enum":["chatbot","page","conversionRule","cardDefinition","bookingCalendar","connector","testCase","wikiPage","wikiFolder"]},"entityId":{"type":"string"},"params":{"type":"object","additionalProperties":{}}},"required":["op","entityType"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"output":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"orgId":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"slug":{"type":"string","minLength":1,"pattern":"^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$"},"hostConnectionId":{"type":"string","format":"uuid"},"hostConfig":{"anyOf":[{"type":"object","properties":{"provider":{"type":"string","const":"google-calendar"},"calendarId":{"type":"string","minLength":1}},"required":["provider","calendarId"],"additionalProperties":false},{"type":"object","properties":{"provider":{"type":"string","const":"outlook-calendar"},"mailbox":{"type":"string","format":"email"},"supportsTeams":{"type":"boolean"}},"required":["provider","mailbox","supportsTeams"],"additionalProperties":false}]},"meetingLengthMinutes":{"type":"integer","minimum":15,"maximum":120},"leadTimeMinutes":{"type":"integer","minimum":0},"bufferBeforeMinutes":{"type":"integer","minimum":0,"maximum":240},"bufferAfterMinutes":{"type":"integer","minimum":0,"maximum":240},"workingHours":{"type":"array","items":{"type":"object","properties":{"day":{"type":"integer","minimum":0,"maximum":6},"startMinutes":{"type":"integer","minimum":0,"maximum":1439},"endMinutes":{"type":"integer","minimum":1,"maximum":1440}},"required":["day","startMinutes","endMinutes"],"additionalProperties":false}},"timezone":{"type":"string","minLength":1},"meetingLinkPlatform":{"type":"string","enum":["google_meet","teams","custom"]},"customMeetingUrl":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","orgId","name","slug","hostConnectionId","hostConfig","meetingLengthMinutes","leadTimeMinutes","bufferBeforeMinutes","bufferAfterMinutes","workingHours","timezone","meetingLinkPlatform","customMeetingUrl","createdAt","updatedAt"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}},"entity:list":{"input":{"type":"object","properties":{},"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"output":{"type":"object","properties":{"entities":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"orgId":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"slug":{"type":"string","minLength":1,"pattern":"^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$"},"hostConnectionId":{"type":"string","format":"uuid"},"hostConfig":{"anyOf":[{"type":"object","properties":{"provider":{"type":"string","const":"google-calendar"},"calendarId":{"type":"string","minLength":1}},"required":["provider","calendarId"],"additionalProperties":false},{"type":"object","properties":{"provider":{"type":"string","const":"outlook-calendar"},"mailbox":{"type":"string","format":"email"},"supportsTeams":{"type":"boolean"}},"required":["provider","mailbox","supportsTeams"],"additionalProperties":false}]},"meetingLengthMinutes":{"type":"integer","minimum":15,"maximum":120},"leadTimeMinutes":{"type":"integer","minimum":0},"bufferBeforeMinutes":{"type":"integer","minimum":0,"maximum":240},"bufferAfterMinutes":{"type":"integer","minimum":0,"maximum":240},"workingHours":{"type":"array","items":{"type":"object","properties":{"day":{"type":"integer","minimum":0,"maximum":6},"startMinutes":{"type":"integer","minimum":0,"maximum":1439},"endMinutes":{"type":"integer","minimum":1,"maximum":1440}},"required":["day","startMinutes","endMinutes"],"additionalProperties":false}},"timezone":{"type":"string","minLength":1},"meetingLinkPlatform":{"type":"string","enum":["google_meet","teams","custom"]},"customMeetingUrl":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","orgId","name","slug","hostConnectionId","hostConfig","meetingLengthMinutes","leadTimeMinutes","bufferBeforeMinutes","bufferAfterMinutes","workingHours","timezone","meetingLinkPlatform","customMeetingUrl","createdAt","updatedAt"],"additionalProperties":false}}},"required":["entities"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}},"entity:update":{"input":{"type":"object","properties":{"name":{"type":"string","minLength":1},"slug":{"type":"string","pattern":"^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$"},"hostConnectionId":{"type":"string","format":"uuid"},"meetingLengthMinutes":{"type":"integer","minimum":15,"maximum":120},"leadTimeMinutes":{"type":"integer","minimum":0},"bufferBeforeMinutes":{"type":"integer","minimum":0,"maximum":240},"bufferAfterMinutes":{"type":"integer","minimum":0,"maximum":240},"workingHours":{"type":"array","items":{"type":"object","properties":{"day":{"type":"integer","minimum":0,"maximum":6},"startMinutes":{"type":"integer","minimum":0,"maximum":1439},"endMinutes":{"type":"integer","minimum":1,"maximum":1440}},"required":["day","startMinutes","endMinutes"],"additionalProperties":false}},"timezone":{"type":"string","minLength":1},"meetingLinkPlatform":{"type":"string","enum":["google_meet","teams","custom"]},"customMeetingUrl":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]}},"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"output":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"orgId":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"slug":{"type":"string","minLength":1,"pattern":"^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$"},"hostConnectionId":{"type":"string","format":"uuid"},"hostConfig":{"anyOf":[{"type":"object","properties":{"provider":{"type":"string","const":"google-calendar"},"calendarId":{"type":"string","minLength":1}},"required":["provider","calendarId"],"additionalProperties":false},{"type":"object","properties":{"provider":{"type":"string","const":"outlook-calendar"},"mailbox":{"type":"string","format":"email"},"supportsTeams":{"type":"boolean"}},"required":["provider","mailbox","supportsTeams"],"additionalProperties":false}]},"meetingLengthMinutes":{"type":"integer","minimum":15,"maximum":120},"leadTimeMinutes":{"type":"integer","minimum":0},"bufferBeforeMinutes":{"type":"integer","minimum":0,"maximum":240},"bufferAfterMinutes":{"type":"integer","minimum":0,"maximum":240},"workingHours":{"type":"array","items":{"type":"object","properties":{"day":{"type":"integer","minimum":0,"maximum":6},"startMinutes":{"type":"integer","minimum":0,"maximum":1439},"endMinutes":{"type":"integer","minimum":1,"maximum":1440}},"required":["day","startMinutes","endMinutes"],"additionalProperties":false}},"timezone":{"type":"string","minLength":1},"meetingLinkPlatform":{"type":"string","enum":["google_meet","teams","custom"]},"customMeetingUrl":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","orgId","name","slug","hostConnectionId","hostConfig","meetingLengthMinutes","leadTimeMinutes","bufferBeforeMinutes","bufferAfterMinutes","workingHours","timezone","meetingLinkPlatform","customMeetingUrl","createdAt","updatedAt"],"additionalProperties":false},"localErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["data","localErrors"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}},"connector":{"entity:create":{"input":{"type":"object","properties":{"name":{"type":"string","minLength":1},"description":{"type":"string"},"domain":{"type":"string","minLength":1,"description":"The website the recipe is allowed to run on, as a bare domain (e.g. \"shop.acme.com\")."},"kind":{"type":"string","enum":["read","action"],"description":"What a run does to the world. \"read\" (the default) fetches or inspects something and may be run again when the visitor's page changes mid-call; \"action\" changes something (places an order, submits a form) and is never repeated by the platform — an interrupted action fails and the chatbot decides."},"spec":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"http"},"method":{"type":"string","enum":["GET","POST","PUT","PATCH","DELETE"]},"urlTemplate":{"type":"string"},"headers":{"type":"object","additionalProperties":{"type":"string"}},"body":{"type":["string","null"]}},"required":["type","method","urlTemplate","headers","body"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"script"},"code":{"type":"string"}},"required":["type","code"],"additionalProperties":false}]},"inputSchema":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"string"},"description":{"type":"string"},"enum":{"type":"array","items":{"type":"string"}},"default":{"type":"string"},"nullable":{"type":"boolean"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"number"},"description":{"type":"string"},"enum":{"type":"array","items":{"type":"number"}},"default":{"type":"number"},"nullable":{"$ref":"#/properties/inputSchema/anyOf/0/properties/nullable"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"boolean"},"description":{"type":"string"},"default":{"type":"boolean"},"nullable":{"$ref":"#/properties/inputSchema/anyOf/0/properties/nullable"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"object"},"description":{"type":"string"},"properties":{"type":"object","additionalProperties":{"$ref":"#/properties/inputSchema"}},"required":{"type":"array","items":{"type":"string"}},"nullable":{"$ref":"#/properties/inputSchema/anyOf/0/properties/nullable"}},"required":["type","properties"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"array"},"description":{"type":"string"},"items":{"$ref":"#/properties/inputSchema"},"maxItems":{"type":"integer"},"nullable":{"$ref":"#/properties/inputSchema/anyOf/0/properties/nullable"}},"required":["type","items"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"any"},"description":{"type":"string"},"nullable":{"$ref":"#/properties/inputSchema/anyOf/0/properties/nullable"}},"required":["type"],"additionalProperties":false}]},"outputSchema":{"$ref":"#/properties/inputSchema"}},"required":["name","domain","spec"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"output":{"type":"object","properties":{"entityId":{"type":"string"},"localErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["entityId","localErrors"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}},"entity:get":{"input":{"type":"object","properties":{"op":{"type":"string","const":"entity:get"},"sessionId":{"type":"string"},"entityType":{"type":"string","enum":["chatbot","page","conversionRule","cardDefinition","bookingCalendar","connector","testCase","wikiPage","wikiFolder"]},"entityId":{"type":"string"},"params":{"type":"object","additionalProperties":{}}},"required":["op","entityType"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"output":{"type":"object","properties":{"id":{"type":"string"},"orgId":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"domain":{"type":"string"},"kind":{"type":"string","enum":["read","action"]},"spec":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"http"},"method":{"type":"string","enum":["GET","POST","PUT","PATCH","DELETE"]},"urlTemplate":{"type":"string"},"headers":{"type":"object","additionalProperties":{"type":"string"}},"body":{"type":["string","null"]}},"required":["type","method","urlTemplate","headers","body"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"script"},"code":{"type":"string"}},"required":["type","code"],"additionalProperties":false}]},"inputSchema":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"string"},"description":{"type":"string"},"enum":{"type":"array","items":{"type":"string"}},"default":{"type":"string"},"nullable":{"type":"boolean"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"number"},"description":{"type":"string"},"enum":{"type":"array","items":{"type":"number"}},"default":{"type":"number"},"nullable":{"$ref":"#/properties/inputSchema/anyOf/0/properties/nullable"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"boolean"},"description":{"type":"string"},"default":{"type":"boolean"},"nullable":{"$ref":"#/properties/inputSchema/anyOf/0/properties/nullable"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"object"},"description":{"type":"string"},"properties":{"type":"object","additionalProperties":{"$ref":"#/properties/inputSchema"}},"required":{"type":"array","items":{"type":"string"}},"nullable":{"$ref":"#/properties/inputSchema/anyOf/0/properties/nullable"}},"required":["type","properties"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"array"},"description":{"type":"string"},"items":{"$ref":"#/properties/inputSchema"},"maxItems":{"type":"integer"},"nullable":{"$ref":"#/properties/inputSchema/anyOf/0/properties/nullable"}},"required":["type","items"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"any"},"description":{"type":"string"},"nullable":{"$ref":"#/properties/inputSchema/anyOf/0/properties/nullable"}},"required":["type"],"additionalProperties":false}]},"outputSchema":{"$ref":"#/properties/inputSchema"},"createdAt":{"type":"string","format":"date-time"},"complete":{"type":"boolean","description":"Configured enough to run (http: has a URL; script: has code; both: has a valid domain). A blank connector saves as a valid draft but fails at call time until completed."}},"required":["id","orgId","name","description","domain","kind","spec","inputSchema","outputSchema","createdAt","complete"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}},"entity:list":{"input":{"anyOf":[{"not":{}},{"type":"object","properties":{},"additionalProperties":false}],"$schema":"http://json-schema.org/draft-07/schema#"},"output":{"type":"object","properties":{"entities":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"orgId":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"domain":{"type":"string"},"kind":{"type":"string","enum":["read","action"]},"spec":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"http"},"method":{"type":"string","enum":["GET","POST","PUT","PATCH","DELETE"]},"urlTemplate":{"type":"string"},"headers":{"type":"object","additionalProperties":{"type":"string"}},"body":{"type":["string","null"]}},"required":["type","method","urlTemplate","headers","body"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"script"},"code":{"type":"string"}},"required":["type","code"],"additionalProperties":false}]},"inputSchema":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"string"},"description":{"type":"string"},"enum":{"type":"array","items":{"type":"string"}},"default":{"type":"string"},"nullable":{"type":"boolean"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"number"},"description":{"type":"string"},"enum":{"type":"array","items":{"type":"number"}},"default":{"type":"number"},"nullable":{"$ref":"#/properties/entities/items/properties/inputSchema/anyOf/0/properties/nullable"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"boolean"},"description":{"type":"string"},"default":{"type":"boolean"},"nullable":{"$ref":"#/properties/entities/items/properties/inputSchema/anyOf/0/properties/nullable"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"object"},"description":{"type":"string"},"properties":{"type":"object","additionalProperties":{"$ref":"#/properties/entities/items/properties/inputSchema"}},"required":{"type":"array","items":{"type":"string"}},"nullable":{"$ref":"#/properties/entities/items/properties/inputSchema/anyOf/0/properties/nullable"}},"required":["type","properties"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"array"},"description":{"type":"string"},"items":{"$ref":"#/properties/entities/items/properties/inputSchema"},"maxItems":{"type":"integer"},"nullable":{"$ref":"#/properties/entities/items/properties/inputSchema/anyOf/0/properties/nullable"}},"required":["type","items"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"any"},"description":{"type":"string"},"nullable":{"$ref":"#/properties/entities/items/properties/inputSchema/anyOf/0/properties/nullable"}},"required":["type"],"additionalProperties":false}]},"outputSchema":{"$ref":"#/properties/entities/items/properties/inputSchema"},"createdAt":{"type":"string","format":"date-time"},"complete":{"type":"boolean","description":"Configured enough to run (http: has a URL; script: has code; both: has a valid domain). A blank connector saves as a valid draft but fails at call time until completed."}},"required":["id","orgId","name","description","domain","kind","spec","inputSchema","outputSchema","createdAt","complete"],"additionalProperties":false}}},"required":["entities"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}},"entity:update":{"input":{"type":"object","properties":{"name":{"type":"string","minLength":1},"description":{"type":"string"},"domain":{"type":"string","minLength":1},"kind":{"type":"string","enum":["read","action"],"description":"What a run does to the world. \"read\" (the default) fetches or inspects something and may be run again when the visitor's page changes mid-call; \"action\" changes something (places an order, submits a form) and is never repeated by the platform — an interrupted action fails and the chatbot decides."},"spec":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"http"},"method":{"type":"string","enum":["GET","POST","PUT","PATCH","DELETE"]},"urlTemplate":{"type":"string"},"headers":{"type":"object","additionalProperties":{"type":"string"}},"body":{"type":["string","null"]}},"required":["type","method","urlTemplate","headers","body"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"script"},"code":{"type":"string"}},"required":["type","code"],"additionalProperties":false}]},"inputSchema":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"string"},"description":{"type":"string"},"enum":{"type":"array","items":{"type":"string"}},"default":{"type":"string"},"nullable":{"type":"boolean"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"number"},"description":{"type":"string"},"enum":{"type":"array","items":{"type":"number"}},"default":{"type":"number"},"nullable":{"$ref":"#/properties/inputSchema/anyOf/0/properties/nullable"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"boolean"},"description":{"type":"string"},"default":{"type":"boolean"},"nullable":{"$ref":"#/properties/inputSchema/anyOf/0/properties/nullable"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"object"},"description":{"type":"string"},"properties":{"type":"object","additionalProperties":{"$ref":"#/properties/inputSchema"}},"required":{"type":"array","items":{"type":"string"}},"nullable":{"$ref":"#/properties/inputSchema/anyOf/0/properties/nullable"}},"required":["type","properties"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"array"},"description":{"type":"string"},"items":{"$ref":"#/properties/inputSchema"},"maxItems":{"type":"integer"},"nullable":{"$ref":"#/properties/inputSchema/anyOf/0/properties/nullable"}},"required":["type","items"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"any"},"description":{"type":"string"},"nullable":{"$ref":"#/properties/inputSchema/anyOf/0/properties/nullable"}},"required":["type"],"additionalProperties":false}]},"outputSchema":{"$ref":"#/properties/inputSchema"}},"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"output":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"orgId":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"domain":{"type":"string"},"kind":{"type":"string","enum":["read","action"]},"spec":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"http"},"method":{"type":"string","enum":["GET","POST","PUT","PATCH","DELETE"]},"urlTemplate":{"type":"string"},"headers":{"type":"object","additionalProperties":{"type":"string"}},"body":{"type":["string","null"]}},"required":["type","method","urlTemplate","headers","body"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"script"},"code":{"type":"string"}},"required":["type","code"],"additionalProperties":false}]},"inputSchema":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"string"},"description":{"type":"string"},"enum":{"type":"array","items":{"type":"string"}},"default":{"type":"string"},"nullable":{"type":"boolean"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"number"},"description":{"type":"string"},"enum":{"type":"array","items":{"type":"number"}},"default":{"type":"number"},"nullable":{"$ref":"#/properties/data/properties/inputSchema/anyOf/0/properties/nullable"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"boolean"},"description":{"type":"string"},"default":{"type":"boolean"},"nullable":{"$ref":"#/properties/data/properties/inputSchema/anyOf/0/properties/nullable"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"object"},"description":{"type":"string"},"properties":{"type":"object","additionalProperties":{"$ref":"#/properties/data/properties/inputSchema"}},"required":{"type":"array","items":{"type":"string"}},"nullable":{"$ref":"#/properties/data/properties/inputSchema/anyOf/0/properties/nullable"}},"required":["type","properties"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"array"},"description":{"type":"string"},"items":{"$ref":"#/properties/data/properties/inputSchema"},"maxItems":{"type":"integer"},"nullable":{"$ref":"#/properties/data/properties/inputSchema/anyOf/0/properties/nullable"}},"required":["type","items"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"any"},"description":{"type":"string"},"nullable":{"$ref":"#/properties/data/properties/inputSchema/anyOf/0/properties/nullable"}},"required":["type"],"additionalProperties":false}]},"outputSchema":{"$ref":"#/properties/data/properties/inputSchema"},"createdAt":{"type":"string","format":"date-time"},"complete":{"type":"boolean","description":"Configured enough to run (http: has a URL; script: has code; both: has a valid domain). A blank connector saves as a valid draft but fails at call time until completed."}},"required":["id","orgId","name","description","domain","kind","spec","inputSchema","outputSchema","createdAt","complete"],"additionalProperties":false},"localErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["data","localErrors"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}},"testCase":{"entity:create":{"input":{"type":"object","properties":{"name":{"type":"string","minLength":1},"tags":{"type":"array","items":{"type":"string","minLength":1},"maxItems":20,"default":[]},"kind":{"type":"string","enum":["chatbot_conversation"]},"targetId":{"type":"string","format":"uuid"},"config":{"type":"object","properties":{"turns":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"should":{"type":["string","null"]},"checks":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"key":{"type":"string","minLength":1},"kind":{"type":"string","const":"workflow_tool"},"workflowId":{"type":"string","format":"uuid"},"times":{"type":"string","enum":["once","never","at_least_once"]},"where":{"anyOf":[{"type":"object","properties":{"path":{"type":"string","minLength":1},"op":{"type":"string","enum":["equals","contains","exists"]},"value":{}},"required":["path","op"],"additionalProperties":false},{"type":"null"}]}},"required":["kind","workflowId","times"],"additionalProperties":false},{"type":"object","properties":{"key":{"type":"string","minLength":1},"kind":{"type":"string","const":"builtin_tool"},"tool":{"type":"string","enum":["getPageContent","handoverToHuman","requestImageUpload","viewImage","showResponseButtons","setConversationLanguage","updateWorkingMemory","switchGoal","closeConversation","getTimeInTimezone","listPreviousThreads","getThreadTranscript"]},"times":{"$ref":"#/properties/config/properties/turns/items/properties/checks/items/anyOf/0/properties/times"},"where":{"$ref":"#/properties/config/properties/turns/items/properties/checks/items/anyOf/0/properties/where"}},"required":["kind","tool","times"],"additionalProperties":false},{"type":"object","properties":{"key":{"type":"string","minLength":1},"kind":{"type":"string","const":"text"},"mode":{"type":"string","enum":["contains","not_contains","regex"]},"value":{"type":"string","minLength":1}},"required":["kind","mode","value"],"additionalProperties":false}]},"default":[]}},"required":["message"],"additionalProperties":false},"minItems":1,"maxItems":30},"rubric":{"type":["string","null"]}},"required":["turns"],"additionalProperties":false}},"required":["name","kind","targetId","config"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"output":{"type":"object","properties":{"entityId":{"type":"string"},"localErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["entityId","localErrors"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}},"entity:get":{"input":{"type":"object","properties":{"op":{"type":"string","const":"entity:get"},"sessionId":{"type":"string"},"entityType":{"type":"string","enum":["chatbot","page","conversionRule","cardDefinition","bookingCalendar","connector","testCase","wikiPage","wikiFolder"]},"entityId":{"type":"string"},"params":{"type":"object","additionalProperties":{}}},"required":["op","entityType"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"output":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"orgId":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"tags":{"type":"array","items":{"type":"string","minLength":1},"maxItems":20},"targetId":{"type":"string","format":"uuid"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"kind":{"type":"string","const":"chatbot_conversation"},"config":{"type":"object","properties":{"turns":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"should":{"type":["string","null"]},"checks":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"key":{"type":"string","minLength":1},"kind":{"type":"string","const":"workflow_tool"},"workflowId":{"type":"string","format":"uuid"},"times":{"type":"string","enum":["once","never","at_least_once"]},"where":{"anyOf":[{"type":"object","properties":{"path":{"type":"string","minLength":1},"op":{"type":"string","enum":["equals","contains","exists"]},"value":{}},"required":["path","op"],"additionalProperties":false},{"type":"null"}]}},"required":["key","kind","workflowId","times","where"],"additionalProperties":false},{"type":"object","properties":{"key":{"$ref":"#/anyOf/0/properties/config/properties/turns/items/properties/checks/items/anyOf/0/properties/key"},"kind":{"type":"string","const":"builtin_tool"},"tool":{"type":"string","enum":["getPageContent","handoverToHuman","requestImageUpload","viewImage","showResponseButtons","setConversationLanguage","updateWorkingMemory","switchGoal","closeConversation","getTimeInTimezone","listPreviousThreads","getThreadTranscript"]},"times":{"$ref":"#/anyOf/0/properties/config/properties/turns/items/properties/checks/items/anyOf/0/properties/times"},"where":{"anyOf":[{"$ref":"#/anyOf/0/properties/config/properties/turns/items/properties/checks/items/anyOf/0/properties/where/anyOf/0"},{"type":"null"}]}},"required":["key","kind","tool","times","where"],"additionalProperties":false},{"type":"object","properties":{"key":{"$ref":"#/anyOf/0/properties/config/properties/turns/items/properties/checks/items/anyOf/0/properties/key"},"kind":{"type":"string","const":"text"},"mode":{"type":"string","enum":["contains","not_contains","regex"]},"value":{"type":"string","minLength":1}},"required":["key","kind","mode","value"],"additionalProperties":false}]}}},"required":["key","message","should","checks"],"additionalProperties":false},"minItems":1,"maxItems":30},"rubric":{"type":["string","null"]}},"required":["turns","rubric"],"additionalProperties":false}},"required":["id","orgId","name","tags","targetId","createdAt","updatedAt","kind","config"],"additionalProperties":false}],"$schema":"http://json-schema.org/draft-07/schema#"}},"entity:list":{"input":{"type":"object","properties":{"targetId":{"type":"string","format":"uuid"}},"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"output":{"type":"object","properties":{"entities":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"orgId":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"tags":{"type":"array","items":{"type":"string","minLength":1},"maxItems":20},"targetId":{"type":"string","format":"uuid"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"kind":{"type":"string","const":"chatbot_conversation"},"config":{"type":"object","properties":{"turns":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"should":{"type":["string","null"]},"checks":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"key":{"type":"string","minLength":1},"kind":{"type":"string","const":"workflow_tool"},"workflowId":{"type":"string","format":"uuid"},"times":{"type":"string","enum":["once","never","at_least_once"]},"where":{"anyOf":[{"type":"object","properties":{"path":{"type":"string","minLength":1},"op":{"type":"string","enum":["equals","contains","exists"]},"value":{}},"required":["path","op"],"additionalProperties":false},{"type":"null"}]}},"required":["key","kind","workflowId","times","where"],"additionalProperties":false},{"type":"object","properties":{"key":{"$ref":"#/properties/entities/items/anyOf/0/properties/config/properties/turns/items/properties/checks/items/anyOf/0/properties/key"},"kind":{"type":"string","const":"builtin_tool"},"tool":{"type":"string","enum":["getPageContent","handoverToHuman","requestImageUpload","viewImage","showResponseButtons","setConversationLanguage","updateWorkingMemory","switchGoal","closeConversation","getTimeInTimezone","listPreviousThreads","getThreadTranscript"]},"times":{"$ref":"#/properties/entities/items/anyOf/0/properties/config/properties/turns/items/properties/checks/items/anyOf/0/properties/times"},"where":{"anyOf":[{"$ref":"#/properties/entities/items/anyOf/0/properties/config/properties/turns/items/properties/checks/items/anyOf/0/properties/where/anyOf/0"},{"type":"null"}]}},"required":["key","kind","tool","times","where"],"additionalProperties":false},{"type":"object","properties":{"key":{"$ref":"#/properties/entities/items/anyOf/0/properties/config/properties/turns/items/properties/checks/items/anyOf/0/properties/key"},"kind":{"type":"string","const":"text"},"mode":{"type":"string","enum":["contains","not_contains","regex"]},"value":{"type":"string","minLength":1}},"required":["key","kind","mode","value"],"additionalProperties":false}]}}},"required":["key","message","should","checks"],"additionalProperties":false},"minItems":1,"maxItems":30},"rubric":{"type":["string","null"]}},"required":["turns","rubric"],"additionalProperties":false}},"required":["id","orgId","name","tags","targetId","createdAt","updatedAt","kind","config"],"additionalProperties":false}]}}},"required":["entities"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}},"entity:update":{"input":{"type":"object","properties":{"name":{"type":"string","minLength":1},"tags":{"type":"array","items":{"type":"string","minLength":1},"maxItems":20},"targetId":{"type":"string","format":"uuid"},"config":{"type":"object","properties":{"turns":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"should":{"type":["string","null"]},"checks":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"key":{"type":"string","minLength":1},"kind":{"type":"string","const":"workflow_tool"},"workflowId":{"type":"string","format":"uuid"},"times":{"type":"string","enum":["once","never","at_least_once"]},"where":{"anyOf":[{"type":"object","properties":{"path":{"type":"string","minLength":1},"op":{"type":"string","enum":["equals","contains","exists"]},"value":{}},"required":["path","op"],"additionalProperties":false},{"type":"null"}]}},"required":["kind","workflowId","times"],"additionalProperties":false},{"type":"object","properties":{"key":{"type":"string","minLength":1},"kind":{"type":"string","const":"builtin_tool"},"tool":{"type":"string","enum":["getPageContent","handoverToHuman","requestImageUpload","viewImage","showResponseButtons","setConversationLanguage","updateWorkingMemory","switchGoal","closeConversation","getTimeInTimezone","listPreviousThreads","getThreadTranscript"]},"times":{"$ref":"#/properties/config/properties/turns/items/properties/checks/items/anyOf/0/properties/times"},"where":{"$ref":"#/properties/config/properties/turns/items/properties/checks/items/anyOf/0/properties/where"}},"required":["kind","tool","times"],"additionalProperties":false},{"type":"object","properties":{"key":{"type":"string","minLength":1},"kind":{"type":"string","const":"text"},"mode":{"type":"string","enum":["contains","not_contains","regex"]},"value":{"type":"string","minLength":1}},"required":["kind","mode","value"],"additionalProperties":false}]},"default":[]}},"required":["message"],"additionalProperties":false},"minItems":1,"maxItems":30},"rubric":{"type":["string","null"]}},"required":["turns"],"additionalProperties":false}},"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"output":{"type":"object","properties":{"data":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"orgId":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"tags":{"type":"array","items":{"type":"string","minLength":1},"maxItems":20},"targetId":{"type":"string","format":"uuid"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"kind":{"type":"string","const":"chatbot_conversation"},"config":{"type":"object","properties":{"turns":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"should":{"type":["string","null"]},"checks":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"key":{"type":"string","minLength":1},"kind":{"type":"string","const":"workflow_tool"},"workflowId":{"type":"string","format":"uuid"},"times":{"type":"string","enum":["once","never","at_least_once"]},"where":{"anyOf":[{"type":"object","properties":{"path":{"type":"string","minLength":1},"op":{"type":"string","enum":["equals","contains","exists"]},"value":{}},"required":["path","op"],"additionalProperties":false},{"type":"null"}]}},"required":["key","kind","workflowId","times","where"],"additionalProperties":false},{"type":"object","properties":{"key":{"$ref":"#/properties/data/anyOf/0/properties/config/properties/turns/items/properties/checks/items/anyOf/0/properties/key"},"kind":{"type":"string","const":"builtin_tool"},"tool":{"type":"string","enum":["getPageContent","handoverToHuman","requestImageUpload","viewImage","showResponseButtons","setConversationLanguage","updateWorkingMemory","switchGoal","closeConversation","getTimeInTimezone","listPreviousThreads","getThreadTranscript"]},"times":{"$ref":"#/properties/data/anyOf/0/properties/config/properties/turns/items/properties/checks/items/anyOf/0/properties/times"},"where":{"anyOf":[{"$ref":"#/properties/data/anyOf/0/properties/config/properties/turns/items/properties/checks/items/anyOf/0/properties/where/anyOf/0"},{"type":"null"}]}},"required":["key","kind","tool","times","where"],"additionalProperties":false},{"type":"object","properties":{"key":{"$ref":"#/properties/data/anyOf/0/properties/config/properties/turns/items/properties/checks/items/anyOf/0/properties/key"},"kind":{"type":"string","const":"text"},"mode":{"type":"string","enum":["contains","not_contains","regex"]},"value":{"type":"string","minLength":1}},"required":["key","kind","mode","value"],"additionalProperties":false}]}}},"required":["key","message","should","checks"],"additionalProperties":false},"minItems":1,"maxItems":30},"rubric":{"type":["string","null"]}},"required":["turns","rubric"],"additionalProperties":false}},"required":["id","orgId","name","tags","targetId","createdAt","updatedAt","kind","config"],"additionalProperties":false}]},"localErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["data","localErrors"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}},"wikiPage":{"entity:create":{"input":{"type":"object","properties":{"title":{"type":"string","minLength":1},"content":{"type":"string","minLength":1},"folderId":{"type":"string","format":"uuid","description":"entityId of the folder the page belongs to (from the folder's create result or entity:list wikiFolder); the folder must exist by session save"},"slug":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[a-z0-9][a-z0-9-]*$"},"summary":{"type":"string"},"keywords":{"type":"array","items":{"type":"string"}}},"required":["title","content","folderId"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"output":{"type":"object","properties":{"entityId":{"type":"string"},"localErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["entityId","localErrors"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}},"entity:get":{"input":{"type":"object","properties":{"path":{"type":"string","minLength":3,"maxLength":400,"pattern":"^[a-z0-9][a-z0-9-]*\\/[a-z0-9][a-z0-9-]*$"}},"required":["path"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"output":{"type":"object","additionalProperties":{},"$schema":"http://json-schema.org/draft-07/schema#"}},"entity:list":{"input":{"type":"object","properties":{"folder":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[a-z0-9][a-z0-9-]*$"}},"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"output":{"type":"object","properties":{"entities":{"type":"array","items":{"type":"object","additionalProperties":{}}}},"required":["entities"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}},"entity:update":{"input":{"type":"object","properties":{"title":{"type":"string","minLength":1},"content":{"type":"string","minLength":1},"folderId":{"type":"string","format":"uuid","description":"Move the page to this folder (by the folder's entityId)"},"slug":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[a-z0-9][a-z0-9-]*$"},"summary":{"type":"string"},"keywords":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"output":{"type":"object","properties":{"diff":{"type":"array","items":{"type":"object","properties":{"path":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"key"},"key":{"type":"string"}},"required":["kind","key"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"member"},"key":{"type":"string"}},"required":["kind","key"],"additionalProperties":false}]}},"op":{"type":"string","enum":["add","remove","replace","move"]},"before":{},"after":{},"fromIndex":{"type":"integer"},"toIndex":{"type":"integer"}},"required":["path","op"],"additionalProperties":false}},"localErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}},"cascaded":{"type":"array","items":{"type":"object","properties":{"entityType":{"type":"string","enum":["chatbot","page","conversionRule","cardDefinition","bookingCalendar","connector","testCase","wikiPage","wikiFolder"]},"entityId":{"type":"string"}},"required":["entityType","entityId"],"additionalProperties":false},"description":"Other entities this update also changed via cascade (e.g. pages whose wiki: links a rename rewrote); fetch with entity:get"}},"required":["diff","localErrors"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}},"wikiFolder":{"entity:create":{"input":{"type":"object","properties":{"name":{"type":"string","minLength":1},"slug":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[a-z0-9][a-z0-9-]*$"},"description":{"type":"string"}},"required":["name"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"output":{"type":"object","properties":{"entityId":{"type":"string"},"localErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["entityId","localErrors"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}},"entity:get":{"input":{"type":"object","properties":{"slug":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[a-z0-9][a-z0-9-]*$"}},"required":["slug"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"output":{"type":"object","additionalProperties":{},"$schema":"http://json-schema.org/draft-07/schema#"}},"entity:list":{"input":{"type":"object","properties":{},"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"output":{"type":"object","properties":{"entities":{"type":"array","items":{"type":"object","additionalProperties":{}}}},"required":["entities"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}},"entity:update":{"input":{"type":"object","properties":{"name":{"type":"string","minLength":1},"slug":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[a-z0-9][a-z0-9-]*$"},"description":{"type":"string"}},"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"output":{"type":"object","properties":{"diff":{"type":"array","items":{"type":"object","properties":{"path":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"key"},"key":{"type":"string"}},"required":["kind","key"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"member"},"key":{"type":"string"}},"required":["kind","key"],"additionalProperties":false}]}},"op":{"type":"string","enum":["add","remove","replace","move"]},"before":{},"after":{},"fromIndex":{"type":"integer"},"toIndex":{"type":"integer"}},"required":["path","op"],"additionalProperties":false}},"localErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}},"cascaded":{"type":"array","items":{"type":"object","properties":{"entityType":{"type":"string","enum":["chatbot","page","conversionRule","cardDefinition","bookingCalendar","connector","testCase","wikiPage","wikiFolder"]},"entityId":{"type":"string"}},"required":["entityType","entityId"],"additionalProperties":false},"description":"Other entities this update also changed via cascade (e.g. pages whose wiki: links a rename rewrote); fetch with entity:get"}},"required":["diff","localErrors"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}}}}