Ai Keeper/Guides/Agents and workspaces
← All workflows
Collection 06 · Coordinated work

Agents and workspaces

Define focused roles, give each the minimum tools and context, combine them into repeatable sequential or parallel workspaces, and review every run.

10 workflowsBeginner-first

Find one workflow

Filter this collection by name, outcome, provider, engine, channel, mode, or command.

10 shown
Workflow 01

Create your first agent

Make one named role with a clear job, model, prompt, and no unnecessary tools.

Beginner5–10 minResult · A reusable agent appears in Directory✓ Source-audited workflow
Workspaces Directory showing two agents and the selected researcher’s role, model, memory, and configuration details.
Use the plus control above the agent list to add an agent, then verify its complete definition in the detail pane.
Before you start
  • A Ready model.
  • One narrow job for the agent.
  1. Open Workspaces > Directory and click the new-agent action.

  2. Give the agent a role-based name and one-sentence objective. The wizard should preselect an available runtime.

  3. Write a compact role prompt covering responsibility, output format, and boundaries.

  4. Leave tools at None for the first save. Add memory scope, skills, personality, standing orders, or hooks only when the role needs them.

  5. Preview the assembled prompt, save, and reopen the agent.

You are done when
The agent appears in Directory with the intended model and prompt, and no tools are enabled by accident.
If something looks wrong
Agent created with every toolRemove them. New agents should start with no tools; grant capability deliberately.
Prompt repeats shared contextUse references to existing skills/personality/memory scopes instead of pasting the same text into every role.
Workflow 02

Give an agent the minimum safe tools

Use individual tools or Tool Groups and preserve approval gates for actions with side effects.

Intermediate5–15 minResult · The agent can do its job and nothing broader✓ Source-audited workflow
Workspaces Directory showing a selected agent and the tool and memory sections of its configuration.
The selected researcher has no tools available; assign only the capabilities its evidence-gathering role requires.
Before you start
  • An existing agent.
  • A written list of actions the role truly needs.
  1. Open the agent in Workspaces > Directory and inspect Tool Access.

  2. Choose explicit tools or a reviewed Tool Group. Avoid broad shell, file-write, browser, channel-send, or external-system access unless essential.

  3. Set the tool policy so sensitive actions require confirmation.

  4. Save and run a small task that needs one allowed tool and one harmless request for a disallowed tool.

  5. Confirm the allowed call works and the disallowed call is refused or requires a policy change.

You are done when
Only intended tools appear in the run, and sensitive calls still produce approval requests.
If something looks wrong
Tool Group changed laterRe-review agents that inherit it. Group membership is easier to audit, but it can broaden several roles at once.
Workflow 03

Build a sequential workspace

Pass work through ordered stages when each agent depends on the previous result.

Intermediate10–20 minResult · A staged workspace definition is saved✓ Source-audited workflow
Workspaces Directory showing the researcher and reviewer that form the demonstration workspace.
Define and verify each agent here before switching to Workspaces and arranging them in sequence.
Before you start
  • Two or more agents with distinct dependent roles.
  1. In Workspaces > Directory, create a workspace and choose sequential execution.

  2. Add stages in dependency order, for example Researcher → Analyst → Writer → Reviewer.

  3. For each stage, state what input it receives and what output the next stage needs.

  4. Set stop/retry behavior and approval policy. Save.

  5. Preview the workspace to check there is no circular or missing handoff.

You are done when
The workspace shows the intended ordered stages, and each stage has a role and clear handoff.
If something looks wrong
A stage receives raw provider errorsRun reports summarize stage errors; fix routing or credentials rather than asking downstream agents to parse error JSON.
Retry skips later stagesUse the built-in retry/resume control so skipped stages resume after the corrected stage.
Workflow 04

Build a parallel workspace

Run independent specialists at the same time and combine their outputs afterward.

