Core thesis
DKG is a deterministic orchestration layer that separates capability from responsibility in AI agents.
It routes queries, selects tools, configures model parameters, and defines execution strategy before the LLM begins reasoning. Every decision is reproducible, inspectable, and ready for cryptographic audit.
Traditional agent frameworks maximize autonomy. DKG maximizes accountability.
Why this matters
Most modern agent frameworks allow an LLM to choose which tools to use, decide whether to search, select its execution strategy, and operate with fixed or loosely tuned generation parameters. This works for consumer applications.
It does not work in high-stakes environments where tool choice must be explainable, search behavior must be enforceable, configuration must be reproducible, and execution must be auditable.
In most systems, routing is an internal LLM decision. Opaque and probabilistic. DKG moves routing outside the model.
What DKG changes
Instead of letting the LLM decide how to operate, DKG embeds the user query once, deterministically activates a hierarchical gate tree via cosine similarity, and produces a configuration object. That object contains: skills to inject, tools to expose, model selection, execution mode, temperature, top_p, top_k, and grounding level.
Only then does the agent begin execution.
The LLM does not choose its tools. The LLM does not choose its temperature. The LLM does not decide whether to search. DKG decides. Transparently and reproducibly.
What DKG is not
DKG is not a new LLM, a training-time alignment system, a compliance policy engine, or a replacement for agent frameworks. It is an orchestration layer that constrains and configures agents dynamically, based on semantic routing.
- Determinism over autonomy. Routing decisions are made by embedding math, not LLM reasoning.
- Routing outside the LLM. The model never sees the full tool inventory. Only what DKG selects.
- Risk-calibrated generation. Temperature, top_k, top_p are set by gate match score, not by default.
- Capability filtering before reasoning. The agent's skill set is narrowed before it starts thinking.
- Audit-ready execution path. Every step from query to response has a cryptographic anchor.
Gate tree
The tree has three concentric levels radiating from the user's prompt at center. The prompt is embedded once. That single vector is compared via cosine similarity against pre-computed gate embeddings at each level. Gates exceeding their threshold activate. Active gates at each level constrain which child gates are evaluated at the next ring.
Level 1 gates classify the domain. Level 2 gates select the skill. Level 3 gates map to concrete tools and LLM configurations. Multiple branches activate simultaneously. The same tool can appear under different branches. DKG deduplicates the final set.
Risk-calibrated generation
Temperature, top_k, and top_p are not fixed settings. They are determined by the embedding similarity score of the best-matching L3 gate. High-confidence match to a verification skill: low temperature, low top_k. Match to a creative writing skill: higher temperature, higher top_p. The agent does not choose its own parameters. DKG sets them based on what the query requires.
The cosine similarity score acts as a continuous signal. The closer the match, the more confidently DKG applies that gate's prescribed configuration. When multiple L3 gates activate, the highest-scoring gate determines the agent's final setup.
The PLANNING gate
Most queries are single-intent. They map to one domain and one execution path. Complex professional work produces multi-step queries that span several domains with sequential dependencies.
The PLANNING gate detects these situations through two mechanisms. First, embedding similarity against multi-intent utterances. Second, an automatic trigger: three or more L1 gates active simultaneously means the query is too complex for a single pass.
When PLANNING activates, the agent decomposes the query into tasks and assigns each task to a specialized subagent. Each subagent receives its own DKG configuration. The gate tree is re-evaluated per subtask. Each executor gets only the skills and tools relevant to its phase.
Execution modes
| Mode | Trigger | Behavior |
|---|---|---|
| DIRECT | 1 gate, >0.85 | Deterministic tool execution. Agent formats the result. |
| AGENT | 1-2 gates, 0.55-0.85 | Autonomous agent with DKG-filtered skills and tools. |
| CONVERSATION | 0 gates active | No skills, no tools. Pure dialogue. |
| PLANNER | PLANNING active | Multi-phase plan. Each phase delegated to subagent with own DKG config. |
DKG switches between these modes per query. No user configuration required.
Hooks and audit trail
Every routing decision and agent action passes through hooks that log to an immutable ledger via HDK. Hooks operate in the application runtime, outside the LLM context. The agent cannot bypass them.
Each agent and subagent has a unique cryptographic identity (see HDK). Every audit record is signed with the acting agent's private key. For any output, you can prove which agent produced it, what configuration it ran, what data it accessed, and when.
Grounding enforcement
The higher the epistemic risk, the lower the agent autonomy.
| Level | Mechanism | Applied to |
|---|---|---|
| NONE | No search requirement | Conversation. Writing from provided data. |
| SOFT | Skill instruction | Agent mode. ~95% effective. |
| MEDIUM | Instruction + guardrail | Research subagents. <3 searches = rejected. |
| HARD | Search is code, not agent decision | Verification. LLM interprets pre-fetched results. |
Cost and scaling
DKG overhead: ~50ms latency, ~$0.0001 per query. Less than 2% of total query time. The token savings from filtered context often exceed the routing cost.
The architecture scales by adding depth. Phase 1: flat router for 6-8 tools. Phase 2: two-level hierarchy at 15+ tools. Phase 3: full three-level tree with PLANNING and subagent dispatch at 30+ tools. The hook chain works identically at every phase.