Load-bearing joinery for LLM content pipelines: context injection, validated repair loops, deterministic replay, DAG orchestration.
Project description
kigumi (木組)
English | 中文
Nail-free interlocking joinery. The load-bearing structural layer for LLM content pipelines — connecting your project (the roof) to the model (the pillars) through precise joints: output that does not fit the mortise gets sent back for rework.
A foundation for building LLM pipelines with coding agents:
- Injection and assembly: a single entry point for material injection, strict template rendering, format sections auto-generated from schemas
- Repair loop: failed validation turns into corrective instructions, model context is preserved, retries are bounded, lessons are locked in
- Deterministic replay: content-addressed caching — same input, byte-identical output
- DAG orchestration (optional): explicit node/item cache policy, static reusable subgraphs, dynamic map/scan, owned materialized outputs, human checkpoints, and run diffs
- Three guard rings: runtime refusal / pytest auto-collection / git hooks, so the rules enforce themselves
Quick start
from pathlib import Path
from pydantic import BaseModel
from kigumi import LiteLLMTransport, LLMCaller, call_validated
class Verdict(BaseModel):
score: int
reason: str
transport = LiteLLMTransport(aliases={"default": "anthropic/claude-sonnet-5"})
caller = LLMCaller(transport, cache_dir=Path("artifacts/_llm"), seed=20260713)
verdict = call_validated(caller, "Score this opening scene and explain why: ...", Verdict)
call_validated automatically appends a format section generated from
Verdict; a response that does not fit is sent back with the validation
errors for a bounded number of retries (2 by default). The whole exchange
lands in a content-addressed cache, so the same input replays byte-for-byte
with no further API cost.
Status
0.2.0, API not frozen. All four core layers are in place, with 336 tests passed and 1 skipped, refined through three clean-room pilots (structured extraction / multimodal / DAG orchestration).
Install
uv add "kigumi[litellm]"
Without the litellm extra you can use StdlibTransport (pure-stdlib HTTP)
or implement your own transport.
Documentation map
Documentation is currently written in Chinese.
| Document | The question it answers |
|---|---|
| DESIGN.md | Why it is designed this way; layers, boundaries, settled trade-offs |
| docs/adoption.md | How to adopt it; the path from a single caller to a DAG, plus troubleshooting |
| docs/contracts/ | Which behaviors are promises; invariants, failure behavior, verification coordinates |
| docs/reviews/ | What a review found at a point in time; descriptive records, not specs |
| CHANGELOG.md | What changed; cache-family rotations and breaking changes are always recorded |
| AGENTS.md | What an agent reads before entering; red lines and verification commands |
License
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file kigumi-0.2.0.tar.gz.
File metadata
- Download URL: kigumi-0.2.0.tar.gz
- Upload date:
- Size: 179.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a1240d810c567d7c617674a2273353d980495d277106ed6c3edd85e933a7e5b4
|
|
| MD5 |
905bfc2deba16ead71321e7b37260cb0
|
|
| BLAKE2b-256 |
e52873d0b1fa87629ebb0b9d4d3e338b888cf08734dbfb558f8ba3c77523e47e
|
Provenance
The following attestation bundles were made for kigumi-0.2.0.tar.gz:
Publisher:
release.yml on Oxidane-bot/kigumi
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
kigumi-0.2.0.tar.gz -
Subject digest:
a1240d810c567d7c617674a2273353d980495d277106ed6c3edd85e933a7e5b4 - Sigstore transparency entry: 2164312757
- Sigstore integration time:
-
Permalink:
Oxidane-bot/kigumi@e0f3ee60f74e2e13dc95260eb6a084d73ca5a07f -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/Oxidane-bot
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@e0f3ee60f74e2e13dc95260eb6a084d73ca5a07f -
Trigger Event:
push
-
Statement type:
File details
Details for the file kigumi-0.2.0-py3-none-any.whl.
File metadata
- Download URL: kigumi-0.2.0-py3-none-any.whl
- Upload date:
- Size: 88.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
19113f82dec60855ad17465341d1b078b4e9fc7eb7f5c6c8d8dde42c141f32f7
|
|
| MD5 |
1d4bec3daa3d984601156dcaa561b5c9
|
|
| BLAKE2b-256 |
dc92c7ed013de455b10ac49cb3c30e4f14a7953d2a21aeb074844b8dab164fc9
|
Provenance
The following attestation bundles were made for kigumi-0.2.0-py3-none-any.whl:
Publisher:
release.yml on Oxidane-bot/kigumi
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
kigumi-0.2.0-py3-none-any.whl -
Subject digest:
19113f82dec60855ad17465341d1b078b4e9fc7eb7f5c6c8d8dde42c141f32f7 - Sigstore transparency entry: 2164312780
- Sigstore integration time:
-
Permalink:
Oxidane-bot/kigumi@e0f3ee60f74e2e13dc95260eb6a084d73ca5a07f -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/Oxidane-bot
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@e0f3ee60f74e2e13dc95260eb6a084d73ca5a07f -
Trigger Event:
push
-
Statement type: