The Language for AI Agents

QPlan lets AI design plans in a structured language, ensuring execution happens strictly within modules you specify.

npm install qplan
Constructing prompt from user intent...
Request Generate Execute
// 1. User Request
const prompt = buildAIPlanPrompt(
  "Load data from file and process it"
);
await llm.generate(prompt);
|
AI generates plan (QPlan)
step id="process_data" {
// 1. Load data from file
file read path="./data.json" -> raw
// 2. Parse and iterate
json parse data=raw -> data
each item in data.items {
set item.processed = true
}
}
Execution confined to your modules

Why QPlan?

AI should be free to plan,
but execution must be controlled.

QPlan separates thinking from doing,
ensuring every plan runs strictly within the modules you define,
deterministically and safely.

AI-First Design

Designed for LLMs to generate. The grammar is compact, explicit, and deterministic, reducing hallucinations.

Safe Execution

Sandboxed variables and strict capabilities. No arbitrary code execution unless explicitly allowed.

Step System

Robust control flow with `jump`, `retry`, `onError`, and real-time execution hooks for full observability.