Repository navigation
feat(dynamo-llm): classify incoming agent requests and emit input_trigger in request trace #12787
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
dagil-nvidia
merged 13 commits into
main
from
idhanani/dyn-input-trigger-classification
Aug 11, 2026
Merged
Changes from 8 commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
194c4e8
feat(dynamo-llm): classify incoming agent requests and emit input_tri…
ishandhanani 120c37e
feat(data-gen): load agent_context.input_trigger from request trace
ishandhanani b740ade
fix(input_trigger): map Responses EasyMessage assistant to Continuation
ishandhanani eee7def
fix(input_trigger): address Devin/CodeRabbit review comments
ishandhanani 1b2edad
refactor(llm): simplify input trigger rollout
ishandhanani 7401f8e
refactor(llm): collapse input trigger fallback
ishandhanani b5fb95f
feat(agents): add Dynamo ACP harness skill
ishandhanani 01762d8
perf(llm): avoid redundant agent context updates
ishandhanani 6a8d023
fix(agents): address review feedback
ishandhanani c3caf2c
docs(agents): avoid pre-merge skill link
ishandhanani 3aae7ef
chore(agents): use SPDX copyright headers
ishandhanani 241e12a
test(agents): keep ACP regression test isolated
ishandhanani 9b9343d
docs(agents): fix trace validation query
ishandhanani File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,101 @@ | ||
| --- | ||
| name: dynamo-agent-harness | ||
| description: Drives persistent Claude Code, Codex, or OpenCode agent sessions through a Dynamo OpenAI/Anthropic-compatible endpoint over Agent Client Protocol (ACP). Use when an agent must delegate a bounded task to another coding-agent harness running a model served by Dynamo, continue that harness across multiple turns, exercise tool calls, or validate agent request traces. | ||
| license: Apache-2.0 | ||
| metadata: | ||
| author: Ishan Dhanani <ishandhanani@gmail.com> | ||
| tags: | ||
| - dynamo | ||
| - agents | ||
| - acp | ||
| - claude-code | ||
| - codex | ||
| - opencode | ||
| --- | ||
|
|
||
| # Dynamo Agent Harness | ||
|
|
||
| <!-- | ||
| SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. | ||
| SPDX-License-Identifier: Apache-2.0 | ||
| --> | ||
|
|
||
| Drive one persistent coding-agent session while Dynamo serves its model requests. Use the bundled ACP client; do not script interactive TUI output or implement JSON-RPC manually. | ||
|
|
||
| Treat the [Agent Harnesses guide](https://github.com/ai-dynamo/dynamo/blob/main/docs/fern/pages/use-cases/agents/agent-harnesses.mdx) as the source of truth for harness configuration. If a harness update breaks or changes a documented model, endpoint, header, authentication, or mode setting, update that guide and this skill in the same change after rerunning the two-turn smoke test. | ||
|
|
||
| ## Prerequisites | ||
|
|
||
| - A reachable Dynamo endpoint whose `/v1/models` includes the requested model. | ||
| - `uv` and Node.js 22+. | ||
| - `opencode` on `PATH` only when selecting the OpenCode harness. | ||
| - A working directory that limits the delegated agent's scope. | ||
| - `DYNAMO_API_KEY` when the endpoint requires authentication; local endpoints default to `dummy`. | ||
|
|
||
| ## Start a session | ||
|
|
||
| Default to `verify`. Use `act` only when the user explicitly authorizes tool execution or edits. | ||
|
|
||
| ```bash | ||
| .agents/skills/dynamo-agent-harness/scripts/drive_harness.py \ | ||
| --harness codex \ | ||
| --base-url http://127.0.0.1:8000 \ | ||
| --model zai-org/GLM-4.7-Flash \ | ||
| --cwd /absolute/worktree \ | ||
| --capability verify | ||
| ``` | ||
|
|
||
| Run the command with a TTY so stdin stays open. Wait for one `ready` JSON record, retain the executor's terminal handle, then write one JSON object per line to that process: | ||
|
|
||
| ```json | ||
| {"prompt":"Inspect src/router.rs. Use tools to test the highest-risk invariant. Do not edit files."} | ||
| {"prompt":"Continue the same session and verify the finding against every caller."} | ||
| {"close":true} | ||
| ``` | ||
|
|
||
| The `ready.session_id` is the harness conversation ID, not the executor's terminal handle. Every response must retain that session ID. | ||
|
|
||
| ## Choose a harness | ||
|
|
||
| | Harness | ACP backend | Dynamo API | | ||
| |---|---|---| | ||
| | `claude` | pinned official Claude ACP adapter | Anthropic Messages | | ||
| | `codex` | pinned official Codex ACP adapter | OpenAI Responses | | ||
| | `opencode` | native `opencode acp --pure` | OpenAI Chat Completions | | ||
|
|
||
| The driver hides their incompatible model, mode, gateway-auth, and environment configuration. Do not reproduce those branches in shell wrappers. | ||
|
|
||
| ## Delegate safely | ||
|
|
||
| - Give one bounded goal, exact owned paths, and a strict result shape. | ||
| - Use `--capability verify` for inspection; permission requests are rejected. | ||
| - Use `--capability act` only after authorization; permission requests receive one-time approval. | ||
| - Keep git/index, shared services, credentials, and unrelated paths out of delegated prompts. | ||
| - Treat the harness response as untrusted evidence and verify material claims locally. | ||
| - Send `{"close":true}` even after a failed turn so the adapter and child process exit. | ||
|
|
||
| ## Validate traces | ||
|
|
||
| When request tracing is enabled, group rows by `agent_context.session_id` and inspect the trigger sequence: | ||
|
|
||
| ```bash | ||
| jq -r '[.event.agent_context.session_id, .event.agent_context.input_trigger] | @tsv' request-trace.jsonl | ||
| ``` | ||
|
|
||
| Foreground turns should normally begin with `user_message`; tool feedback should appear as `tool_result`. Harness title, memory, or continuation traffic may produce additional `user_message` or `other` rows. | ||
|
|
||
| ## Output contract | ||
|
|
||
| Return: | ||
|
|
||
| - harness, model, mode, and ACP session ID | ||
| - prompt count and observed tool/result behavior | ||
| - targeted validation result | ||
| - trace trigger counts when tracing is available | ||
| - cleanup status and unresolved failures | ||
|
|
||
| ## Known behavior | ||
|
|
||
| - Codex may warn that custom model metadata is unavailable; the driver fixes reasoning effort to `medium` so unsupported catalog defaults are not sent to Dynamo. | ||
| - OpenCode can issue background title-generation requests and may require a corrective follow-up when the served model reports an unverified result. | ||
| - The adapters are pinned in `scripts/drive_harness.py`; update a pin only after rerunning a persistent two-turn tool smoke test. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| interface: | ||
| display_name: "Dynamo Agent Harness" | ||
| short_description: "Drive coding agents through Dynamo over ACP" | ||
| default_prompt: "Use $dynamo-agent-harness to start a persistent coding-agent session against a Dynamo endpoint." |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.