Gcode

Self-improving coding agent that operates inside a persistent workspace.

Gcode is a self-improving coding agent designed for the post-IDE future.

It writes, reviews, tests, and iterates on code inside a persistent workspace. You interact through conversation. Gcode owns the workspace entirely.

Warning

Gcode is evolving rapidly. For the latest updates, see the repo.

How It Works

Gcode operates inside a container with a persistent workspace volume. Each project is a git repo. Each task gets its own worktree, so there's no state bleed between tasks and every change is auditable via git history.

1You: "Build a URL shortener with FastAPI"
2
3Gcode: mkdir /workspace/url-shortener && git init
4
5Creates worktree writes code runs tests commits
6
7Reports what it built, what tests pass, and the git log
Tip

Gcode is sandboxed to /workspace. It cannot access your host filesystem. OS-level permissions enforce this boundary.

Tools

Gcode combines three tool systems:

  • CodingTools for file read/write/edit, shell, grep, find, and ls.
  • ReasoningTools for structured debugging chains via the think tool.
  • LearningMachine for saving and retrieving project conventions, error patterns, and user preferences.

Self-Learning

Gcode improves with use through two complementary systems:

SystemStoresHow it evolves
KnowledgeProject structure, testing conventions, build systemsCurated by you and refined by Gcode
LearningsError patterns, codebase quirks, user preferencesManaged automatically by the Learning Machine

When Gcode discovers that a project uses pytest with fixtures in conftest.py, it saves that. Next time you ask about tests, it already knows.

Run Locally

1git clone https://github.com/kern-agi/gcode.git && cd gcode
2
3cp example.env .env
4# Edit .env and add your OPENAI_API_KEY
5
6docker compose up -d --build

The workspace starts empty. Gcode creates projects as you ask.

Confirm it's running at http://localhost:8000/docs.

Connect to the control plane

  1. Open os.kern.ndx.rocks and sign in
  2. Click Add OSLocal
  3. Enter http://localhost:8000

Deploy to Railway

1railway login
2./scripts/railway_up.sh

The script provisions PostgreSQL, configures environment variables, and deploys your application.

Then connect via the control plane:

  1. Open os.kern.ndx.rocks
  2. Click Add OSLive
  3. Enter your Railway domain

Example Prompts

Try these in the control plane:

  • Build a FastAPI CRUD app with tests
  • Add authentication to the existing project
  • Fix any failing tests in url-shortener
  • Review the codebase for security issues
  • What conventions does this project use?

Source

For architecture details and local development setup, see the GitHub repo.