deepagents-okf-backend
An OKF-aware virtual filesystem backend for LangChain Deep Agents.
It mounts an Open Knowledge Format (OKF) bundle — "a directory of markdown files with YAML frontmatter" — as the agent's filesystem, so a deep agent can read, search, and curate organizational knowledge while every write stays a valid OKF document.
🧩 Community backend (not maintained by LangChain), built for the
integrations/backendslist.
Why
A deep agent's knowledge memory is usually either ephemeral (StateBackend) or closed
(ContextHubBackend → LangSmith Hub). OKF is the open, vendor-neutral alternative:
git-versionable markdown, human-readable, parseable by any agent or framework.
StateBackend |
StoreBackend |
FilesystemBackend |
OKFBackend |
|
|---|---|---|---|---|
| Persists across threads | ❌ | ✅ | ✅ | ✅ |
| Human-readable on disk | ❌ | ❌ | ✅ | ✅ |
| Vendor-neutral / portable bundle | ❌ | ❌ | ➖ | ✅ |
| Structured frontmatter query | ❌ | ❌ | ❌ | ✅ |
| Validates writes as a shareable format | ❌ | ❌ | ❌ | ✅ |
What OKFBackend adds:
- Open knowledge, no lock-in — portable markdown bundles, not a proprietary store.
- Semantic, not blind — query by
type/tags/title, not justgrep. - Self-improving wiki — the agent maintains the bundle; writes are validated as OKF.
- Cross-agent sharing — "a bundle synthesized by one LLM can be queried by another."
- Sync + async, path-sandboxed to the bundle root, fully typed (
py.typed).
Install
pip install deepagents-okf-backend
Quickstart
from deepagents import create_deep_agent
from deepagents_okf_backend import OKFBackend
backend = OKFBackend("./knowledge", validate=True, auto_timestamp=True)
agent = create_deep_agent(
tools=[],
instructions="You curate the organization's OKF knowledge bundle.",
backend=backend,
)
Knowledge surface + scratch space (CompositeBackend)
Mount the OKF bundle on /knowledge and keep an ephemeral scratch filesystem on /:
from deepagents.backends import CompositeBackend, StateBackend
from deepagents_okf_backend import OKFBackend
backend = CompositeBackend(
routes={"/knowledge": OKFBackend("./knowledge")},
default=StateBackend(),
)
Structured query tool
The six standard filesystem tools only grep raw text. Give the agent a typed lookup over
OKF frontmatter:
from deepagents import create_deep_agent
from deepagents_okf_backend import OKFBackend, make_okf_query_tool
backend = OKFBackend("./knowledge")
agent = create_deep_agent(
tools=[make_okf_query_tool(backend)], # okf_query(type=..., tags=..., title_contains=...)
instructions="Use okf_query to find tables and metrics before answering.",
backend=backend,
)
You can also call it directly:
from deepagents_okf_backend import query_bundle
hits = query_bundle(backend, type="Metric", tags=["growth"])
What is OKF?
Open Knowledge Format (Google Cloud, 2026) represents knowledge as a directory of markdown
files with YAML frontmatter. The only required field is type; title, description,
resource, tags, and timestamp are optional. See the
announcement.
---
type: BigQuery Table
title: Orders
description: One row per completed customer order.
tags: [sales, revenue]
---
# Schema
| Column | Type | Description |
|--------|------|-------------|
| `order_id` | STRING | Globally unique order identifier. |
Development
See DEVELOPMENT_PLAN.md. Contributions welcome — see CONTRIBUTING.md.
pip install -e ".[dev]"
ruff check . && mypy src && pytest --cov=deepagents_okf_backend
License
MIT © Emanuele Ielo
Metadata
Release files for deepagents-okf-backend 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| deepagents_okf_backend-0.1.1.tar.gz | 19.3 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| deepagents_okf_backend-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 32.2 kB
Release files / deepagents_okf_backend-0.1.1.tar.gz
| Download URL | deepagents_okf_backend-0.1.1.tar.gz |
|---|---|
| Size | 19.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fafde46d404e6cceaa0b4a4208386d255f7d5afd9f8f922cb3160f8788677cc6
|
|
BLAKE2b-256 checksum How to use checksums |
9695a30a69bf8e0beb130e763c1dcadac22b1a3ee552341ef1c56940859f002b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.9
|
Release files / deepagents_okf_backend-0.1.1-py3-none-any.whl
| Download URL | deepagents_okf_backend-0.1.1-py3-none-any.whl |
|---|---|
| Size | 12.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a04b901b01b33396ef7a685aee39c4e98eca205b40937d76eb744468e27215c7
|
|
BLAKE2b-256 checksum How to use checksums |
e15a76f5fc5eb5319b21854f232984d39a2824d2f39840f961e7b145a9419098
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.9
|
Security for deepagents-okf-backend 0.1.1
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.