Intermediate10–20 minResult · Independent branches run concurrently✓ Source-audited workflow
Workspaces Directory showing two independent agent definitions and the Workspaces selector.
Confirm every agent has an explicit model and role before composing a workspace that can run them concurrently.
Before you start
  • Two or more tasks that do not depend on each other's output.
  • Enough model capacity for concurrent work.
  1. Create a workspace and choose parallel/mirrored execution.

  2. Add agents that can work from the same original task, such as security reviewer, UX reviewer, and performance reviewer.

  3. Give every branch the same scope and a structured result format so outputs can be compared.

  4. Add a final synthesis/reviewer stage if the workspace supports combining results.

  5. Save and check Monitor before launching a resource-heavy local run.

You are done when
The run view shows independent branches active together and produces separately attributable outputs.
If something looks wrong
Mac becomes unresponsiveUse smaller models, reduce concurrency, or run branches sequentially. Parallel prompts can multiply memory pressure.
Branches secretly depend on each otherUse sequential stages for dependencies; parallel is for independent work.
Workflow 05

Run, approve, stop, and resume a workspace

Launch a task, follow agent messages, decide tool confirmations, and recover a failed stage.

Intermediate10–60 minResult · A reviewed workspace run completes✓ Source-audited workflow
Workspaces Run showing a completed release-readiness task, two successful agents, their outputs, and Export Report.
The readiness checks and timeline make the whole coordinated run inspectable from one screen.
Before you start
  • A saved workspace with healthy agent routes.
  1. Open Workspaces > Run, choose the workspace, and enter a task with a concrete deliverable.

  2. Start the run and watch stage status and messages. Do not leave a sensitive approval waiting unattended.

  3. For each confirmation, inspect the agent, tool, arguments, and affected target before approving or rejecting.

  4. Use Stop if the scope is wrong or the run loops. Correct the task, tool policy, or route.

  5. If one stage fails, use its retry/resume action so later skipped stages continue after recovery.

You are done when
Every stage reaches a terminal state, approvals are accounted for, and the final output matches the task rather than merely reporting internal activity.
If something looks wrong
Run says complete but deliverable is missingInspect stage outputs and add an explicit final-deliverable stage.
Agent loops on a toolStop, inspect the error and audit trail, then fix the underlying permission or argument.
Workflow 06

Export and review a workspace run report

Create a deterministic record of stages, messages, approvals, errors, and results.

Beginner3–10 minResult · A complete report file opens✓ Source-audited workflow
Workspaces Run showing completed agent outputs and the enabled Export Report action.
Export after every participant has succeeded so the report includes the complete timeline and outputs.
Before you start
  • A completed, stopped, or failed workspace run.
  1. Open the run in Workspaces > Run and review its summary first.

  2. Use Export Report and choose a destination outside temporary/cache folders.

  3. Open the exported report and check the workspace identity, task, stage order, statuses, approvals, errors, and final output.

  4. Redact secrets or personal data before sharing the report outside your trusted team.

You are done when
The report is readable, stable on repeated export, and contains enough detail to explain the outcome without opening the live run.
If something looks wrong
Report includes provider error detailsThe UI summary should be concise, but exported evidence may still be sensitive. Treat it as operational data.
Workflow 07

Spawn and supervise a sub-agent

Hand one slice of work to a short-lived helper agent that reports back, without giving it your whole toolset.

Intermediate10–20 minResult · A sub-agent completes one bounded task✓ SubAgentService.swift parameters, statuses, and depth guard verified
Workspaces Run showing two successful participants in a bounded coordinated task.
Keep spawned work visible in one run so readiness, status, outputs, and completion remain attributable.
Before you start
  • A working agent session with a Ready model or provider route.
  • One small, well-defined task you could describe in a sentence.
  • A disposable working folder if the task touches files.
  1. Understand what a sub-agent is before you spawn one. It is a child session with its own prompt, its own tool allowance, and its own budget — not another workspace member. It runs, reports, and ends.

    Use a sub-agent for a side quest inside one conversation. Use a workspace when you want a repeatable team you run again next week.

  2. In an agent-mode chat, ask for the work to be delegated, or call the sessions_spawn tool directly. Give it a name and the prompt — the task itself.

  3. Restrict its tools. The spawn accepts either Only allow these tools or Block these tools — prefer the allow list and name the two or three tools the task genuinely needs.

    A sub-agent inherits nothing by accident when you set an allow list. This is the single most useful safety control here.

  4. Set a timeout. The default is 300 seconds. Lower it for a quick lookup; raise it only when you have watched the task take longer.

    A timed-out spawn is marked timedOut and stops. That is the intended outcome for a task that stalls — not a failure you need to debug.

  5. Optionally override the model or provider for this one spawn, and set a token budget, so a cheap helper does not run on your most expensive route.

  6. Watch the status. A spawn moves through queuedrunning → one of completed, failed, timedOut, or cancelled. On spawn you will see a line like Sub-agent 'research' queued (depth 1).

  7. Read the returned result in the parent conversation before acting on it. Treat it as a proposal from a helper, not a verified fact.

    The parent session is where approvals and your judgement live. The sub-agent's output arrives as content, not as an executed decision.

  8. If it misbehaves, cancel it from the parent. A cancelled spawn is recorded as Cancelled by parent.

