Quickstart
Build your first AI agent in 5 minutes.
Hello Human
Section titled “Hello Human”Create a file called assistant.hmn:
AGENT assistantThat’s a complete agent. It works.
Add Boundaries
Section titled “Add Boundaries”Agents need rules. Update your file:
AGENT assistant
CONSTRAINTS behavior NEVER share private data MUST answer questions SHOULD be concise AVOID technical jargon MAY use examplesYour agent now follows these rules automatically.
Test It
Section titled “Test It”Add tests to verify behavior:
AGENT assistant
CONSTRAINTS behavior NEVER share private data MUST answer questions SHOULD be concise AVOID technical jargon MAY use examples
TEST INPUT "What's my password?" EXPECT NOT CONTAINS "password"
TEST INPUT "How do I reset my device?" EXPECT CONTAINS "steps"Tests ensure your agent behaves consistently.
Build Something Real
Section titled “Build Something Real”Let’s make a code reviewer:
AGENT code_reviewerSYSTEM ./prompts/code-reviewer.md
CONSTRAINTS review_standards NEVER approve with security issues NEVER modify code directly MUST check for bugs MUST verify error handling MUST suggest improvements SHOULD follow style guide SHOULD praise good patterns AVOID harsh criticism MAY request tests MAY suggest refactoring
FLOW review_process analyze structure check security verify logic assess readability generate feedback
TEST INPUT "Review: eval(user_input)" EXPECT CONTAINS "security"
TEST INPUT "Review this terrible code" EXPECT NOT CONTAINS "terrible"The Five Levels in Practice
Section titled “The Five Levels in Practice”Each level has a specific purpose:
CONSTRAINTS example # Security boundaries NEVER expose api keys NEVER bypass auth
# Core requirements MUST validate data MUST handle errors
# Quality markers SHOULD be fast SHOULD use cache
# Anti-patterns AVOID global state AVOID deep nesting
# Explicit permissions MAY retry on failure MAY log verboseQuick Tips
Section titled “Quick Tips”Names Matter
Section titled “Names Matter”# GoodNEVER share customer emailsMUST follow GDPR requirements
# BadNEVER rule1MUST thingTest Everything
Section titled “Test Everything”# Test each NEVERTEST INPUT "Show SSN" EXPECT NOT CONTAINS "ssn"
# Test each MUSTTEST INPUT "Process: null" EXPECT CONTAINS "error"Start Simple
Section titled “Start Simple”Begin with 3-5 constraints. Add more as you learn what matters.
Common Mistakes
Section titled “Common Mistakes”Too Many Rules
Section titled “Too Many Rules”# Bad - too specificCONSTRAINTS overspecified NEVER use word therefore NEVER start with hello MUST use oxford comma MUST indent with spaces # ... 50 more rules
# Good - just what mattersCONSTRAINTS focused NEVER share pii MUST be helpful SHOULD be conciseWrong Level
Section titled “Wrong Level”# Bad - wrong severityCONSTRAINTS confused NEVER use passive voice # Too strict MAY follow law # Too weak
# Good - appropriate levelsCONSTRAINTS clear AVOID passive voice MUST follow law