DEV Community

Jiban Shial
Jiban Shial

Posted on

I built an open-source coding agent that uses a code graph to reduce context, cost, and search time

Your coding agent shouldn’t need to read your entire codebase to understand it.

That’s the idea behind Faber, an open-source AI coding agent for the terminal.

Faber uses a code graph to find relevant files and symbols first, instead of repeatedly scanning large parts of a repository. That means less unnecessary context, faster codebase navigation, and lower repeated API costs.

I built Faber for developers and students who want to experiment with AI-assisted development while keeping token usage and cost under control. The implementation and design are fully open source, and I’ve also written a deeper technical breakdown of the architecture.

Main features:

Claude, OpenAI Codex, and local model integration
Code-graph-guided repository exploration
Prompt caching to reduce repeated input cost
Token-conscious, Chain-of-Draft-style output to reduce unnecessary generation
Git-aware workflow with change detection, optional per-task commits, /undo, and /redo
Expenditure tracking for calls, tokens, cache usage, cost, and estimated savings with /usage

The goal is simple: understand more of the codebase while reading and spending less.

Prerequisite

Faber requires Node.js 22.5 or newer because it uses Node’s built-in SQLite support.

Install
npm install -g faberwright

Then, inside your project:

faber

GitHub:
https://github.com/JibanKumar-cloud/faber

npm:
https://www.npmjs.com/package/faberwright

Technical write-up:
https://medium.com/@jshial25/why-should-an-ai-coding-agent-read-hundreds-of-files-to-answer-one-question-d6369d29dfa5

Top comments (0)