Skip to main content

linkedparticles

Particles is shared memory for humans and AI agents. Each particle is one claim, plus what you need to judge it: who said it, where, when, and how confident they were. Facts, opinions, and memories are all claims, recorded the same way as particles. Particles are not edited or deleted. Particles are superseded, retracted, or disputed in the open. How much to trust it is a perspective applied at query time, never baked into the record.

linkedparticles is the Engine of the Particles reference implementation — the package you install to actually run a belief store. Give it documents, pages, chat logs, or an agent's own session notes; get back claim-granularity beliefs, each carrying calibrated confidence, an uncertainty kind, a resolved subject, and provenance back to the exact source bytes. Ask a question and the answer cites the beliefs it was built from. Nothing is ever overwritten, so you can ask the store what it believed a year ago and why it stopped.

When your agent is wrong, you can see exactly why, and fix it at the source.

The Engine is a library first. The HTTP API, the CLI, the read-only MCP server, and the resident daemon are all surfaces over it.

Install

pip install linkedparticles

Python 3.11+. linkedparticles-core — the store-free Client layer — is pulled in automatically.

Sixty seconds

export ANTHROPIC_API_KEY=sk-ant-...
particles db init

# Deposit a source — file, URL, or literal text — into the append-only corpus
particles deposit https://en.wikipedia.org/wiki/Pluto

# Extract claim-granularity beliefs with confidence, subjects, and provenance
particles extract --all-pending

# Ask in natural language; the answer cites the particles behind it
particles query "Why is Pluto not a planet?"

# Health-check the store: contradictions, staleness, orphaned links
particles lint

Because nothing is overwritten, the store can replay its own history. --as-of is the assertion-time lens — what did the store believe at T, and why did it stop — not what was true of the world at T:

particles query "How many planets are in the Solar System?" --as-of 2000-01-01
# → the belief as it stood then, and why it no longer stands: SUPERSEDED,
#   retired 2006-08-24, superseded by "Pluto is a dwarf planet."

There is a clickable version of that belief history on the front door. Step by step: getting started, then as-of time travel.

Wiring it into an agent

particles mcp serve                 # read-only MCP server (stdio), any MCP client
particles init claude-code          # session-start digest, session-end harvest
particles engine serve              # HTTP API, for a shared or remote engine
particles export obsidian ./vault   # also: anki, wiki, logseq, notion, graph, jsonl

It can also stand in for the reference memory server, and it plugs into LangChain as a retriever and a tool set — see Claude Code memory, swapping in for the reference memory server, and using from LangChain.

Does it hold up?

Measured on LongMemEval, the multi-session agent-memory benchmark, with a full-context oracle and a no-memory floor run as controls in the same harness:

Recall@10 End-to-end QA
Particles memory 0.940 0.733
Full-context oracle (baseline) 0.793
No memory (floor) 0.080

Method, per-question-type breakdowns, comparator memories, and the budget-matched arm — including the arms where Particles loses — are on the benchmarks page, with the report JSONs of record beside them.

Security posture

A memory layer is an input-shaping attack surface: it does not merely hold data, it shapes what the agent believes and does next, so a poisoned claim is an instruction on a delay timer. Before this code was opened we ran an adversarial application-security audit over the whole package — the HTTP, CLI, and MCP surfaces, the filesystem writers, the egress layer, and the build pipeline. The verdict, verbatim: GO-WITH-FIXES, with 33 findings — 2 High, 7 Medium, 20 Low, 4 Info. The ranked must-fix set merged the following day; the last open finding closed in v1.128.0.

What that bought, and what it did not:

  • Prompt injection is contained, not eliminated. Every LLM call site that touches attacker-controllable text keeps trusted instructions in the system turn and wraps the untrusted material in a per-call, 128-bit-nonce data fence, with structural backstops behind it — a JSON contract enforced at the parser, a citation-id membership gate on synthesized prose. This raises the bar materially. It is hardening, not immunity.
  • The model is never given tools, and no model output is executed. No function-calling; nothing the model emits becomes a shell command, a SQL fragment, or a fetch. An injection can at worst distort claims — never trigger actions.
  • Outbound fetches are validated per hop. The host is resolved, the address is checked against a blocklist, and the connection is made to that vetted address, re-resolved and re-validated on every redirect — closing DNS rebinding and redirect SSRF, not just the first lookup. The two fetches that run as subprocesses reach the same guarantee by pinning to addresses this process vetted.
  • Fail-closed auth, and no raw SQL. The API refuses to boot on a non-loopback bind without a real bearer key, and the token comparison is constant-time. Every query in the data layer is typed ORM with bound parameters: no text(), no string-built SQL, no dynamic ORDER BY.
  • Local-first by default. Loopback bind, a local SQLite file, telemetry off, and the MCP server as a locally-spawned stdio child rather than a network service. The only outbound traffic in the default posture is what you configured.

