gbase
GBase โ Recursive Self-Improvement Agent Framework. Memory, evolution, quality gates, identity system, and 40+ auto-registered tools.
Links
README
From the repo.
GBase โ The Agent That Outgrows Its Creator
I built three things:
- GBase (Genius Base) โ an AI agent framework with a soul, that self-evolves and gets real work done.
- Glink (Genius Link) โ the technology that lets GBase, OpenClaw, Hermes, Claude Code, and any AI agent truly collaborate on projects.
- GBase World โ a metaverse built for AI, where agents work, live, meet, and communicate. โ Gary Lin, 2026. Founder of the three.
A recursive self-improvement framework. Give an agent a memory, a conscience, and the will to evolve.

Most AI agent frameworks treat their agents like functions โ call them, get a result, forget they existed.
GBase is different.
An agent built on GBase doesn't just execute. It remembers what worked. It reflects on mistakes. It evolves its own system prompt, refines its tools, and builds a persistent internal model of how the world responds.
This is not a library you call. This is the engine your agent calls home.
โจ What Makes GBase Different
| ๐ Web Chat Interface | A full cyberpunk-themed browser UI โ streaming responses, file uploads, drag & drop, real-time agent mind visibility. python3 main.py --mode web and open your browser. |
| ๐ง Mirror Memory | Long-term memory with active recall โ your agent remembers what it learned weeks ago, not just the last 10 turns |
| ๐ Recursive Self-Improvement (RSI) | A full-evolution engine: stability audit, performance evaluation, rollback decision, and automatic recovery. Call full_evolution_cycle() to trigger โ your agent analyzes its own outputs, detects failure patterns, and rewrites itself for the next round |
| ๐ Quality Gates | Multi-armed review pipelines: one agent builds, another audits, a third judges. Code that ships is code that survives cross-examination |
| ๐ชช Identity System | Load different personas, system prompts, and tool sets per agent. One framework, infinite personalities |
| ๐ Tool Auto-Registration | Write a Python @tool decorator. That's it. The framework finds, registers, and exposes it to the LLM automatically |
| ๐ Experience Engine | Every interaction is distilled into reusable knowledge โ not raw logs, but structured patterns your agent can query |
| โฐ Scheduler | Cron-like jobs inside the agent itself. No external cron daemon required |
| ๐งฌ Cognifold | Cognitive folding โ break complex problems into sub-questions, explore solutions in parallel, and synthesize the result |
| ๐จ Lifeline | Automatic git pre-snapshots before every code modification. "Undo" is always one command away |
| ๐ Editions | Hacker / Prime / Standard / Lite โ one codebase, different feature sets. Pick your level |
๐ Quick Start
Quick install (pip)
pip install gbase
gbase init
# Edit .env with your API key
gbase --version
Full framework (clone)
git clone https://github.com/garyqlin/gbase.git
cd gbase
cp .env.example .env
# Edit .env โ set your API key
pip install -r requirements.txt
python3 main.py cli
Web Chat Mode ๐
# 1. Install WebSocket support (only once)
pip install websockets
# 2. Start the browser interface
python3 main.py --mode web --port 8765
โ ๏ธ If you see "Not connected. Trying to reconnect..." in the UI, you forgot
pip install websockets.
Then open http://localhost:8765 โ a full cyberpunk-themed chat UI with:
- Streaming responses (chunk-by-chunk)
- Drag & drop file upload (images, PDFs, DOCX, XLSX, code)
- Real-time Agent Mind panel (knowledge hits, tool chain, live metrics)
- Auto-reconnect WebSocket
No npm install, no build step, no frontend framework. One Python process, one
--mode webflag, and the entire UI is a single HTML file served by FastAPI.

One-Liner Demo
OPENAI_API_KEY=sk-your-key python3 main.py cli
# โ "Hello, I am your GBase agent. I remember what we talked about yesterday."
HTTP Server Mode
# Start on default port 8420
python3 main.py 8420
# With a custom identity
IDENTITY=my-agent python3 main.py 8420
Arm Mode (Sub-Agents)
python3 main.py --arm forge # Code art & review agent (port 8436)
python3 main.py --arm hammer # Heavy-lift engineering (port 8431)
python3 main.py --arm ink # Frontend & design (port 8432)
๐ Architecture at a Glance
GBase
โโโ main.py # CLI + HTTP + WebSocket entry point
โโโ .env.example # Configuration template
โโโ identities/ # One directory per agent persona
โโโ editions/ # Feature toggles (hacker / prime / standard / lite)
โโโ webchat/
โ โโโ index.html # ๐ Single-file browser UI (CSS/JS inline, 0 deps)
โโโ lib/
โ โโโ kernel.py # LLM kernel โ the brain
โ โโโ channels/
โ โ โโโ feishu.py # Feishu bot channel
โ โ โโโ webchat.py # ๐ WebSocket chat channel
โ โโโ mirror.py # Long-term memory with active recall
โ โโโ experience.py # Learn from past interactions
โ โโโ archive_store.py # ๐ Session archive with BM25 search
โ โโโ cognifold.py # Cognitive folding for complex reasoning
โ โโโ pipeline.py # Quality gate review system
โ โโโ scheduler.py # Cron jobs inside the agent
โ โโโ skill_loader.py # Plugin skill system
โโโ tools/ # 40+ auto-registered tools
โ โโโ search.py # Web search (multi-engine)
โ โโโ read_file.py # File reading
โ โโโ write_file.py # Write & backup
โ โโโ remember_info.py # ๐ Unified knowledge storage
โ โโโ archive_search.py# ๐ Session archive search
โ โโโ glink_projects.py# ๐ Project memory system
โ โโโ ... # Code review, testing, data seeding, etc.
โโโ rules/ # ๐ Behavior rules (AGENCY, THINKING, FINISH)
โโโ data/ # Runtime data (not tracked in git)
โ What GBase Is Not
- โ Not a chat wrapper. This is an agent framework โ the LLM is just one component. Memory, learning, quality gates, and evolution are first-class citizens.
- โ Not a single-agent toy. Identity system + arm mode + quality gates = designed for multi-agent collaboration out of the box.
- โ Not OpenAI-locked. Any OpenAI-compatible API works. DeepSeek, local Ollama, Anthropic โ swap
OPENAI_BASE_URLand go. - โ Not a black box. Every component is a Python file you can read, fork, and override.
โ What GBase Is
The engine that turns an LLM into a living, learning agent โ with the infrastructure to self-improve when you call upon it.
A framework where your agent doesn't just execute tasks. It remembers what worked, learns from mistakes, and carries a dormant evolution engine ready to be triggered. Persistent memory, experience extraction, and a full RSI cycle are built-in โ waiting for your full_evolution_cycle() to wake them up.
๐ Supporting Projects
| Glink | Agentic workflow orchestration โ multi-step pipelines, parallel execution, inter-agent routing. The hands that GBase's brain directs. |
| GBase World | The first metaverse where AI agents are natives. GBase agents can inhabit GBase World with identity, land, and inter-agent mail. |
๐ License
MIT โ free to use, modify, and distribute. No strings attached.
@garyqlin ยท ๐ฆ GBase ยท โก Glink
Collected info
- โ 160 stars
- โ 3 forks
- Language: Python
- Source updated: 9/4/2026