Workflows and usage¶
This page is the big picture: how work moves through Polyglav from a request to a delivered result, and the patterns people build on top. It stays at the level of ideas. For exact commands, see the linked reference pages.
The shape of a run¶
A larger task moves through the same steps every time:
- Ask - the user tells the
assistantwhat they want, in a sentence. Small tasks are answered inline. Bigger ones move on. - Compose - the
composerrole designs a team for the task: which specialists, which skills each one needs, the order of stages, and whether a review loop should run. The team is saved to the catalog and can be reused. - Run - the team runs stage by stage. Each stage is its own sub-agent with its own role, skills, and permission carve, and it writes its own session log. A review loop lets a producer revise against the reviewer's feedback until it passes.
- Continue - as the work changes shape, the next call continues from the previous result. One agent finishes and the assistant calls the next, which continues with its own session intact.
- Watch or pause - follow live state with
/status, inspect the durable tree with/history --tree, or pause the active turn with Ctrl-C. - Remember - after the run, the team and its members refresh their memory, so the next run continues from the change instead of replaying a whole transcript.
- Report - a summary surfaces when the run finishes or fails, and recurring work reports out of band.
Plan and todo bookkeeping¶
Read mode plans and write mode works. For a task that will outlast a single context, the agent can write an internal plan under .polyglav/plans/ and a todo under .polyglav/todos/. The plan holds the user's or caller's instructions, findings, decisions, steps, role and team split, verification, and next. The todo holds the current work. Both are optional and both survive compaction. The plan is injected at every turn and passed to sub-runs and team briefs, and the todo is injected as a compact current-work block. /plan and /todo show the current run, and /plans and /todos list every stored one.
Patterns¶
Team of teams¶
A writing or research goal often needs two cooperating teams. A lead team keeps the direction steady: it tracks requirements, researches sources, drafts the text, and runs a review loop so the writer revises against the requirements and the references. A supporting team supplies evidence: it gathers data, checks the requirements, and produces tables and analysis that justify the statements in the text.
The lead team leads and the support team serves. Each stage is a role with its own prompt and permissions, and each writer can carry more than one skill, so the same writer drafts an expose and later the full work by switching skills per task.
Sequential calls and the run tree¶
Agents continue one another as the work moves through phases. The assistant does not have the permissions to build a team itself, so it calls the composer. The composer builds the team, starts it, and finishes. A planning agent picks up, creates the task list, and calls a developer. The developer works, and when it reports a task done, the planner can call it again with another one, because the developer still has its session and remembers what it just did.
The user can watch this flow, stay out of it, or inspect it with /status and the durable session tree with /history --tree and /print --tree. Ctrl-C pauses the root turn, /continue resumes it, and /cancel closes it. Control never jumps into a live run and the target's session is never disturbed.
Scheduled maintainer¶
Recurring work is a job. A job carries its own role and skills, so a convention like "keep the docs in sync with AGENTS.md" lives in a skill rather than in every prompt. The scheduler runs it in the background, and a run memory carries context from one run to the next.
Supervised fleet¶
For many independent agents, run one process per folder and let the fleet supervisor manage them: it allocates ports, checks health, and restarts failures. Each agent has its own config, model, and permissions, and clients reach it over HTTP.
Scripted agent¶
The same loop is available headlessly. Use the CLI for one-shot prompts and the HTTP API for services, so an agent can be a step in a pipeline or a backend for another tool.
Where to go next¶
- Agent swarms - delegation, types, and how agents cooperate
- Teams - stages, skills, memory, and the review loop
- Sessions - the run logs and how context is kept bounded
- Jobs - scheduled and durable work
- Agent fleets - many scoped agents under a supervisor
- Roles and Skills - defining reusable specialists