Skip to main content

Universal AI Agent framework with identity separation, tool auto-registration, and multi-agent orchestration

Project description

GBase — The Agent That Outgrows Its Creator

I built three things:

  1. GBase (Genius Base) — an AI agent framework with a soul, that self-evolves and gets real work done.
  2. Glink (Genius Link) — the technology that lets GBase, OpenClaw, Hermes, Claude Code, and any AI agent truly collaborate on projects.
  3. 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.

Quick Start Features Architecture License: MIT


GBase Overview

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

🧠 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

Prerequisites

  • Python 3.11+
  • An OpenAI-compatible API endpoint (OpenAI, DeepSeek, etc.)

Setup

# 1. Clone
git clone https://github.com/garyqlin/gbase.git
cd gbase

# 2. Configure
cp .env.example .env
# Edit .env — set your OPENAI_API_KEY

# 3. Run
pip install -r requirements.txt
python3 main.py cli

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 entry point
├── .env.example         # Configuration template
├── identities/          # One directory per agent persona
├── editions/            # Feature toggles (hacker / prime / standard / lite)
├── lib/
│   ├── kernel.py        # LLM kernel — the brain
│   ├── mirror.py        # Long-term memory with active recall
│   ├── experience.py    # Learn from past interactions
│   ├── 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
│   └── ...              # Code review, testing, data seeding, etc.
└── 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_URL and 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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gbase-0.4.0.tar.gz (276.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

gbase-0.4.0-py3-none-any.whl (317.6 kB view details)

Uploaded Python 3

File details

Details for the file gbase-0.4.0.tar.gz.

File metadata

  • Download URL: gbase-0.4.0.tar.gz
  • Upload date:
  • Size: 276.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for gbase-0.4.0.tar.gz
Algorithm Hash digest
SHA256 e8ab6e59994f20764d4a02dd25db08fa4da652f9f953ee8fa08fd6a583eb06fe
MD5 cd38cb2a7fed7a95414eca526050954b
BLAKE2b-256 43c1e7b649da63e8c49ca409900c413742c98e6efa4738814a0d8ea410ca5ebf

See more details on using hashes here.

File details

Details for the file gbase-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: gbase-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 317.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for gbase-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3c774488754c0c9c0d94c6eed253352810a6c3354305f99e61a04028d1be4b25
MD5 73890d42ac64707783934a05adfec173
BLAKE2b-256 82e863af54f2216c9eae353e09563cb4b3a5a829a4dd071a4d6a2c818671788e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page