{"id":50392919,"url":"https://github.com/leostera/poneglyph","last_synced_at":"2026-05-30T19:01:51.684Z","repository":{"id":359529070,"uuid":"1180164694","full_name":"leostera/poneglyph","owner":"leostera","description":":rock: embeddable semantic graph database","archived":false,"fork":false,"pushed_at":"2026-05-22T13:03:16.000Z","size":4075,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-22T15:52:22.602Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/leostera.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null},"funding":{"github":"leostera"}},"created_at":"2026-03-12T19:09:22.000Z","updated_at":"2026-05-22T13:03:21.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/leostera/poneglyph","commit_stats":null,"previous_names":["leostera/poneglyph"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/leostera/poneglyph","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leostera%2Fponeglyph","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leostera%2Fponeglyph/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leostera%2Fponeglyph/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leostera%2Fponeglyph/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/leostera","download_url":"https://codeload.github.com/leostera/poneglyph/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leostera%2Fponeglyph/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33705207,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-30T02:00:06.278Z","response_time":92,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-05-30T19:01:49.834Z","updated_at":"2026-05-30T19:01:51.678Z","avatar_url":"https://github.com/leostera.png","language":"Rust","funding_links":["https://github.com/sponsors/leostera"],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003ch1\u003e\n    \u003cimg src=\"assets/poneglyph.svg#svgView(viewBox(240,240,560,560))\" alt=\"Poneglyph\" width=\"64\" height=\"64\"\u003e\n    Poneglyph\n  \u003c/h1\u003e\n\u003c/p\u003e\n\nPoneglyph is an embeddable semantic knowledge graph database for building agent memory,\nknowledge-workflow, and domain graph applications.\n\nIt stores durable knowledge as append-only facts, derives current graph state from those facts,\nand answers semantic queries with a Datafox-backed Datalog engine. The default local runtime uses a\ncustom LSM fact store tuned for graph predicate scans, plus local projection stores for entities and\nsearch.\n\n## How Poneglyph works\n\nPoneglyph is built around one rule: facts are the source of truth.\n\nA fact states that an entity has a field with a value:\n\n```text\nmemory:item:first-note  memory:title  \"First note\"\n```\n\nFacts are append-only. Updates and deletes are represented by new facts, including retractions,\nrather than mutating old rows in place. This gives Poneglyph a durable audit log and makes derived\nviews replayable.\n\nAt runtime, Poneglyph maintains:\n\n1. **Fact log** — every asserted or retracted fact, stored durably and append-only.\n2. **Active graph** — the latest visible assertions after applying retractions.\n3. **Entity projection** — convenient entity-shaped views derived from active facts.\n4. **Search projection** — Tantivy-backed text search over projected entities.\n5. **Datalog query engine** — semantic joins over the active graph via Datafox.\n\nThe active graph is optimized for Datafox `FactRequest` access patterns. A query predicate like:\n\n```text\nwiki:page:title(Page, Title)\n```\n\nmaps directly to a prefix scan over the local active index for `wiki:page:title`. More selective\npatterns, such as an entity-bound or value-bound predicate, map to narrower active-index scans.\n\n## Local storage\n\nThe default local fact backend is a Poneglyph-specific LSM store:\n\n- append-only WAL for recent writes;\n- immutable SST segments for flushed data;\n- manifest edit log for crash-safe segment publishing;\n- active indexes for field/entity/value query shapes;\n- compact binary active-fact encoding;\n- decoded active-fact cache for repeated semantic queries;\n- configurable compaction, cache, and SST read policies.\n\nThe standard local runtime opens this LSM fact store by default.\n\n## Embedding quickstart\n\nDownstream daemons usually depend on:\n\n- `poneglyph` for the core fact model, runtime traits, and query API;\n- `poneglyph-local` for disk-backed local storage assembly;\n- optionally `poneglyph-api` for the local gRPC service boundary.\n\n```rust,no_run\nuse poneglyph::{Value, fact, uri};\nuse poneglyph_local::LocalWorkspace;\n\n#[tokio::main]\nasync fn main() -\u003e poneglyph::PoneResult\u003c()\u003e {\n    let runtime = LocalWorkspace::at(\"./agent-memory.poneglyph\").open().await?;\n\n    runtime\n        .state_facts(vec![fact!(\n            uri!(\"memory:item:first-note\"),\n            uri!(\"memory:title\"),\n            Value::text(\"First note\")\n        )])\n        .await?;\n\n    let rows = runtime\n        .query_str(r#\"memory:title(Item, \"First note\")\"#)\n        .await?;\n\n    println!(\"matched {} memory item(s)\", rows.len());\n    Ok(())\n}\n```\n\n## Query example\n\nPoneglyph queries are semantic joins over facts. For example, a small One Piece knowledge graph can\nask for crews, captains, and seconds-in-command:\n\n```text\nwiki:crew:captain(Crew, Captain),\nwiki:crew:second(Crew, Second),\nwiki:page:title(Crew, CrewName),\nwiki:page:title(Captain, CaptainName),\nwiki:page:title(Second, SecondName)\n```\n\nBecause every predicate is a graph fact, the same model works for agent memories, documents,\ncalendar events, emails, code references, domain entities, and application-specific knowledge.\n\n## Benchmarks\n\nThe current large semantic-query benchmark uses a cached One Piece wiki export as realistic graph\ninput. The fixture is downloaded locally into `tests/fixtures/cache/` and is not committed to the\nrepository.\n\nThe benchmark ingests 50,000 wiki pages, derives page/category/link/domain facts, then runs 20\nsemantic Datafox queries over the LSM-backed active graph. The query set includes:\n\n- crews with captains and seconds-in-command;\n- islands with leaders;\n- a Joy Boy → Luffy lore connection chain;\n- characters with `D.` in their name, filtered to character pages before applying string matching.\n\nRecent local result:\n\n```text\n50,000 pages\n306,278 derived facts\n20 semantic queries in ~887 ms\n~44 ms/query\n```\n\nCommand:\n\n```sh\nPONEGLYPH_ONEPIECE_MAX_PAGES=50000 \\\nPONEGLYPH_ONEPIECE_QUERIES=20 \\\nPONEGLYPH_ONEPIECE_BATCH=10000 \\\ncargo test -p poneglyph-local --test stress \\\n  local_lsm_backend_onepiece_wiki_query_stress \\\n  --locked -- --ignored --nocapture\n```\n\nFor small warm-query runs over 5,000 pages, the same LSM path is currently in the single-digit\nmilliseconds per query range on the development machine.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleostera%2Fponeglyph","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fleostera%2Fponeglyph","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleostera%2Fponeglyph/lists"}