# Building agents in Kaptain

A good agent = a kapsule with ONE job, a bounded workspace, a deliberate model route, and settings that survive nobody being at the keyboard.

## One role
Specific enough to evaluate (watch the task board / summarize overnight logs / draft release notes). Purpose + "Generate persona" drafts the system prompt from that line. Different tools or review rules -> two kapsules.

## Bound the workspace
Agent reasons about the project folder; maintains its own <name>_workspace/ (rw); its kapsule folder is read-only to it. trusted_scopes widen access per TARGET (path rw / one MCP server / one host), never per tool.

## Model route
Monitoring -> local 4B is fine; architecture review -> strongest route. Model field accepts anything in the picker (local, cloud, CLI harness, mesh); empty = engine default.

## Tools + permissions = what "unattended" means
Allowlist edited in the kapsule's Tools panel (empty = full enabled catalog, still gated). Approval mode is the real decision: Ask stops at the first risky step; Full access is the only mode that runs a CLI-harness kapsule unattended. Ships in the kapsule file.

## Memory
Off by default; enable only when the job builds on its own last answer; Reset run memory recovers poisoned threads. See /knowledge/scheduling-and-memory/

## Schedules
daily@08:30 in your timezone; results persist with traces; each occurrence at most once. Review the first scheduled runs in BlackBox before trusting one.
