Fibona AI / Fibona AgentReAct is a loopFibona Agent is a loop that writes loops

Learn more

Two loops, one differencewho writes the next step

Typical ReAct

history = [task]
while True:
    step = model(history, tools)
    if step.is_final:
        break
    out = tools[step.tool](**step.args)
    history.append(out)
The loop lives in the host: each turn the model picks one tool, and the whole history comes along.

Fibona Agent

# Cell 3, written by the model
pages = [fetch(u) for u in urls]
notes = summarize(pages)
# Call the model with only the notes;
# it calls set_next_cell_code (Cell 4)
call_me(input=f"Continue: {notes}")
The host only runs code: when a Cell finishes, it runs the one that Cell registered next.

Simplified; the helper functions are illustrative.

AspectTypical ReActFibona Agent
Who writes the loopThe model writes it Cell by CellReAct: The developer, in the host
What a step isA complete block of PythonReAct: One tool call
What it can doTwo host tools and the whole interpreterReAct: A pre-registered list of tools
ContextOnly what the code picksReAct: All history, growing every turn
On errorRecovery Cells until three fail in a rowReAct: The error goes back as an observation
When it endsOnly when the user asks to quitReAct: The model gives a final answer