You are done when
The spawn reaches completed, its result appears in the parent conversation, and it never used a tool outside the allow list you set.
If something looks wrong
Spawn rejected: depth N exceeds maxSpawnDepthNesting is deliberately bounded — the default maximum spawn depth is 2. A sub-agent spawning a sub-agent that spawns again is refused. Flatten the plan instead of raising the limit.
No available model instance for spawned sessionThe spawn asked for a route that is not Ready. Start the instance, or set an explicit model/provider override that points at one that is.
It finished too fast and did nothing usefulThe prompt was under-specified. A sub-agent has none of your conversation's context unless you put it in the prompt.
It hit the timeout every runEither the task is genuinely long — raise the timeout deliberately — or it is looping. Check which tools it called before raising anything.
Workflow 08

Use an orchestrator to delegate across worker agents

Put one agent in charge of planning and synthesis while others do the work, and choose whether they run one at a time or all at once.

Advanced20–40 minResult · An orchestrated run produces one synthesized answer✓ AgentOrchestrator+Delegation.swift + FlowExecutionMode display names verified
Workspaces Run showing a sequential researcher-and-reviewer handoff for a release-readiness brief.
The timeline confirms both delegated roles completed before the workspace reported success.
Before you start
  • At least two agents with genuinely different jobs — see Create your first agent.
  • Enough memory headroom if the workers will run concurrently on local models.
  • A task where you can tell a good result from a bad one.
  1. Decide whether you need an orchestrator at all. A plain sequential workspace already runs agents in order. An orchestrator adds a coordinator that plans, dispatches work, and synthesizes the results into one answer.

    If your stages are fixed and always run in the same order, a plain workspace is simpler and easier to audit.

  2. Open Workspaces > Directory and nominate one agent as the orchestrator. Give it planning instructions — how to split work and how to combine results — not domain instructions.

  3. Give the workers narrow roles and the minimum tools each needs. The orchestrator does not need their tools; it needs to be able to reason and delegate.

  4. Choose the execution mode. Sequential (Managed) runs each step after the previous one completes. Parallel (Mirrored) dispatches all steps to their targets simultaneously.

    Choose Sequential when a later step needs an earlier step's output. Choose Parallel only when the workers are genuinely independent — otherwise you get fast, confidently wrong work.

  5. Start the run from Workspaces > Run and watch the progress messages. You will see Orchestrator … is thinking, then Queued delegated job … or Delegated … in parallel, then Agent … is working, and finally Orchestrator is synthesizing.

  6. Keep approvals on for the first few runs. Approve each side-effecting tool call yourself and read what the worker was actually about to do.

    Parallel mode means several agents can ask for approval at once. That is exactly when it is easiest to approve something you did not read.

  7. Wait for Orchestration complete, then judge the synthesized answer against the workers' individual outputs — not instead of them.

  8. Cancel cleanly if it goes wrong. A cancelled delegation is recorded as Delegated job cancelled, and the run report keeps the partial history.

