brain-framework 26.0.0__tar.gz → 27.0.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {brain_framework-26.0.0 → brain_framework-27.0.0}/PKG-INFO +13 -12
- {brain_framework-26.0.0 → brain_framework-27.0.0}/README.md +8 -8
- {brain_framework-26.0.0 → brain_framework-27.0.0}/THIRD_PARTY_NOTICES.md +550 -20
- {brain_framework-26.0.0 → brain_framework-27.0.0}/pyproject.toml +4 -4
- {brain_framework-26.0.0 → brain_framework-27.0.0}/pyproject.toml.orig +4 -4
- {brain_framework-26.0.0 → brain_framework-27.0.0}/src/bf/__init__.py +1 -1
- brain_framework-27.0.0/src/bf/cli.py +202 -0
- {brain_framework-26.0.0 → brain_framework-27.0.0}/src/bf/config.py +75 -78
- {brain_framework-26.0.0 → brain_framework-27.0.0}/src/bf/engine.py +123 -137
- {brain_framework-26.0.0 → brain_framework-27.0.0}/src/bf/guides/authoring.md +3 -4
- {brain_framework-26.0.0 → brain_framework-27.0.0}/src/bf/guides/getting-started.md +6 -8
- {brain_framework-26.0.0 → brain_framework-27.0.0}/src/bf/guides/index.md +6 -6
- {brain_framework-26.0.0 → brain_framework-27.0.0}/src/bf/guides/operations.md +16 -19
- brain_framework-27.0.0/src/bf/guides/reference.md +60 -0
- brain_framework-27.0.0/src/bf/guides/retrieval.md +51 -0
- brain_framework-27.0.0/src/bf/jobs.py +523 -0
- {brain_framework-26.0.0 → brain_framework-27.0.0}/src/bf/markdown.py +40 -54
- {brain_framework-26.0.0 → brain_framework-27.0.0}/src/bf/mcp.py +63 -27
- {brain_framework-26.0.0 → brain_framework-27.0.0}/src/bf/models.py +35 -17
- brain_framework-27.0.0/src/bf/query.py +459 -0
- {brain_framework-26.0.0 → brain_framework-27.0.0}/src/bf/records.py +54 -49
- {brain_framework-26.0.0 → brain_framework-27.0.0}/src/bf/schemas.py +50 -72
- {brain_framework-26.0.0 → brain_framework-27.0.0}/src/bf/skills/bf/SKILL.md +11 -11
- {brain_framework-26.0.0 → brain_framework-27.0.0}/src/bf/starter/AGENTS.md +4 -4
- {brain_framework-26.0.0 → brain_framework-27.0.0}/src/bf/starter/docs/index.md +3 -4
- {brain_framework-26.0.0 → brain_framework-27.0.0}/src/bf/starter/evals/smoke.yaml +1 -1
- {brain_framework-26.0.0 → brain_framework-27.0.0}/src/bf/storage.py +103 -42
- brain_framework-27.0.0/src/bf/watch.py +522 -0
- brain_framework-26.0.0/src/bf/cli.py +0 -255
- brain_framework-26.0.0/src/bf/guides/reference.md +0 -64
- brain_framework-26.0.0/src/bf/guides/retrieval.md +0 -62
- brain_framework-26.0.0/src/bf/jobs.py +0 -606
- brain_framework-26.0.0/src/bf/query.py +0 -411
- brain_framework-26.0.0/src/bf/watch.py +0 -258
- {brain_framework-26.0.0 → brain_framework-27.0.0}/LICENSE +0 -0
- {brain_framework-26.0.0 → brain_framework-27.0.0}/src/bf/__main__.py +0 -0
- {brain_framework-26.0.0 → brain_framework-27.0.0}/src/bf/py.typed +0 -0
- {brain_framework-26.0.0 → brain_framework-27.0.0}/src/bf/starter/concepts/welcome.md +0 -0
- {brain_framework-26.0.0 → brain_framework-27.0.0}/src/bf/starter/gitignore +0 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: brain-framework
|
|
3
|
-
Version:
|
|
4
|
-
Summary: Brain Framework is a local-first brain for you and your AI agents. It compiles OKF Markdown notes into JSON records, validates notes, records,
|
|
5
|
-
Keywords: ai,ai-agents,agent-memory,agent-skills,agents-md,context-engineering,
|
|
3
|
+
Version: 27.0.0
|
|
4
|
+
Summary: Brain Framework is a local-first brain for you and your AI agents. It compiles OKF Markdown notes into JSON records, validates notes, records, and evals against JSON Schemas, orchestrates jobs, channels, and services, and queries offline with rg and jq.
|
|
5
|
+
Keywords: ai,ai-agents,agent-memory,agent-skills,agents-md,context-engineering,json,json-schema,knowledge-graph,knowledge-management,local-first,mcp,model-context-protocol,personal-knowledge-management,python,second-brain
|
|
6
6
|
Author: Médéric Hurier
|
|
7
7
|
License-Expression: MIT
|
|
8
8
|
License-File: LICENSE
|
|
@@ -17,12 +17,13 @@ Classifier: Programming Language :: Python :: 3.14
|
|
|
17
17
|
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
18
18
|
Classifier: Topic :: Text Processing :: Indexing
|
|
19
19
|
Classifier: Typing :: Typed
|
|
20
|
-
Requires-Dist:
|
|
20
|
+
Requires-Dist: croniter>=6.0.0,<8
|
|
21
21
|
Requires-Dist: jsonschema>=4.26.0,<5
|
|
22
22
|
Requires-Dist: markdown>=3.11,<4
|
|
23
23
|
Requires-Dist: mcp>=2.1.1,<3
|
|
24
24
|
Requires-Dist: pyyaml>=6.0.3,<7
|
|
25
25
|
Requires-Dist: rich>=15.0.0,<16
|
|
26
|
+
Requires-Dist: structlog>=25.0.0,<27
|
|
26
27
|
Requires-Dist: watchfiles>=1.1.0,<2
|
|
27
28
|
Requires-Python: >=3.14
|
|
28
29
|
Project-URL: Changelog, https://fmind.github.io/brain-framework/changelog/
|
|
@@ -40,17 +41,17 @@ Description-Content-Type: text/markdown
|
|
|
40
41
|
/>
|
|
41
42
|
</p>
|
|
42
43
|
|
|
43
|
-
Brain Framework (`bf`) turns a flat folder of human-authored Markdown notes and collected JSON records into a schema-validated, pure-JSON knowledge store (`memories/**/*.json`) that humans and AI agents query offline with `rg
|
|
44
|
+
Brain Framework (`bf`) turns a flat folder of human-authored Markdown notes and collected JSON records into a schema-validated, pure-JSON knowledge store (`memories/**/*.json`) that humans and AI agents query offline with `rg` and `jq` (`bf query`, `bf read`, or `bf mcp`).
|
|
44
45
|
|
|
45
|
-
- **Three formats, one job each.** **YAML for config** (`bf.yaml`, `evals/*.yaml`, note frontmatter), **JSON for records** (`memories/**/*.json
|
|
46
|
+
- **Three formats, one job each.** **YAML for config** (`bf.yaml`, `evals/*.yaml`, note frontmatter), **JSON for records** (`memories/**/*.json`, enforced by `schemas/*.json`, plus `structlog` JSON lines in `logs/*.log`), and **Markdown for humans** (`projects/`, `concepts/`, and `actions/` parsed with [Python-Markdown](https://python-markdown.github.io/) `attr_list` metadata, plus plain Markdown inputs under `prompts/`).
|
|
46
47
|
- **Agents always query JSON.** `bf build` compiles Markdown notes, headings, keyed `attr_list` metadata (`attrs`), links, and open tasks into `memories/{concepts,projects,actions}/*.json`; `bf ingest` writes validated sensor records into `memories/<source>/*.json`.
|
|
47
|
-
- **Minimal, standard-driven core.** Under 4,500 lines of Python delegating retrieval to `rg
|
|
48
|
+
- **Minimal, standard-driven core.** Under 4,500 lines of Python delegating retrieval to `rg` and `jq`, cross-references to relative Markdown paths and standard `bf://` URLs, and orchestration (`timezone`, `env`, `jobs`, `channels`, `services`, `watch`) to `bf.yaml` — with zero custom databases, built-in LLMs, or provider SDKs.
|
|
48
49
|
|
|
49
50
|
[](https://github.com/fmind/brain-framework/actions/workflows/ci.yml) [](https://pypi.org/project/brain-framework/) [](https://pypi.org/project/brain-framework/) [](https://github.com/fmind/brain-framework/blob/main/LICENSE)
|
|
50
51
|
|
|
51
52
|
## Try it
|
|
52
53
|
|
|
53
|
-
Requires Linux or macOS
|
|
54
|
+
Requires Linux or macOS, [uv](https://docs.astral.sh/uv/getting-started/installation/), [ripgrep](https://github.com/BurntSushi/ripgrep) (`rg`), and [jq](https://jqlang.org/) — no model or cloud account needed:
|
|
54
55
|
|
|
55
56
|
```bash
|
|
56
57
|
uv tool install --python 3.14 brain-framework
|
|
@@ -75,13 +76,13 @@ Explore the [four-tool walkthrough](https://github.com/fmind/brain-framework/blo
|
|
|
75
76
|
</a>
|
|
76
77
|
|
|
77
78
|
- **Notes, `attr_list`, & `bf://` URLs ([Authoring](https://fmind.github.io/brain-framework/authoring/)):** Separate volatile TODOs (`projects/`), durable knowledge (`concepts/`), and dated workspaces (`actions/*/ACTION.md`). Attach metadata on headings (`## MCP {#mcp creator=Anthropic}`) and blocks (`{: #summary confidence=high}`), and cross-reference notes or sibling brains with `bf://` URLs.
|
|
78
|
-
- **User schemas, jobs, & live watch ([Operations](https://fmind.github.io/brain-framework/operations/)):** Ship user-owned JSON Schemas in `schemas/`, copy stdlib sensors from [examples/sensors](https://github.com/fmind/brain-framework/tree/main/examples/sensors), and orchestrate schedules, JSON event triggers, channels,
|
|
79
|
-
- **Standard JSON retrieval & MCP ([Retrieval](https://fmind.github.io/brain-framework/retrieval/)):** Resolve `bf://`
|
|
80
|
-
- **Integrity & freshness ([Reference](https://fmind.github.io/brain-framework/reference/)):** `bf validate` checks every schema, link, `#anchor`, and cross-brain `bf://` reference; `bf review` surfaces `newer_evidence`, overdue `stale_after` notes, and open `draft` actions.
|
|
79
|
+
- **User schemas, jobs, & live watch ([Operations](https://fmind.github.io/brain-framework/operations/)):** Ship user-owned JSON Schemas in `schemas/`, copy stdlib sensors from [examples/sensors](https://github.com/fmind/brain-framework/tree/main/examples/sensors), and orchestrate cron/duration schedules, `structlog` JSON logs, event triggers, channels, services, and Rich TUI monitoring via `bf.yaml` (`jobs`, `channels`, `services`, `watch`).
|
|
80
|
+
- **Standard JSON retrieval & MCP ([Retrieval](https://fmind.github.io/brain-framework/retrieval/)):** Resolve `bf://` URLs and `#anchor` sections with `bf read`, search and filter `memories/**/*.json` via `bf query` (`rg`, `jq`), run deterministic `bf eval` checks, or expose read-only tools via `bf mcp`.
|
|
81
|
+
- **Integrity & freshness ([Reference](https://fmind.github.io/brain-framework/reference/)):** `bf validate` checks every schema, compiled-note sync, link, `#anchor`, and cross-brain `bf://` reference; `bf review` surfaces `newer_evidence`, overdue `stale_after` notes, and open `draft` actions.
|
|
81
82
|
|
|
82
83
|
## Good to know
|
|
83
84
|
|
|
84
|
-
1. **Local-first and private.** Zero global config (`--brain` -> `BF_BRAIN` -> enclosing `bf.yaml` -> `DEFAULT_BRAIN_PATH`), `O_NOFOLLOW` path confinement, private `0700` `.bf/` locks/state
|
|
85
|
+
1. **Local-first and private.** Zero global config (`--brain` -> `BF_BRAIN` -> enclosing `bf.yaml` -> `DEFAULT_BRAIN_PATH`), `O_NOFOLLOW` path confinement, and private `0700` `.bf/` locks/state ([Operations](https://fmind.github.io/brain-framework/operations/)).
|
|
85
86
|
2. **Harnesses reason; BF verifies.** Coding agents load the single `/bf` [Agent Skill](https://agentskills.io/specification) from `.agents/skills/bf`, automatically track actions inside a brain (or respond to explicit `/bf` outside), and run `bf build && bf validate && bf eval` ([Example brain](https://github.com/fmind/brain-framework/blob/main/examples/brain/README.md)).
|
|
86
87
|
3. **Git-native collaboration.** Track notes, `bf.yaml`, `evals/`, and `schemas/` in Git while ignoring compiled note JSON files, `logs/`, `actions/`, and `.bf/`.
|
|
87
88
|
|
|
@@ -6,17 +6,17 @@
|
|
|
6
6
|
/>
|
|
7
7
|
</p>
|
|
8
8
|
|
|
9
|
-
Brain Framework (`bf`) turns a flat folder of human-authored Markdown notes and collected JSON records into a schema-validated, pure-JSON knowledge store (`memories/**/*.json`) that humans and AI agents query offline with `rg
|
|
9
|
+
Brain Framework (`bf`) turns a flat folder of human-authored Markdown notes and collected JSON records into a schema-validated, pure-JSON knowledge store (`memories/**/*.json`) that humans and AI agents query offline with `rg` and `jq` (`bf query`, `bf read`, or `bf mcp`).
|
|
10
10
|
|
|
11
|
-
- **Three formats, one job each.** **YAML for config** (`bf.yaml`, `evals/*.yaml`, note frontmatter), **JSON for records** (`memories/**/*.json
|
|
11
|
+
- **Three formats, one job each.** **YAML for config** (`bf.yaml`, `evals/*.yaml`, note frontmatter), **JSON for records** (`memories/**/*.json`, enforced by `schemas/*.json`, plus `structlog` JSON lines in `logs/*.log`), and **Markdown for humans** (`projects/`, `concepts/`, and `actions/` parsed with [Python-Markdown](https://python-markdown.github.io/) `attr_list` metadata, plus plain Markdown inputs under `prompts/`).
|
|
12
12
|
- **Agents always query JSON.** `bf build` compiles Markdown notes, headings, keyed `attr_list` metadata (`attrs`), links, and open tasks into `memories/{concepts,projects,actions}/*.json`; `bf ingest` writes validated sensor records into `memories/<source>/*.json`.
|
|
13
|
-
- **Minimal, standard-driven core.** Under 4,500 lines of Python delegating retrieval to `rg
|
|
13
|
+
- **Minimal, standard-driven core.** Under 4,500 lines of Python delegating retrieval to `rg` and `jq`, cross-references to relative Markdown paths and standard `bf://` URLs, and orchestration (`timezone`, `env`, `jobs`, `channels`, `services`, `watch`) to `bf.yaml` — with zero custom databases, built-in LLMs, or provider SDKs.
|
|
14
14
|
|
|
15
15
|
[](https://github.com/fmind/brain-framework/actions/workflows/ci.yml) [](https://pypi.org/project/brain-framework/) [](https://pypi.org/project/brain-framework/) [](https://github.com/fmind/brain-framework/blob/main/LICENSE)
|
|
16
16
|
|
|
17
17
|
## Try it
|
|
18
18
|
|
|
19
|
-
Requires Linux or macOS
|
|
19
|
+
Requires Linux or macOS, [uv](https://docs.astral.sh/uv/getting-started/installation/), [ripgrep](https://github.com/BurntSushi/ripgrep) (`rg`), and [jq](https://jqlang.org/) — no model or cloud account needed:
|
|
20
20
|
|
|
21
21
|
```bash
|
|
22
22
|
uv tool install --python 3.14 brain-framework
|
|
@@ -41,13 +41,13 @@ Explore the [four-tool walkthrough](https://github.com/fmind/brain-framework/blo
|
|
|
41
41
|
</a>
|
|
42
42
|
|
|
43
43
|
- **Notes, `attr_list`, & `bf://` URLs ([Authoring](https://fmind.github.io/brain-framework/authoring/)):** Separate volatile TODOs (`projects/`), durable knowledge (`concepts/`), and dated workspaces (`actions/*/ACTION.md`). Attach metadata on headings (`## MCP {#mcp creator=Anthropic}`) and blocks (`{: #summary confidence=high}`), and cross-reference notes or sibling brains with `bf://` URLs.
|
|
44
|
-
- **User schemas, jobs, & live watch ([Operations](https://fmind.github.io/brain-framework/operations/)):** Ship user-owned JSON Schemas in `schemas/`, copy stdlib sensors from [examples/sensors](https://github.com/fmind/brain-framework/tree/main/examples/sensors), and orchestrate schedules, JSON event triggers, channels,
|
|
45
|
-
- **Standard JSON retrieval & MCP ([Retrieval](https://fmind.github.io/brain-framework/retrieval/)):** Resolve `bf://`
|
|
46
|
-
- **Integrity & freshness ([Reference](https://fmind.github.io/brain-framework/reference/)):** `bf validate` checks every schema, link, `#anchor`, and cross-brain `bf://` reference; `bf review` surfaces `newer_evidence`, overdue `stale_after` notes, and open `draft` actions.
|
|
44
|
+
- **User schemas, jobs, & live watch ([Operations](https://fmind.github.io/brain-framework/operations/)):** Ship user-owned JSON Schemas in `schemas/`, copy stdlib sensors from [examples/sensors](https://github.com/fmind/brain-framework/tree/main/examples/sensors), and orchestrate cron/duration schedules, `structlog` JSON logs, event triggers, channels, services, and Rich TUI monitoring via `bf.yaml` (`jobs`, `channels`, `services`, `watch`).
|
|
45
|
+
- **Standard JSON retrieval & MCP ([Retrieval](https://fmind.github.io/brain-framework/retrieval/)):** Resolve `bf://` URLs and `#anchor` sections with `bf read`, search and filter `memories/**/*.json` via `bf query` (`rg`, `jq`), run deterministic `bf eval` checks, or expose read-only tools via `bf mcp`.
|
|
46
|
+
- **Integrity & freshness ([Reference](https://fmind.github.io/brain-framework/reference/)):** `bf validate` checks every schema, compiled-note sync, link, `#anchor`, and cross-brain `bf://` reference; `bf review` surfaces `newer_evidence`, overdue `stale_after` notes, and open `draft` actions.
|
|
47
47
|
|
|
48
48
|
## Good to know
|
|
49
49
|
|
|
50
|
-
1. **Local-first and private.** Zero global config (`--brain` -> `BF_BRAIN` -> enclosing `bf.yaml` -> `DEFAULT_BRAIN_PATH`), `O_NOFOLLOW` path confinement, private `0700` `.bf/` locks/state
|
|
50
|
+
1. **Local-first and private.** Zero global config (`--brain` -> `BF_BRAIN` -> enclosing `bf.yaml` -> `DEFAULT_BRAIN_PATH`), `O_NOFOLLOW` path confinement, and private `0700` `.bf/` locks/state ([Operations](https://fmind.github.io/brain-framework/operations/)).
|
|
51
51
|
2. **Harnesses reason; BF verifies.** Coding agents load the single `/bf` [Agent Skill](https://agentskills.io/specification) from `.agents/skills/bf`, automatically track actions inside a brain (or respond to explicit `/bf` outside), and run `bf build && bf validate && bf eval` ([Example brain](https://github.com/fmind/brain-framework/blob/main/examples/brain/README.md)).
|
|
52
52
|
3. **Git-native collaboration.** Track notes, `bf.yaml`, `evals/`, and `schemas/` in Git while ignoring compiled note JSON files, `logs/`, `actions/`, and `.bf/`.
|
|
53
53
|
|