by CodeSoul-co
Harness-oriented agent system framework for production-grade LLM agent applications
# Add to your Claude Code skills
git clone https://github.com/CodeSoul-co/HyphaHypha is an open-source ai agents skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by CodeSoul-co. Harness-oriented agent system framework for production-grade LLM agent applications. It has 452 GitHub stars.
Hypha's catalog security scan is still queued. You can run an instant dependency and prompt-injection check now with the "Scan for vulnerabilities" button above.
Clone the repository with "git clone https://github.com/CodeSoul-co/Hypha" and add it to your Claude Code skills directory (see the Installation section above).
Hypha is primarily written in TypeScript. It is open-source under CodeSoul-co on GitHub, so you can review or fork the full source.
Yes. AgentsLLM lists many other AI Agents skills you can browse and compare side by side. Open the AI Agents category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh Hypha against similar tools.
No comments yet. Be the first to share your thoughts!
Unlocks once the catalog security scan passes (runs nightly).
The deep catalog scan for this skill is still queued. Run an instant dependency check now instead.
@codesoul-co/hypha-*. The versioned user guide
hypha is an open-source TypeScript framework built around two cooperating layers: an Agent Core and a Production Harness. The Agent Core handles reasoning/ReAct, planning, tool selection, Memory access, and model/context orchestration; the Production Harness turns those decisions into bounded, event-backed execution with FSM control, policy/approval, checkpoints, recovery, replay, and audit.
Product-specific behavior is declared through a DomainPack, not hard-coded into the runtime. A
DomainPack compiles tasks, workflows, capabilities, prompts, Memory, policy, evaluation, and output
contracts into the shared Core + Harness. A cross-cutting Cache & Reuse Plane then reuses
validated work across reasoning, tools, Memory, execution, and inference while remaining a disposable
projection: cache state can accelerate execution, but it can never become authority or replace Event,
Artifact, receipt, or checkpoint evidence.
| Layer | Primary responsibility |
|---|---|
| Agent Core | Reasoning/ReAct, planning, tool selection, Memory access, model and context orchestration. |
| Production Harness | FSM execution, Event/checkpoint control, policy/approval, continuation, recovery, audit, and replay. |
| DomainPack | Declares the product-specific task, workflow, capability, Memory, Skill, Prompt, Policy, evaluation, and output contracts compiled into the shared runtime. |
| Cache & Reuse Plane | Reuses validated model work, reasoning structures, tool/execution results, Memory/context projections, and prefix/KV state without becoming a source of truth or authority. |
This separation is what lets the same runtime support very different agent products. A coding agent, finance agent, legal agent, or research agent can share the same Core + Harness while changing the DomainPack, capability bindings, policies, evaluation contracts, and domain-specific state.
Cache is a first-class control plane in hypha, not a single response-cache feature. The system distinguishes several reuse layers because an exact LLM response, a reasoning subgraph, a tool result, a Memory projection, and a KV prefix have different validity and invalidation requirements.
| Cache layer | Reusable unit | Typical validity boundary |
|---|---|---|
| Serving Cache | Exact normalized model response | Model/provider identity, normalized request, scope, TTL, and response validity. |
| Thinking Cache | Reasoning node, path, or reusable subgraph | Model/provider, reasoning strategy/version, prompt blocks, tool schema, inference parameters, and scope. |
| WorkCache | Event-derived typed agent work | Source-event provenance, dependency/revision closure, scope, validity state, and future demand. |
| Tool / Execution Cache | Eligible read-only tool results or deterministic execution results | Capability revision, Policy, external-state evidence, workspace/environment snapshot, idempotency, and scope. |
| Memory / Context Cache | Memory search and assembled context projections | Memory scope, mutation generation, source revision, provenance, and context policy. |
| Prefix / KV Cache | Prompt-prefix blocks, provider prefixes, or backend KV segments | Model/backend, Agent/Session/Domain scope, prompt dependencies, and prefix/KV revision. |
A cache tree uses a typed root to partition reusable artifacts, compact parent nodes to route lookups by hash prefix, and full logical keys at the leaves. New leaves can be inserted without rebuilding unrelated branches, while stale leaves can be invalidated locally; the physical tree is therefore a lookup structure, while Event and Artifact evidence remain the source of truth.
WorkCache extends that lookup pattern into semantic cache trees for agent execution:
| Semantic tree | What it reuses |
|---|---|
PlanTree |
Plans, plan branches, and reusable planning artifacts. |
ComputationTree |
Reasoning/computation nodes and derived work; also the natural backing plane for Thinking Cache. |
ToolTree |
Eligible tool-call results and their provenance/validity metadata. |
ObservationTree |
Reusable observations tied to source evidence and scope. |
VerificationTree |
Verification, checking, and output-validation work. |
MemoryTree |
Memory-derived projections whose validity follows Memory mutation generations and scope. |
RecoveryTree |
Recovery knowledge keyed by failure context and relevant runtime revisions; hits are advisory and must be revalidated. |
PromptPrefixTree |
Stable prompt blocks and prefix materialization used by provider/backend prefix reuse. |
The central invariant is reuse without authority. A hit may avoid recomputation, but it cannot authorize a Tool, skip Policy or Approval, fabricate a receipt, advance the FSM, or replace Event and Artifact evidence. Cache lookup, validation, invalidation, and bypass are therefore part of runtime control rather than hidden implementation details.
The latest three-way comparison was run against Hypha main@ef33263 with one trial per task
(385 tasks total). The base model was deepseek-v4-flash. Hypha is the framework result and
Direct is the direct model-call baseline. Neither arm reported a system error.
| Benchmark | Tasks | Hypha | Direct |
|---|---|---|---|
| Mock | 10 | 0.800 (8/10) | 0.800 (8/10) |
| Airline | 50 | 0.880 (44/50) | 0.900 (45/50) |
| Retail | 114 | 0.912 (104/114) | 0.895 (102/114) |
| Telecom | 114 | 0.605 (69/114) | 0.588 (67/114) |
| Banking knowledge | 97 | 0.206 (20/97) | 0.196 (19/97) |
| Total | 385 | 0.636 (245/385) | 0.626 (241/385) |
| Concept | Responsibility |
|---|---|
DomainPack |
De |