Agent usage
kb-artifacts owns deterministic inspection, explicit filtering, selected-evidence
exports, provenance, and atomic output promotion. It does not own source-document
meaning, natural-language interpretation, semantic ranking, arbitrary analysis,
MCP access policy, hydration, or downstream context routing.
Responsibilities
The agent or calling application compiles intent into the documented JSON query schema. The package validates and evaluates that expression without implicit scoring or ranking. No command interprets a natural-language query.
Use this protocol:
corpus listto discover locally approved profile IDs.corpus describeto inspect shape, missingness, identities, and bounds.corpus facetto inspect normalized values.- Construct an explicit
eq/in/contains/exists/gte/lte/regexexpression, composed withall/any/not. corpus countto measure the candidate set.corpus sample --limit Nto inspect deterministic metadata-only candidates.- Refine and repeat.
- Run
selectonly when the governed candidate set is appropriate. - Retain stable record/source references as the bridge to a future authorized hydration layer.
Exploration is not selection, promotion, or publication. Only selected evidence is the durable governed product.
Privacy and bounds
Profile discovery omits configured paths. Samples omit full bodies by default and always have an explicit record limit. Text disclosure requires a bounded excerpt and must also be permitted by the local profile. Local access policy remains outside this package.
Runnable offline example
From the repository root:
python examples/agent/progressive_query.py
The example lists a sanitized profile, describes and facets it, counts and samples a candidate query, refines the expression, and creates a temporary selected-evidence artifact. It is deterministic and performs no network access.
Indexes, caches, embeddings, fuzzy ranking, natural-language planning, MCP servers, and hydration remain intentionally unsupported.