palace-ai
AI agents navigate code the way humans remember — by association, not search.
pip install palace-ai
palace build .
palace query "auth flow"
palace learn --task "..." --outcome success # v2: record what worked
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).
v2 — institutional memory: After tasks, run palace learn so the palace remembers patterns, failures, and codebase “game state.” New sessions read an enriched PALACE.md (what works, what to avoid, what’s incomplete). Use palace reflect periodically to re-derive patterns from the append-only attempt log.
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
palace learn --task "..." --outcome success --notes "..." # v2 memory
palace reflect # v2: re-analyze all attempts
palace status # v2: game state summary
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.
Metadata
Release files for palace-ai 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| palace_ai-0.2.0.tar.gz | 39.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| palace_ai-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 94.4 kB
Release files / palace_ai-0.2.0.tar.gz
| Download URL | palace_ai-0.2.0.tar.gz |
|---|---|
| Size | 39.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
85c419a4e44128a1b5e8bb573a3f6516c7d256264c3dc44258029af53b1e2377
|
|
BLAKE2b-256 checksum How to use checksums |
81564b18cb179224f92e957589c8b7925fbd7adda180ad1e147c562e8f26715f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 20, 2026.
Transparency logRelease files / palace_ai-0.2.0-py3-none-any.whl
| Download URL | palace_ai-0.2.0-py3-none-any.whl |
|---|---|
| Size | 54.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
00c32cb606da6cf66446e820efea6eaa6c9015545b6557d862e31a91ee7bd765
|
|
BLAKE2b-256 checksum How to use checksums |
b61c73e3d4b8d699675b302404b0108309a2b2b8c2aa7a2df01e5cb64b1c20d1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 20, 2026.
Transparency log