Agent Lifecycle¶
This document explains the end-to-end workflow Dokugent enables for safe, structured, and verifiable AI agent development. It emphasizes human-in-the-loop checkpoints and modular safety enforcement throughout.
Lifecycle Overview¶
[dokugent init]
↓
[dokugent agent] + [dokugent owner]
↓
[dokugent plan] + [dokugent criteria] + [dokugent conventions]
↓
[dokugent tool-list] + [dokugent compliance] + [dokugent io]
↓
[dokugent preview] + [dokugent security]
↓
[dokugent certify] → signed .cert.json
↓
[dokugent compile] + byo bundle
↓
.compiled.cert.json + .sha256 + logs + reports
Step-by-Step Breakdown¶
1. Initialization¶
dokugent initsets up a new agent workspace.dokugent agentregisters a working identity.dokugent ownerlinks signing ownership for traceability.
2. Planning & Criteria¶
dokugent plandefines the step-by-step workflow for the agent.dokugent criteriasets evaluation rules (used later in validation and simulation).dokugent conventionsdescribes expected LLM behavior and patterns.
3. Tools & Constraints¶
dokugent tool-listregisters available tools and actions for the agent.dokugent complianceensures ethical alignment or regulatory coverage.dokugent ioallows defining test cases and expected outputs.
4. Preview & Security¶
dokugent previewsimulates agent behavior using metadata, plans, and criteria.dokugent securityscans for unsafe actions, missing approval metadata, or risk patterns.
5. Certification¶
dokugent certifysigns all validated elements into a.cert.json.- Ties together agent identity, timestamp, criteria, tools, and structure.
6. Compilation¶
dokugent compilecreates a deployable.compiled.cert.json, including the BYO bundle.- Token limits, trace hashes, logs, and reports are stored for runtime loading or audit trails.
- BYO data must be structured as an array under the
byokey in the compiled JSON and conform to Dokugent’s expected schema for validation.
Human-in-the-Loop Checkpoints¶
Dokugent encourages developers to inspect and approve at every stage:
- During
planandcriteriascaffolding - Before
certifyviapreview - On
compileoutput through trace logs and reports
Each CLI prompt is designed to request explicit approval or provide context transparency, ensuring that agent generation is never fully autonomous unless intentionally configured.
Where Dryrun & Simulate Fit¶
dokugent dryrun: Pre-certification validation of structure, references, and plan compatibility. Ensures everything compiles and links before runtime execution.dokugent simulate: Planned future command to replay plan steps using live or stubbed LLMs, tracing performance, errors, and evaluation criteria compliance.