Pgramma is a local-first digital persona engine: one .pgram file stores identity, memory, and conversation history.
- One file, one persona.
- Memory is append-only and not rewritten.
- Each turn follows: recall -> respond -> evaluate -> store.
- Rust 1.80+ (edition 2024)
- At least one usable LLM provider endpoint
git clone https://github.com/KercyDing/pgramma.git
cd pgramma
cp config.example.toml config.toml
# Edit config.toml: set active_provider, model, api_key
cargo run| Command | Description |
|---|---|
/help |
Show commands |
/test <path> |
Seed from file and verify recall |
/stats |
Show engram and episode counts |
/quit |
Exit |
Use config.example.toml as the template and keep local edits in config.toml.
Key points:
llm.active_providerselects provider.llm.providers.<provider>.modelandapi_keyare required for the active provider.embedding.model_idcontrols local embedding model.config.tomlis ignored by git.
If required fields are missing, startup prints a fatal message and exits gracefully.
src/main.rs: REPL and app bootstrapsrc/app/: bootstrap, REPL loop, and command orchestrationsrc/config/: TOML config parsingsrc/domain/: domain models and error typessrc/db/: redb-based storagesrc/llm/: multi-provider inference and evaluatorsrc/memory/: embedding and recall pipeline
cargo test