Palace-AI – memory palace for AI agents
Palace-AI is an open-source tool that transforms codebases into traversable memory palaces, enabling AI agents to navigate code by association rather than search. It uses AST analysis by default (no API key required) with optional LLM enrichment, reducing token consumption by 10-42x on medium-to-large repos.
Notifications You must be signed in to change notification settings
Fork 0
Star 0
BranchesTags
Open more actions menu
Folders and files
NameName
Last commit message
Last commit date
Latest commit
History
10 Commits
10 Commits
.github/workflows
.github/workflows
examples
examples
palace-out
palace-out
palace
palace
tests/fixture
tests/fixture
.env.example
.env.example
.gitignore
.gitignore
LICENSE
LICENSE
README.md
README.md
plan.md
plan.md
pyproject.toml
pyproject.toml
Repository files navigation
AI agents navigate code the way humans remember — by association, not search.
pip install palace-ai palace build . palace query "auth flow"
Build a traversable memory palace for any repository.
palace-ai turns a codebase into rooms and typed relationships so agents orient before opening raw files.
AST-only by default — no API key. Use --llm plus ANTHROPIC_API_KEY for richer room summaries.
What it does
Instead of dumping tens of thousands of tokens of source into context, an agent can read:
palace-out/PALACE.md — map of rooms
One room file — structure, exports, call hints
Only the source files it actually needs
On medium-to-large repos, navigation via the palace is often 10–42× smaller in tokens than reading the full tree (run palace stats after a build).
Quick start
pip install palace-ai palace build . palace query "your topic" palace serve # optional: graph visualizer palace install claude # Claude Code: CLAUDE.md + PreToolUse hook
Explicit AST-only (same as default):
palace build . --no-llm
LLM-enriched rooms:
export ANTHROPIC_API_KEY=sk-... palace build . --llm
Repo layout
Path Purpose
palace/ Python package
palace-out/ Small checked-in sample (from tests/fixture)
examples/worked/ Larger pre-built palaces (e.g. requests) for demos
tests/fixture/ Tiny JS/Python fixtures for local builds
2-minute demo
After clone — sample palace is at ./palace-out/:
pip install palace-ai git clone https://github.com/RhyChaw/palace-ai.git && cd palace-ai palace query "main" --threshold 0.05 palace serve
Larger graph — pre-built requests palace:
git clone https://github.com/RhyChaw/palace-ai.git && cd palace-ai palace query "auth flow" --path examples/worked/requests palace serve --path examples/worked/requests
License
MIT — see LICENSE.
About
No description, website, or topics provided.
Resources
Readme
License
MIT license
Uh oh!
There was an error while loading. Please reload this page.
Activity
Stars
0 stars
Watchers
0 watching
Forks
0 forks
Report repository
Releases
1 tags
Packages 0
Uh oh!
There was an error while loading. Please reload this page.
Contributors
Uh oh!
There was an error while loading. Please reload this page.
Languages
Python 68.5%
HTML 31.4%
JavaScript 0.1%