Quickstart
Record an agent loop and step back through it.
Install
npm install hronikaPoint it at the API
createHronika() reads the API URL from the HRONIKA_API environment variable and throws if it is not set.
export HRONIKA_API=https://your-hronika-api.example.comStart a loop
import { createHronika } from 'hronika';
const hronika = createHronika();
const { loopId } = await hronika.init();Save checkpoints as your agent runs
Requests store parameters. Results store result.
await hronika.save({
loopId,
type: 'inference_request',
parameters: {
model: 'gpt-5.4',
input: 'What is the capital of France?',
},
});
await hronika.save({
loopId,
type: 'inference_result',
result: { output_text: 'Paris.' },
});Undo and redo
const request = await hronika.undo(loopId); // back to the inference request
const result = await hronika.redo(loopId); // forward to the recorded resultNext, read Concepts to see how the cursor moves.