Hydra Core - the workspace's decision flowchart for AI chats
connections_coreUse this when an AI chat starts a task and needs to know how to do it: whether to do it itself or delegate, how big it is, which manager, worker or tool it goes to, and the brief to hand them. One flowchart per workspace, kept in the CrAInium and edited live. action run (default) walks it: send the answers you have (by question id) and facts such as { message }; it answers the next question to answer (status ask) or the outcome with the path taken, the people, the tools and a brief (status done). Most tasks end at the first questions with outcome myself: go do it. action head lists the flowchart's quick exits: the questions a chat answers itself before it acts, and which answers end there, so those need no call. action find lists the CrAInium docs and staff in this workspace that match a query or a message, as addresses to read, never their text. action get returns the flow (format outline for a readable view); edit changes it with ops (add_node, update_node, remove_node, add_edge, update_edge, remove_edge, set) and save replaces the whole graph, both with base_version and a why; revert brings an older version back; history lists versions; log lists recent runs; brief gives a chat back its last delegate brief after a compact; turns stores one ledger row per chat turn from a PC's hook: whether the chat walked the core and whether it delegated. Every version is kept.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | No | revert: the version to bring back. | |
| ops | No | edit: [{ op: 'add_node', node: {id, type, ...} }, { op: 'update_node', id, set: {...} }, { op: 'remove_node', id }, { op: 'add_edge', edge: {from, to, when} }, { op: 'update_edge', id, set }, { op: 'remove_edge', id }, { op: 'set', set: { title, start, notes } }]. Node types: ask (text, answers), check (test: { fact, op, value }), do (say, use), person (name, role, mode consult|hire|lead, brief), end (outcome, say). | |
| why | No | edit/save/revert: what changed and why, kept with the version. | |
| chat | No | run/log/brief: this chat's key, so its runs and brief can be found again. | |
| flow | No | Which flowchart (default main). | |
| kind | No | log: which core_events rows (default run). | |
| rows | No | turns: one row per chat turn, 1 to 200: { uid (the turn's key, 1-80 letters, digits, . _ : or -), chat, at (ISO time), called, delegated, version, pc }. called true means the chat walked the flowchart. | |
| facts | No | run: facts the flowchart's checks read, e.g. { message: '<the request>' }. find: { message } in place of query. | |
| graph | No | save: the whole flowchart { title, start, notes, nodes, edges }. | |
| limit | No | history/log: how many (default 50, at most 500); find: docs to list (default 8, at most 20). | |
| query | No | find: the words to match against the workspace's docs and staff (default facts.message). | |
| action | No | run (default) walks the flowchart; head reads its quick exits; find reads matching docs and staff; get reads it; edit/save/revert change it; history, log, brief and turns read or store the record. | |
| format | No | get: graph (default) or a readable outline. | |
| answers | No | run: answers so far, by question id, e.g. { need: 'no', mid: 'no', who: 'delegate', tier: 3 }. | |
| company | No | The workspace (project id) when this account belongs to more than one. | |
| version | No | get: an older version to read. | |
| folderPath | No | A local folder bound to a workspace; picks that workspace's flowchart. | |
| base_version | No | edit/save/revert: the version you read (0 for a new flowchart). A newer save is answered stale_version. |