Reasoning
Chain of Thought
Reason step by step in one call, then answer.
Chain of Thought asks the model to write its reasoning as steps before the answer. There are no tools and no loop: one call, with the work shown.
Writing the steps tends to help on arithmetic, logic and multi-part questions, and it makes a wrong answer easy to diagnose.
- Use it when
- Word problems, logic, multi-step questions
- You want to see how the answer was reached
- Cheapest option: a single model call
- Skip it when
- The answer needs fresh facts (use tools: ReAct)
- Many plausible approaches (Tree of Thoughts explores them)
Run it
Scripted model · no key needed · CriogenAI engine in your browserThe runmodel 0 · tools 0
- Press Run to watch the pattern work, step by step.
Try it with your own key optional: a real model makes the decisions; the tools stay simulated
- Your key stays in this tab's memory: not saved, not in cookies or the address bar. Reload or close the tab and it is gone.
- Your browser calls OpenAI directly. Nothing passes through criogenai.com, and nothing is logged.
- Each run makes at most 16 short model calls, billed to your account. Tools, data and side effects are simulated.
This run is the TypeScript code below, running on the CriogenAI engine in your browser (WebAssembly). Without a key, a scripted model stands in for MODEL; with your key, your provider answers, called from this tab. The tools return made-up data.
Build it with CriogenAI
Ready-made:Agent (instructions)agent = Agent(
"openai:gpt-5-mini",
instructions="Think step by step. Write numbered steps, then a last line: ANSWER: <answer>.",
)
result = await agent.run("Coffee is $3, muffins $2. Ana buys 4 items for $10. How many coffees?")
print((result.text or "").split("ANSWER:")[-1].strip()) # 2const agent = new Agent({
model: MODEL,
instructions: "Think step by step. Write numbered steps, then a last line: ANSWER: <answer>.",
});
const result = await agent.run(task);
console.log((result.text ?? "").split("ANSWER:").pop()?.trim()); // 2