Glossary
flow-state.dev is built in layers. A small set of primitives in Core (blocks, flows, sessions, resources) carries everything above it. Orchestration builds task boards out of those primitives, Workforce builds workers, coordinators and projects out of flows, sessions and resources, and Shift Manager is an app that reads what Workforce writes.
Most terms higher up are a lower term with a name and a rule added. A worker is a resource one user owns, naming the flow that runs it. A coordinator is a worker. A project is one resource in a resource collection. The Built from column names the lower terms each one is made of.
Most terms link to their full page.
The layers
A package uses only the layers under it. Workforce imports Core and Orchestration and nothing from Engine: when it needs to register a flow or open a session, your app passes in the function that does it.
Core and Engine: from a block to a running flow
The top row builds left to right: each box is made of the one before it. The Engine row runs what the top row defines. A tool is an ordinary block, and so is a dispatcher.
Contracts and Core
@flow-state-dev/contracts holds the shapes shared by the server and the browser. @flow-state-dev/core re-exports them and adds the builders.
| Term | Package | What it is | Built from |
|---|---|---|---|
| Item | contracts | One typed record a request streams: a message, reasoning, a tool output, a data item, a status, an error, a state or resource change, a suspension, and a few more. See Items. | Content and a visibility setting |
| Block instance id | contracts | The id of one attempt at one step in one run. See Durable execution. | The request id and the step's path |
| Block | core | A typed unit of work with an input schema and an output schema. You define it, and the framework runs it. See Blocks. | Zod schemas and a block context (ctx) |
| Block kind | core | Exactly five: handler (plain code), generator (a model call), evaluator (a model judgment), sequencer (runs blocks in order) and router (picks one block to run). | Block |
| Sequencer | core | A block that composes other blocks in order. See Composition and Sequencer methods. | Blocks and connectors |
| Connector | core | A small function that reshapes a value between two composed blocks. See Sequencer methods. | Block context |
| Side chain | core | A block a sequencer starts without waiting for it. See Sequencer methods. | Sequencer, block |
| Tool | core | A block listed in a generator's tools, so the model can call it. There is no separate tool type. | Block |
| Dispatcher block | core | dispatcher() builds a handler that sends its input to another flow. | Handler |
| Model resolver | core | Turns a model string such as openai/gpt-6-luna into a model a generator can call. See Models. | Configuration |
| Action | core | A named entry point on a flow. It wraps one root block. See Flows and actions. | One block |
| Scope | core | Where state lives and how long it lasts. There are four: request, session, user and org. See State and scopes. | None |
| State | core | Zod-typed data on a scope, or on one block (ctx.self). | Scope |
| Session | core | The scope that keeps many requests to one flow instance together as one record: its state, its history, its items. A chat conversation is one use of it. You open one against a flow instance. | Scope, flow instance |
| Resource | core | Named, typed data, with optional content, kept at session, user or org scope. See Resources. | Scope, state |
| Resource collection | core | A family of resources keyed by a pattern such as files/*, with get, list, create, upsert and delete. See Resources. | Resource |
| Capability | core | A bundle of resources, state schemas, prompt context, tools and helper functions a block or flow pulls in with uses. See Capabilities. | Resources, state, tools, other capabilities |
| Flow | core | defineFlow with a kind. It declares actions, scope state, resources, capabilities, authentication and schedules. See Flows and actions. | Actions, scopes, resources, capabilities |
| Flow instance | core | A flow called with an id and settings: myFlow({ id, config }). Its id is its address. See Flows. | Flow |
| Kit | core | The unit an app installs, made with defineKit. A flow is what the server runs; a kit packages flows for an app to install, and its install returns them. You pass kits to createFlowState({ kits: [...] }) in any order: workforce({ model }) and harnesses({}) are both kits. A kit has no browser half. See Kits and slots. | Flows, slots |
| Slot | core | A typed place a kit declares for other kits to fill. A keyed slot (slot.keyed(schema)) holds entries by key: if two kits give the same key, the app refuses to start and the error names both. A list slot (slot.list(schema)) appends every contribution in install order. An app drops a kit's contribution with kit.without(slot), or one keyed entry with kit.without(slot, key). See Kits. | Kit, a Zod schema |
| Harness block | core | The shape every coding-agent block shares: it takes a prompt and returns a handle with an outcome, a final message, usage and cost. Claude Code, Codex and Cursor each ship one. See Coding harnesses. | Block |
| Suspension | core | A run that stops to wait for a user's approval or answer, then resumes where it stopped. | Item, session |
| Principal | core | The verified caller of a request: a userId and an orgId. See Authentication. | None |
| User | core | The signed-in human making a request, always inside one org. Every action is taken by one user. The framework has no system users: an app can make one, and to the framework it is another user. | Principal |
Engine
@flow-state-dev/engine runs flows. Store adapters (store-sqlite, store-postgres) and host adapters (node, next, vercel) plug into it.
| Term | Package | What it is | Built from |
|---|---|---|---|
| FlowState | engine | What createFlowState returns: the server, holding your flow instances, stores and principal resolver. It serves the HTTP routes. See Serving flows. | Flow instances, stores |
| Flow registry | engine | The instances a FlowState answers for, each at its id. See Runtime. | Flow instance |
| Request | engine | One run of one action on one session. See Sessions, items and streaming and Items. | Action, session, items |
| Stores | engine | Where sessions, requests, state, resources, checkpoints and traces are kept. See Stores. | None |
| Host adapter | node, next, vercel | Serves a FlowState from one kind of host. See Serving flows. | FlowState |
| Durable action | core, engine | An action that writes a checkpoint at each step, so a crashed run can resume. See Durable execution. | Action, block instance id, stores |
| Scheduled action | core, scheduled | An action that runs on a cron schedule. See Schedules. | Action |
Orchestration: a task board
| Term | Package | What it is | Built from |
|---|---|---|---|
| Task | orchestration | One unit of work: a goal, a status, dependencies, an optional assignee, input and output. See Task collections. | None |
| Task collection | orchestration | Where tasks are kept, whichever store backs them. See Task collections. | State, or a resource collection |
| Task board | orchestration | taskBoard(): drains a task collection with a pool of workers, holding back tasks whose dependencies aren't done. See Task board. | Sequencer, task collection, capability |
| Task tools | orchestration | What a model changes a task with: the filer's createTask, getTask, listTasks and updateTask, and the worker's reportProgress. See Task board. | Task, task board |
| Board worker | orchestration | A block that runs one claimed task. | Block |
| Assignee | orchestration | Who a task goes to: one of a task board's workers, or, in Workforce, one of a worker's delegates. See Task board. | Board worker, task |
| Claim order | orchestration | The rule that picks the next ready task, such as fifo or priority. See Task board. | Task collection |
| Dispatch a task | orchestration | Start a task on another worker. See Task board. | Task, wait, dispatcher block |
| Wait | orchestration | What a caller does on a task it filed, or a request it dispatched, when its next step needs the result, with getTask({ id, wait: true }) or dispatcher({ wait: true }). Its turn pauses until the work ends or a deadline passes. The deadline cancels nothing: the task keeps running, and the turn goes on without its result. A board's onIdle: "wait" is a different setting. See Background work. | Dispatch a task |
| Hand-off | orchestration | A session that was doing the work passes it to another session, mid-work. Giving another worker new work isn't a hand-off; it's dispatching a task. | Dispatch a task |
| Goal-seek loop | orchestration | Drains a board, asks a judge whether the goal is met, replans, and drains again. See Goal-seek loop. | Task board, sequencer |
| Flow policy | orchestration | Which earlier tasks' results a worker sees. See Task collections. | Capability |
| Skill | orchestration | A SKILL.md folder a generator loads when needed. See Skills. | Resource collection, capability, tools |
| Harness manager | harness-manager | A board worker that turns one task into one supervised coding run in its own checkout. See Harness runs. | Board worker, sequencer, harness block, resource collection |
| Pattern | patterns | A function that returns a composed block for a common shape. See Patterns. | Sequencer, generators, sometimes a task board |
Smaller packages
The memory, tools and workspace packages sit beside Orchestration on Core and don't use a task board.
| Term | Package | What it is | Built from |
|---|---|---|---|
| Memory tier | memory | One of four layers of memory: working, episodic, semantic and digest. See Memory. | Resource, capability |
tools | tools | The package's ready-made tools for a generator's tools: search, fetch, crawl and createBashTool, plus an MCP capability from @flow-state-dev/tools/mcp. See Tools. | Tool, capability |
| Place | workspace | Wherever an agent actually works, such as a folder on the host or in memory. Files sync between a place and resources. See Workspace. | Resource collection |
Workforce: workers, coordinators, projects
| Term | Package | What it is | Built from |
|---|---|---|---|
| Worker | workforce | What you might call an agent: a configuration with an owner. It names the flow that runs it and carries its own instructions, skills and tools. A worker belongs to one user and acts as them. See Workers. | A resource in the user's scope |
| Worker flow | workforce | The flow a worker runs on. See Workforce. | Flow |
| Standard worker | workforce | A worker every user has, read from the installation's files and the same for everyone. Nothing in the app writes the file. When you edit one, your first edit copies it onto your own roster under the same id. You see your copy, and every other user keeps seeing the file's version. A reset deletes your copy. See Workforce. | Worker, the installation's files |
| Fork | workforce | Copies a standard worker, or one of your own, into a new worker of your own under a new id, starting from its configuration. The copy is on your roster only. | Worker |
| Roster | workforce | The workers one user has, standard ones included. See Workforce. | Workers |
| Address | workforce | A worker's id. See WORKER.md. | None |
| Team | workforce | A group of workers kept in one folder. See The workforce folder. | Workers |
| Org worker | workforce | A standard worker under org/workers/<name>/. It belongs to no team. | Standard worker |
| Hire | workforce | A user adds a worker of their own to their roster. See Workforce. | Worker |
| Fire | workforce | Removes one of a user's own workers from their roster. | Worker |
| Coordinator | workforce | A worker that hands each message to other workers on the same roster, its delegates, by turning each into a task for one of them. See Coordinators and Workforce. | Worker, the coordinator flow |
| Delegate | workforce | A worker on your roster that one of your workers may give work to. Each works in its own session. See WORKER.md. | Worker |
| Delegation | workforce | Giving a task to one of your delegates. A coordinator turns each message into a task for one delegate; other workers with delegates file tasks for them. See Delegating work. | Dispatch a task, roster |
| Door | workforce | respond, the one public action that takes a message to a worker, on every worker flow. | Action |
| Role | workforce | What a worker flow does beside taking a message: contributor takes tasks, manager files tasks for its delegates and runs its board, coordinator routes messages. See Workforce. | Worker flow |
| Inventory | workforce | Org-wide records of every standard worker registered in an organization. See Workforce. | An org resource collection |
| Project | workforce | A body of work, private to you or shared with your org. See Projects. | A resource in a user or org resource collection |
| Workstream | workforce | One area of a shared project, with one owner. See Projects. | A resource, a session |
| Project coordinator | workforce | Your coordinator for one project. It reads every workstream and hands work only to your own. | Coordinator, session |
| Shift Coordinator | workforce | The standard coordinator a user asks who works here, and asks to hire or fire. See Shift Manager. | Standard worker, coordinator |
| Package | workforce | A PACKAGE.md folder of instructions and tools a worker can hold. See The workforce folder. | Tools, instructions |
Shift Manager: screens over a Workforce
Shift Manager is a browser app, published as @flow-state-dev/shift-manager. It stores nothing of its own: every screen is a read of the Lab it serves.
| Term | Where | What it is | Built from |
|---|---|---|---|
| Lab | Shift Manager | The server one fsdev.config.mts default-exports, which Shift Manager serves and reads. | FlowState |
| Shift Coordinator | Shift Manager | The home screen: a summary of what is waiting and running, then your conversation with your Shift Coordinator worker. | Shift Coordinator worker, session |
| Ask | Shift Manager | An approval or a question a worker's run is suspended on, waiting for a user. | Suspension |
| Inbox | Shift Manager | Everything a worker waits on you for, oldest first. It lists pending asks from your sessions and from the runs they started, and one item for each task waiting on questions. See Building an Inbox. | Asks, tasks waiting on questions |
| Tasks | Shift Manager | Every task not done on your boards, grouped by state, worker or workstream. | Task, board |
| Roster | Shift Manager | Your workers, grouped as on shift or off shift. A worker is on shift while it runs a task or waits on you: a pending ask, or a task waiting on your answer to a question. | Roster, tasks, asks |
| General | Shift Manager | The group that lists org workers, the ones on no team. | Org worker |
Words that mean two things
A few words are used in two places. The package tells you which one you're reading.
- Worker. In Workforce, a configuration one user owns. On a task board, a board worker: the block that runs a task. A task's assignee names a board worker or, in Workforce, one of the filing worker's delegates.
- Kind. A block kind is one of the five (
handler,generator,evaluator,sequencer,router). A flow'skindis its name to the engine. - Shift Coordinator. In Workforce, the standard coordinator worker. In Shift Manager, the home screen where you talk to it.
- Package. The Package column names the npm package a term comes from. In Workforce, a package is a
PACKAGE.mdfolder a worker can hold. - Roster. Your Workforce roster is your workers. Shift Manager's Roster screen shows them by what they are doing.