Fibona Agent is a minimal, general-purpose, self-improving agent that writes its own code as it runs.
It starts with only a tiny, general-purpose core, which we define as its "self." From this core, it can build its entire system step by step, becoming whatever it needs to be to get the task done. When something goes wrong, it can repair itself and return to a working state autonomously.
Project Page ·
Video Intro ·
Tech Report ·
Online Demo
Demos
Try the online demo in your browser.
| iPhone GR21 | Console to desktop | Trading terminal |
|---|---|---|
iOS.mp4 |
Desktop.mp4 |
Trading.mp4 |
iOS source and build instructions
Fibona Agent in Chrome: extension source and installation
Quick start
Requires Python 3.12+ and uv.
-
Create a
.envfile in the project root:OPENAI_API_KEY=your-api-key FIBONA_MODEL=gpt-6-astra # Optional: use a custom API endpoint. # OPENAI_BASE_URL=https://your-provider.example/v1
Set
FIBONA_MODELto a model supported by your provider. If omitted, it defaults togpt-6-astra. -
Choose a startup mode and run it from the project root:
-
Start the terminal UI from the project root:
uv run --env-file .env fibona.py --boot-mode terminal
See the terminal bootstrap README for its design and controls.
-
Or start in the minimal mode and let the agent build its own chat TUI:
uv run --env-file .env fibona.py --boot-mode minimal \ "Build and launch a premium chat TUI in this terminal. I want to use it to chat with you. The TUI should feature refined dark colors, generous spacing, elegant rendering, clear activity status, and multiline input. Press Enter to send messages. Keep me updated as you build it."
Omit the task to enter it interactively.
-
To define your own startup behavior, write your bootstrap cell in
./your_custom_bootstrap.py, then run:uv run --env-file .env fibona.py --boot-mode ./your_custom_bootstrap.py
-
Use the core as a library
From another uv project, add a local checkout:
uv add /path/to/fibona-agent
Core executes the Python source supplied to Agent.run as the bootstrap cell in a persistent session.
Cells share variables and call call_me when they need the model to choose the next cell.
Configure the client, model, working directory and input/output in your application:
import sys from openai import OpenAI from core.agent import Agent, Mind, INSTRUCTIONS from core.env import IPythonEnv bootstrap_cell = """ task = input("Your task: ") call_me(input=task) """ with OpenAI() as client: mind = Mind(client=client, model="gpt-6-astra", instructions=INSTRUCTIONS) env = IPythonEnv(stdout=sys.stdout, stderr=sys.stderr, read_input=input) Agent(mind, cwd=".").run(bootstrap_cell, env=env)
Development
Enable Ruff checks before each commit:
uv run pre-commit install
The hooks run Ruff lint and format checks on staged files. Errors block the commit.
To check all tracked files manually:
uv run pre-commit run --all-files
Citation
If you use Fibona Agent in your research, please cite it as follows:
@misc{fibonaagent2026, title = {{Fibona Agent: Self-Improving Agent Writing Itself From Scratch}}, author = {{FibonaAI Team}}, year = {2026}, howpublished = {GitHub repository}, url = {https://github.com/FibonaAI/fibona-agent} }
License
This project is licensed under the MIT License.