The real answer to the residual is epistemic rather than technical: every particle carries its provenance, source trust is a read-time lens that discounts a distrusted source without rewriting anything, and lint / review turn your rulings on contradictions into a reusable trust policy. The store is a record of what sources said, weighted by how much you trust them — not an oracle — so a poisoned source is something you can see, discount, and retract with the audit trail intact.

The limitations we ask you to read before relying on any of this — the unauthenticated read surface, verbatim storage of whatever you deposit (secrets included), the single-operator trust model, and the MCP write boundary — are in SECURITY.md. That is also where to report a vulnerability; please report privately.

Why Particles?

Most Retrieval-Augmented Generation systems re-derive knowledge from scratch on every query, operating over raw text chunks without any persistent record of what was learned, how confidently it was held, or where it came from. Particles takes a different approach: rather than retrieving passages, it stores discrete, citable, revisable claims — natural-language sentences paired with structured metadata for confidence, provenance, and uncertainty — so that an agent's knowledge accumulates as an auditable ledger rather than evaporating between sessions. Corpus-entry-level provenance is required at Core, meaning every belief can be traced back to the source that produced it, and the particle store itself is a derived view that can be rebuilt from the corpus by re-running extractors, giving the system both durability and reproducibility.

The Particles standard defines the particle schema, the source-corpus model, the extraction protocol, and a set of operations — deposit, extract, query, lint, review, and reindex — that together form the spine along which an agent's knowledge is built, queried, audited, and revised one belief at a time. A developer working with this loop deposits a source into the append-only corpus, extracts claim-granularity particles with resolved subjects, queries by effective-confidence ranking, lints for contradictions and staleness, and reviews inconsistencies into a reusable trust policy. Because particles carry explicit confidence and provenance, Particles can answer queries that require finding relevant claims about a subject and synthesising them with provenance intact, rather than returning a ranked list of chunks whose epistemic status is opaque.

Particles is a minimal interoperable substrate for claim-granularity agent knowledge — narrower than a formal-ontology knowledge graph such as RDF/SPARQL and more structured than augmented markdown. Anchoring every particle to a subject is what makes this precision possible: the Subject store is the standard's catalogue of real-world entities against which particles are indexed, aligning beliefs to canonical entities that can, in principle, be mapped to external ontologies. A developer choosing Particles is therefore choosing a substrate where each belief is a first-class object with an identity, a confidence score, a source, and a subject — not a position in a vector space.

Design rationale

The foundation of Particles is the guarantee that nothing already written is ever overwritten. The Source Corpus is constituted as an append-only archive of all materials from which particles have been or may be extracted, meaning that every ingested source and every derived claim accumulates in place rather than displacing what came before. Provenance is carried by each particle from the moment of its creation, and when a source must be handled in a mutable mode rather than a purely append-only one, the system does not silently absorb the change: particles whose provenance location falls within the changed regions are flagged with PROVENANCE_STALE, making the disturbance visible rather than burying it. Supersession and retraction therefore propagate deterministically through the provenance graph, touching every claim whose origin is implicated, so the ledger remains a faithful record of what was asserted and when, never a quietly revised version of the past.

Trust in Particles is not a property baked into a stored record but a lens applied at the moment of reading. The raw confidence value is stored immutably, calibrated at the time a particle is created and never subsequently altered; what changes with each query is the effective confidence, which is computed at query time rather than stored. Trust weighting, recency decay, and the as-of instant are all applied per observer at query time, never written back into the record. This means that a belief does not need to be retracted or rewritten to sink in the rankings as its source ages or as the extractor that produced it loses credibility: the stored particle remains intact while the effective confidence computed over it falls, allowing stale beliefs to recede naturally without any mutation of the underlying ledger. When as_of is set to a past instant T, the query evaluates the store on the assertion-time axis — what the store believed at T — rather than on any world-time validity dimension, so the same immutable corpus can answer questions about present belief and historical belief without ambiguity.

Contradictions in Particles are treated as first-class citizens of the knowledge graph rather than anomalies to be suppressed. When two sources or two principals disagree, the conflict-resolution ladder surfaces an INCONSISTENCY record for review instead of silently overwriting either side, preserving both competing claims in the ledger and making the disagreement legible to any downstream consumer. Contestedness, the property that marks a particle as being in tension with one or more others, must be computed at read time and is never stored; like effective confidence, it is a read-time lens rather than a durable annotation, which means that as new particles arrive or old ones are superseded, the contested status of any given claim is always freshly derived from the current state of the graph rather than from a stale flag written at some earlier moment.

Memory in Particles maintains itself through a periodic, automated health discipline. The Lint operation performs health checks for contradictions, stale claims, orphan pages, and missing cross-references, scanning the corpus on a scheduled basis so that problems accumulate into visible findings rather than silently degrading the quality of the belief store. Because nothing is overwritten and contradictions are surfaced rather than resolved by fiat, Lint operates on a stable substrate: it traverses the same immutable record that queries read, and its findings feed back into the trust-policy review cycle, closing the loop between ingestion, querying, and the ongoing stewardship of the ledger's integrity.

