loosecanvas πΈοΈ
Talk through an idea. Watch it become a map β and decide which connections are real.
π Hackathon submission
Built for the Build Small Hackathon β π² Thousand Token Wood track (small local model).
- Live Space: build-small-hackathon/loosecanvas β goes live on transfer to the org + made public.
- Demo video: TODO
- Field notes (build write-up):
submission/FIELD_NOTES.md - Submission packet:
submission/β demo script, social drafts, links checklist.
loosecanvas is a local AI thought-mapping canvas. A small model (Gemma 4 26B-A4B, ~25B params, via a llama.cpp server) sits beside you and turns conversation into a living knowledge graph: concepts, connections, evidence, and open questions. It can propose a surprising cross-domain link β but it never hides what is a guess, what is grounded, and what you've confirmed.
- An AI that proposes, but never decides. Every model-inferred claim carries an independent trust state (origin / support / review) and waits for your judgment. The model can suggest; the validator and reducer decide; you steer.
- 100% local. Inference runs on your machine via llama.cpp β no cloud APIs.
- A real custom UI. A genuine Cytoscape.js Gradio component, not a chatbot with a decorative graph beside it.
Screenshot / demo GIF: a populated graph with trust-tagged nodes β to be added.
How it works
A turn is a negotiation, not autocomplete:
- You converse (or paste text to build a graph from scratch).
- The model proposes scene actions β reveal a node, draw an edge, add a hypothesis β streamed as it thinks.
- A validator + reducer decide: every proposed action is checked against the real graph state; invalid ones are rejected with a reason the model can self-correct from.
- The canvas updates, and the new claims are tagged by origin (
deterministic/user_asserted/model_inferred), support, and review β four independent fields that never collapse into one. Model output is permanently markedmodel_inferredand is never silently elevated to a higher-trust origin.
The design philosophy lives in the constitution (files 01β06): the trust model, the three-layer architecture, and the anti-specialization invariant (the turn loop must work on any substrate, not just code).
Run it locally (Windows / PowerShell 7)
# 1. Python env (requires uv; uv.lock is committed β reproducible)
uv sync
# 2. Build + install the Gradio custom component (rebuild after any frontend edit)
cd cytoscapecanvas
& ..\.venv\Scripts\gradio.exe cc build --python-path ..\.venv\Scripts\python.exe
cd ..
# 3. Configure
copy .env.example .env # set LOOSECANVAS_ALLOWED_BASE + GEMMA_MODEL_FILENAME
# 4. Place the GGUF model in models/ (see models/README.md)
# 5. Start the llama.cpp server (+ optional local monitoring)
docker compose up
# 6. Run the app
$env:PYTHONPATH = "src"; & .\.venv\Scripts\python.exe -m uvicorn loosecanvas.main:app --port 8000
Open http://localhost:8000.
gradio cc dev(on :7860/:7861) is a bare component demo with no LLM and no backend β not the app. Use uvicorn on :8000 for the real product.
Deploy as a single container
A self-contained Dockerfile + entrypoint.sh run
llama.cpp and the app together in one image (for a Hugging Face Docker Space or any GPU
host). See deploy/hf-space/README.md.
Documentation
| Doc | Purpose |
|---|---|
| plan/README.md | The constitution (files 01β06): trust model, architecture, design philosophy |
| CONTRIBUTING.md | Commands, quality gate, conventions, pitfalls β operational guidance |
| AGENTS.md | Agent/Copilot dispatch guide |
| CLAUDE.md | Claude Code guidance: architecture deep-dive |
| plan/STATUS.md | Active development tracker |
License
MIT Β© 2026 Joshua Sundance Bailey