Skip to content

Your First Agent

Welcome to Dokugent! This guide walks you through creating and certifying your first AI agent using Dokugent CLI. You’ll define its behavior, evaluation standards, and generate a certifiable contract.


1. Initialize the Workspace

dokugent init

Creates the .dokugent/ folder and assigns a timestamped agentId (birthstamp).


2. Register the Agent

dokugent agent

Provide the agent name, purpose, and tags.


dokugent owner

Select or create the identity used for signing certificates.


4. Generate a Signing Key

dokugent keygen

This creates a public/private keypair used to sign and verify your agent certificates. You only need to do this once per identity.


5. Plan Your Agent

dokugent plan

Define your agent’s task steps (e.g., summarize_input, web_search).


6. Define Output Criteria

dokugent criteria

What does a “good” output look like? Choose quality benchmarks like clarity, accuracy, safety.


7. Add Conventions

dokugent conventions

Model-specific behavior guides (e.g., dev, research, writing).


8. Optional: Fill Out I/O and Compliance

Before previewing or certifying, we recommend filling out:

  • .dokugent/data/io/ – rules about expected file inputs/outputs, file type restrictions, etc.
  • .dokugent/data/compliance/ – metadata like contact info, legal basis, user roles

These aren’t blockers, but they’re important for agents that run in structured or regulated environments. Think of them like your agent’s operating policy, not unlike a terms-of-use document.


9. Preview the Agent

dokugent preview

Simulate your agent’s behavior and verify that criteria and plan steps align.


10. Certify It

dokugent certify

This signs a .cert.json file, verifying the plan, criteria, owner, and birthstamp.


11. Compile the Bundle

dokugent compile

Outputs a final .compiled.cert.json for runtime usage, including any BYO bundles, hashes, and logs.


You’re now ready to expand your agent with tool access, security checks, and multi-step simulations!