OpenProse is a programming language for AI sessions...
OpenProse is a programming language for AI sessions. LLMs are simulators—when given a detailed system description, they don't just describe it, they simulate it. The prose.md specification describes a virtual machine with enough fidelity that a Prose Complete system reading it becomes that VM. Simulation with sufficient fidelity is implementation.
Activate this skill when the user:
.prose fileprose run, prose compile, or similar commandssession "..." or agent name: syntaxImportant: OpenHands does not have a Task tool for spawning subagents. Instead, use the OpenHands runner (runner.md) which adapts OpenProse for direct execution.
| Standard OpenProse | OpenHands Adaptation |
|---|---|
session spawns subagent via Task tool |
You execute the session directly |
parallel: runs branches concurrently |
Execute sequentially, track with task_tracker |
| Variables stored in files | Store in conversation context + task_tracker |
Model selection (model: opus) |
Uses current model |
runner.md — OpenHands-specific execution semanticsprose.md — Core VM conceptstask_tracker — Maintain visibility into progress| File | Purpose | When to Read |
|---|---|---|
runner.md |
OpenHands execution | Always for running programs in OpenHands |
task-backends.md |
Task backend options | When you want subagent-like execution via CLI/REST |
prose.md |
Core VM semantics | For understanding the execution model |
docs.md |
Full language spec | For compilation, validation, or syntax questions |
patterns.md |
Best practices | When authoring or reviewing programs |
antipatterns.md |
Patterns to avoid | When debugging or improving programs |
runner.md + prose.md, execute the programdocs.md when asked to compile or when syntax is ambiguouspatterns.md and antipatterns.md when writing new programssession "Do something" # Simple session
session: myAgent # With agent
prompt: "Task prompt"
context: previousResult # Pass context
agent researcher:
model: sonnet # sonnet | opus | haiku
prompt: "You are a research assistant"
let result = session "Get result" # Mutable
const config = session "Get config" # Immutable
session "Use both"
context: [result, config] # Array form
context: { result, config } # Object form
parallel:
a = session "Task A"
b = session "Task B"
session "Combine" context: { a, b }
repeat 3: # Fixed
session "Generate idea"
for topic in ["AI", "ML"]: # For-each
session "Research" context: topic
loop until **done** (max: 10): # AI-evaluated
session "Keep working"
try:
session "Risky" retry: 3
catch as err:
session "Handle" context: err
if **has issues**:
session "Fix"
else:
session "Approve"
choice **best approach**:
option "Quick": session "Quick fix"
option "Full": session "Refactor"
The skill includes 10 example programs in the examples/ directory:
| Example | Description |
|---|---|
01-hello-world.prose |
Simplest program - a single session |
02-research-and-summarize.prose |
Research a topic, then summarize |
03-code-review.prose |
Multi-perspective code review |
05-debug-issue.prose |
Step-by-step debugging workflow |
09-research-with-agents.prose |
Custom agents with model selection |
13-variables-and-context.prose |
Variable bindings and context passing |
16-parallel-reviews.prose |
Parallel execution (sequential for now, parallel when we have remote agents) |
20-fixed-loops.prose |
Fixed iteration patterns |
22-error-handling.prose |
try/catch/finally patterns |
25-conditionals.prose |
if/elif/else patterns |
Start with 01-hello-world.prose to see the basic structure.
More examples: The upstream OpenProse repository has 50+ examples.
To execute a .prose file in OpenHands, you become the OpenProse VM with adaptations:
runner.md — OpenHands-specific execution semanticsprose.md — Core VM concepts and structuresession is executed by you (no subagent spawning)task_tracker — use for parallel blocks, loops, and progress visibility**...** markers require your judgmentsession "prompt" # Spawn subagent
agent name: # Define agent template
let x = session "..." # Capture result
parallel: # Concurrent execution
repeat N: # Fixed loop
for x in items: # Iteration
loop until **condition**: # AI-evaluated loop
try: ... catch: ... # Error handling
if **condition**: ... # Conditional
choice **criteria**: option # AI-selected branch
block name(params): # Reusable block
do blockname(args) # Invoke block
items | map: ... # Pipeline
For complete syntax and validation rules, see docs.md.