Building reusable AI systems
A single agent with a hardcoded prompt works until a second agent needs the same behavior, slightly adapted, and a third needs it again with the adaptation the second one made. At that point the question isn't "what should this prompt say" anymore — it's "where does this behavior live, and how do all three agents stay in sync with it."
Treating it as a dependency answers that:
import heepx
planning = heepx.learn("planning")
verify = heepx.learn("verify")
plan = run_agent(planning, task="ship the v0.2 release")
checked = run_agent(verify, task=plan)
Each agent in a pipeline learns exactly the capability it needs, at a
version it can pin, from a cache shared across every agent on the same
machine — a second agent's hx learn planning is a cache hit, not a
second download. If planning gets a new version, every caller finds out
the same way a Python project finds out about a new library release:
deliberately, via hx update, not by someone editing a string in three
places and hoping they matched.
The CLI matters here as much as the client: hx learn planning is a plain
subprocess call, so an orchestration layer written in any language — not
just Python — can pull the same capability, from the same cache, verified
the same way. See Examples for what that looks like from
JavaScript, Go, and Rust.