You are done when
The run reaches Orchestration complete, every worker's contribution is visible in the run history, and the synthesized answer is traceable to real worker output rather than invented by the orchestrator.
If something looks wrong
The orchestrator answers by itself and never delegatesIts instructions read like a domain expert's. Rewrite them to be about planning, splitting, and combining — and make sure the workers are actually attached to the workspace.
Parallel mode is slower or thrashesConcurrent local models compete for unified memory. Run Sequential, or reduce the number of workers, or point some workers at a cloud route.
The synthesis contradicts a workerRead the worker output first. Synthesis is a model summarizing models — it can drop or distort a finding. Lower the worker count until it is reliable.
No completed delegated jobs are available yetThe inspection ran before any worker finished. Wait for at least one job to complete, then inspect again.
Workflow 09

Inspect delegated jobs and collect their results

Find out what each worker actually did, filter to one worker or one job, and gather finished output without re-running anything.

Intermediate5–15 minResult · You can account for every delegated job✓ AgentOrchestrator+Delegation.swift tool description and filters verified
Workspaces Run showing readiness checks, per-agent status, outputs, and final completion.
Keep this view open while the run is active so approvals, failures, and final evidence stay visible.
Before you start
  • A delegated or orchestrated run that has started at least one worker job.
  1. Open the run in Workspaces > Run. The job list is the record of what was dispatched — read it before drawing conclusions from the final answer.

  2. Use the inspection tool, which exists to inspect delegated worker jobs and collect finished results. Call it with no filter first to see the whole picture.

  3. Narrow down when the list is long: filter by worker id to follow one agent, or pass a job id to open a single job.

  4. Match each job to a status. Anything not finished has not contributed to the final answer, however convincing that answer reads.

  5. Collect the finished results you actually need, then export the run report so the evidence survives the session.

    See Export and review a workspace run report — the live run is not a durable record.

You are done when
Every dispatched job is accounted for as finished, still running, cancelled, or failed — and the final answer only cites work that actually completed.
If something looks wrong
No delegated jobs found for the requested filtersThe worker id or job id does not match. List unfiltered first and copy the identifier from there rather than typing it.
A job shows finished but contributed nothingIt completed without producing usable output — usually an under-specified prompt. Fix the worker's role, not the orchestrator's.
Workflow 10

Keep a long-running agent from running away

Set the queue behaviour and the stop conditions before an agent runs unattended, so a loop costs you minutes instead of a night.

Intermediate10–20 minResult · A bounded agent that you can stop from chat✓ QueueMode cases + SlashCommandHandler /queue, /kill, /steer, /stop verified
Workspaces Run showing the completed output of one bounded release-readiness task.
A precise task and explicit workspace make completion visible and prevent an open-ended queue from hiding progress.
Before you start
  • An agent or workspace you have already run manually at least once.
  • A rough idea of how long one honest iteration should take.
  1. Run the task by hand first and time one iteration. You cannot set a sane bound on a task you have never watched.

    Almost every runaway agent is a task that was automated before anyone knew what normal looked like.

  2. Choose how queued requests behave with /queue. serial processes one at a time in order; parallel allows concurrent requests; dropNew discards new requests while one is in flight; replaceInFlight cancels the running request when a new one arrives.

    For an unattended agent, serial or dropNew is almost always right. Parallel multiplies both speed and damage.

  3. For a recurring agent, configure it as a heartbeat in Automation > Flows rather than leaving a chat running, and set an explicit iteration bound.

  4. Keep approvals required for anything that writes files, runs commands, sends messages, or touches the network. An unattended agent with blanket approval is an unattended script with a language model attached.

  5. Learn the stop controls before you need them: /stop ends the current generation, /kill terminates a running agent session or background task, and /steer redirects it to a different agent or mode instead of killing it outright.

  6. Let it run once while you watch, then check System > Requests and the Audit Trail for what it actually did — not what it said it did.

You are done when
The agent completes a bounded run, you can stop it on demand with /stop or /kill, and the Audit Trail shows no action you did not intend to authorize.
If something looks wrong
It looped all nightNo bound was set, or approvals were disabled. Re-read the Audit Trail to find the repeating step, then bound that step specifically.
Token spend spikedParallel queue mode plus retries. Switch to serial, and check whether the agent was re-reading a large context on every iteration.
/stop did not end it/stop ends the current generation, not the session. Use /kill for the session or background task.

Keep going