In LLM agent development practice, deterministic execution paths in the loop (for example, multi-step tool orchestration, state maintenance, and intermediate data flow) are often completed by the model making calls one step at a time. This not only consumes large amounts of tokens but also exposes intermediate data to the model context. Agent JIT is a DeepSeek Harness plugin that compiles these deterministic paths into restricted DSL programs and executes them directly. It takes back control of “how data flows” from the model, leaving the Agent solely in the role of planner, while the compiler and runtime take over the execution layer.
Core Features¶
The core capability of Agent JIT is to separate mechanical execution logic from the Agent Loop.
1. Deterministic Path Compilation¶
The plugin compiles execution paths already determined in the Agent Loop into restricted DSL programs. These programs are executed deterministically through a schema-validated graph runtime, without requiring the model to reason about each step one by one.
2. Tool Adapter Contract¶
agent-jit/adapter provides a minimal tool adapter contract that is independent of any specific Harness. It supports a synchronous live view of the tool catalog: each call to catalog or listTools reads the tools currently visible to the host, rather than a snapshot from initialization. This means dynamically registered or uninstalled tools are immediately reflected in query results.
3. DSH Meta-Tools and Adapter¶
The plugin registers two meta-tools with the Harness:
* jit_describe_tools: Describes tools as deterministic functional contracts.
* jit_execute_program: Compiles and executes DSL source code.
At the same time, the plugin provides the official bridge agent-jit/dsh, allowing users to directly use these features in the DSH environment.
4. Experiment Mode and Tool Discovery¶
By default, the plugin registers only meta-tools and does not register experimental business tools. By configuring experimentMode: true, experimental tools (such as github_*, crm_*, etc.) can be enabled. Host tools (via hostDiscovery) are discovered and registered automatically, supporting “describe and use immediately.”
Installation and Enablement¶
As a DeepSeek Harness bundle, Agent JIT provides prebuilt artifacts, and the installation process requires no build authorization.
1. Install the Plugin
It is recommended to install it into the web profile via npm:
dsh plugin --profile web add agent-jit
Or install directly from GitHub:
dsh plugin --profile web add github:sybolization/agent-jit
2. Verify Installation
After installation, it is loaded automatically when starting dsh web. You can verify whether the configuration includes agent-jit-dsl by using the following command:
dsh web --dump-config
3. Profiles and Dependencies
- The plugin supports installation into the
webprofile,headlessprofile, or a custom profile. - DSH is marked as an
optionalpeer dependency. This means that if you are only usingagent-jit/adapterfor custom harness development, you do not need to install DSH; however, once you importagent-jit/dsh, the host must provide compatible Cordis, DSH Tools, and DSH LLM.
Typical Usage¶
The DSL syntax adopts a functional programming style, aiming to simplify deterministic data flow.
Example: Search repositories and get details
repos = github.search_repositories(query="dsl", limit=5)
details = map(repos, github.get_repository(full_name=_.full_name))
active = filter(details, archived=false)
top = take(active, 3)
return top
Example: File operations and result collection
files = glob(pattern="src/**/*.ts")
top = take(files.paths, 3)
hits = web_search(query="dsh plugin")
proof = bash(command="git log --oneline -1", description="验证")
both = collect(hits, proof)
return both
Through this approach, iterative calls that traditionally required 11 model round trips can now be completed in a single call to jit_execute_program.
Configuration Notes¶
The plugin supports inline patches through a configuration file to control its behavior.
Key configuration items:
experimentMode: false(default): In production, experimental business tools (such asgithub_*, etc.) are not registered by default, leaving only meta-tools. Setting it totrueenables experimental tools.dsl.systemPrompt: false(default): In production, the DSL system prompt is not injected by default; routing relies onroutingPrompt: tool-embeddedin the tool descriptions.dsl.describeTools: true: Controls whether to registerjit_describe_tools.dsl.routingPrompt: tool-embedded: Tool descriptions include the trigger and a neutral DSL manual.
About the adapter:
agent-jit/adapter is currently an experimental API. It defines the host boundary, including a synchronous catalog interface and an asynchronous execution interface, making it suitable for reusing tool registration and nested call logic in custom harnesses.
Considerations¶
- Permission Scope: The plugin runs with the permissions of the current DSH process. Before installation, you should review the repository source code and license.
- Tool Discovery: Host tools are automatically discovered through the
hostDiscoverylive view and can be orchestrated in DSL without manual registration. - Ecosystem Independence: This plugin is listed in the DeepSeek community catalog and has no official affiliation with DeepSeek / High-Flyer.
Summary¶
By offloading deterministic execution logic from the LLM Loop to the compiler and runtime, Agent JIT significantly reduces token consumption, round trips, and context exposure. It preserves the flexibility of the LLM as a planner while making mechanical execution steps efficient and deterministic.