Skip to content

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 init sets up a new agent workspace.
  • dokugent agent registers a working identity.
  • dokugent owner links signing ownership for traceability.

2. Planning & Criteria

  • dokugent plan defines the step-by-step workflow for the agent.
  • dokugent criteria sets evaluation rules (used later in validation and simulation).
  • dokugent conventions describes expected LLM behavior and patterns.

3. Tools & Constraints

  • dokugent tool-list registers available tools and actions for the agent.
  • dokugent compliance ensures ethical alignment or regulatory coverage.
  • dokugent io allows defining test cases and expected outputs.

4. Preview & Security

  • dokugent preview simulates agent behavior using metadata, plans, and criteria.
  • dokugent security scans for unsafe actions, missing approval metadata, or risk patterns.

5. Certification

  • dokugent certify signs all validated elements into a .cert.json.
  • Ties together agent identity, timestamp, criteria, tools, and structure.

6. Compilation

  • dokugent compile creates 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 byo key in the compiled JSON and conform to Dokugent’s expected schema for validation.
"byo": [
  {
    "Name": "value"
  }
]

Human-in-the-Loop Checkpoints

Dokugent encourages developers to inspect and approve at every stage:

  • During plan and criteria scaffolding
  • Before certify via preview
  • On compile output 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.