Architecture

A Particles deployment is organized around two distinct storage subsystems: a Source Corpus store and a Particle store. The Source Corpus store is an append-only object store, compatible with a local filesystem, an S3-compatible backend, or a content-addressed store, while corpus entries and snapshot metadata are held in queryable form, either relational or document store. Together these two subsystems form the durable foundation on which all operations act.

The Core SDK exposes both a clean Python API and a CLI, and the six core operations — Deposit, Extract, Query, Lint, Reindex, and Review — each map to a CLI subcommand and a POST API endpoint in the reference SDK. A developer therefore has two symmetric surfaces for every operation: a scriptable command line suitable for pipelines and a programmatic endpoint suitable for application integration.

The journey from a raw source to a set of particles begins with Deposit, which writes the source into the append-only corpus, and continues with Extract, which drives the extraction pipeline. That pipeline selects the most specific registered extractor whose applicability specification matches the deposited source; the general extractor is used if and only if no domain-specific extractor applies. Once particles exist in the Particle store, Query retrieves them ranked by effective confidence, Lint checks for contradictions and staleness, Reindex rebuilds derived indexes, and Review consolidates inconsistencies into a reusable trust policy. Each step in this sequence is a discrete, named operation rather than an implicit side effect, which means a developer can invoke any stage independently and observe its inputs and outputs in isolation.

The Why Particles?, Design rationale, and Architecture sections are cited projections of a particle store, not hand-authored prose. Each marked block is rendered from docs/projection/readme.yaml and the corpus bundle committed beside it, and the trailer under each block names the exact claims it was built from. Edit the manifest or the underlying particles and re-render — never the prose between the sentinels. Check it yourself: python scripts/projection_drift.py restores the bundle into a throwaway store, re-derives the deterministic render, and fails if any block has drifted from the claims it cites.

This is the project eating its own dogfood: the README argues for claim-granularity knowledge with provenance, and is itself assembled that way.

Documentation

Everything below is served at docs.linkedparticles.org.

Guide What it covers
User guide Depositing, extracting, querying, as-of time travel, exporting, agent integrations
Operator guide Configuration, tuning, lint and review, remote engines, containers, observability, troubleshooting
Plugin-author guide Writing extractors, exporters, and benchmark suites
CLI reference Every verb and flag
HTTP API The OpenAPI contract
Benchmarks LongMemEval results, method, and comparators

The standard itself — whitepaper, technical specification, and the normative schema, context, and vocabulary artifacts — lives at linkedparticles.org.

The three repositories

Repo What it is
particles-standard The standard: whitepaper, technical specification, normative schema + SHACL artifacts, conformance fixtures
particles-core-py The Python Client layer (linkedparticles-core)
particles-engine-py This repo — the Python Engine layer + surfaces (linkedparticles)

Deployment

Container and chart artifacts live under deploy/. The engine ships as a single-writer service; see running in a container.

Contributing

See CONTRIBUTING.md and ARCHITECTURE.md. Contributions are accepted under a Developer Certificate of Origin sign-off — there is no CLA.

License

Apache-2.0. See LICENSE and NOTICE.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

linkedparticles-1.138.1.tar.gz (2.0 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

linkedparticles-1.138.1-py3-none-any.whl (1.2 MB view details)

Uploaded Python 3

File details

Details for the file linkedparticles-1.138.1.tar.gz.

File metadata

  • Download URL: linkedparticles-1.138.1.tar.gz
  • Upload date:
  • Size: 2.0 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for linkedparticles-1.138.1.tar.gz
Algorithm Hash digest
SHA256 512da11e935308913652ac2f677a14262062740af2af67080afeba8344f0c351
MD5 e096d0db11b251f188b56ebc0aa4c8af
BLAKE2b-256 53b8188b3c9fe314f555a8b29602e9598f42e59ea857a9063f4251937731b6bf

See more details on using hashes here.

Provenance

The following attestation bundles were made for linkedparticles-1.138.1.tar.gz:

Publisher: publish.yml on LinkedParticles/particles-engine-py

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file linkedparticles-1.138.1-py3-none-any.whl.

File metadata

File hashes

Hashes for linkedparticles-1.138.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8b5045baaf13fe7a88f8c67cf923bd3857282c7754ce5142a2182777ed5d11d8
MD5 a2f089e410c46a68bcb6424f7929611c
BLAKE2b-256 9a1827bc3f966b3a546b969fa812763cb7d9b05a5214b97e8e227808015710d9

See more details on using hashes here.

Provenance

The following attestation bundles were made for linkedparticles-1.138.1-py3-none-any.whl:

Publisher: publish.yml on LinkedParticles/particles-engine-py

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

1.139.0

2 files

This release

1.138.1 This release

2 files

1.132.1

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page