Deterministic event-sourced kernel for modular LLM automation.
LLM ingress -> strict events -> deterministic module policy/planner/executor -> append-only JSONL
- A kernel that enforces deterministic invariants (schema, lineage, provenance, idempotency).
- A module system where third parties implement domain logic.
- A self-serve workflow to scaffold and validate modules without maintainer support.
- LLM only emits
IntentNormalized(module_id=kernel.ingress). - Side effects run only in deterministic workers.
- Mandatory lineage:
IntentNormalized -> IntentAccepted/Rejected -> ActionProposed -> ActionOutcome. ActionProposed.action_idmust be allowlisted.actorauthority andmodule_idprovenance are validated.
src/event_pipeline.py: CLI orchestratorsrc/jsonllm_kernel/contracts.py: event/config contractssrc/jsonllm_kernel/module_api.py: module SDK (BaseModule, types)src/jsonllm_kernel/module_loader.py:module.tomlloader/validatorsrc/jsonllm_kernel/scaffold.py: module scaffolding templatessrc/jsonllm_kernel/conformance.py: module conformance suitesrc/jsonllm_kernel/project_init.py: workspace bootstrap from packaged templatessrc/jsonllm_kernel/templates/: packaged default catalog and modulesmodules/: example modulescatalog/: allowlist + security configs
python3 -m pip install -r requirements.txt
export OPENAI_API_KEY="your_key"Or install as package/CLI:
python3 -m pip install -e .
jsonllm --helpmkdir /tmp/my-jsonllm-workspace
jsonllm init-project /tmp/my-jsonllm-workspace
jsonllm --workspace /tmp/my-jsonllm-workspace list-modules--workspace (or env JSONLLM_WORKSPACE) controls where catalog/, modules/, and data/ are read/written.
jsonllm --workspace /path/to/workspace list-modules
jsonllm --workspace /path/to/workspace init-module my_domain
jsonllm --workspace /path/to/workspace test-module --module-id my_domain
jsonllm --workspace /path/to/workspace new-intent --request-text "..." --aggregate-id req-1
jsonllm --workspace /path/to/workspace run-policy
jsonllm --workspace /path/to/workspace run-planner
jsonllm --workspace /path/to/workspace run-executorEquivalent while developing in this repo:
python3 src/event_pipeline.py --workspace . list-modules- Scaffold module:
jsonllm --workspace /path/to/workspace init-module my_domain- Implement
policy/plan/executeinmodules/my_domain/module.py. - Update
modules/my_domain/module.toml(intents/actions/permissions). - Ensure actions are in
catalog/allowed-actions.json. - Run conformance:
jsonllm --workspace /path/to/workspace test-module --module-id my_domain- Run end-to-end pipeline.
- Module API version is declared by
module_api_versioninmodule.toml. - Loader rejects incompatible module API versions.
- See:
docs/MODULE_COMPATIBILITY.mddocs/MODULE_COOKBOOK.md
modules/core_builtin: generic routes for search/extraction/classification.modules/math_sum: tangible deterministic computation (math.sum.v1) writing outputs todata/outputs/.