Skip to main content

Load-bearing joinery for LLM content pipelines: context injection, validated repair loops, deterministic replay, DAG orchestration.

Project description

kigumi logo

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): per-node caching, dynamic fan-out, human checkpoints, 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.1.0, API not frozen. All four core layers are in place, with 278 tests, refined through three clean-room pilots (structured extraction / multimodal / DAG orchestration). Not yet published to PyPI.

Install

Until the PyPI release, install from Git:

uv add "kigumi[litellm] @ git+https://github.com/Oxidane-bot/kigumi"

After release: 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

MIT

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

kigumi-0.1.0.tar.gz (156.8 kB view details)

Uploaded Source

Built Distribution

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

kigumi-0.1.0-py3-none-any.whl (81.5 kB view details)

Uploaded Python 3

File details

Details for the file kigumi-0.1.0.tar.gz.

File metadata

  • Download URL: kigumi-0.1.0.tar.gz
  • Upload date:
  • Size: 156.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for kigumi-0.1.0.tar.gz
Algorithm Hash digest
SHA256 e789b9db3d33bd7df6a92bb4650d6807342ca24342c0a721535e1a04a8a1e6f2
MD5 99338f93c91557d032bec7387e01893e
BLAKE2b-256 428f739bff80db516b915cb59276a1f9b8a116afe5e734cd7aba68ed64d14d82

See more details on using hashes here.

Provenance

The following attestation bundles were made for kigumi-0.1.0.tar.gz:

Publisher: release.yml on Oxidane-bot/kigumi

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

File details

Details for the file kigumi-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: kigumi-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 81.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for kigumi-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 28f5c51237c280b83c309c05a50cfaf4c56b89bfdc0dc1cb5d09924b23bdb7c7
MD5 17af23e32a315df2061bfe3ef1e7f84a
BLAKE2b-256 a60323f1be34ae9eeff2ede59909eadbb17cb13fc9325820a93e8ed87106e2f0

See more details on using hashes here.

Provenance

The following attestation bundles were made for kigumi-0.1.0-py3-none-any.whl:

Publisher: release.yml on Oxidane-bot/kigumi

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

Supported by

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