feat(runtime): first-class router-tools executor backend (off-box tool use)#199
Merged
Conversation
…l use)
createExecutor gains `backend: 'router-tools'` — a real agentic loop over the
Tangle router's tool-calling, OFF-BOX (no sandbox, so unaffected by a box's
egress allowlist, #984): each turn passes `tools`; the model's tool_calls run via
the seam's `executeToolCall` on this host and fold back as `tool` messages,
repeating until the model answers or `maxTurns` (one turn = one completion = the
equal-compute unit). The multi-turn capability the single-shot routerInlineExecutor
could not express; `executeToolCall` receives the task so per-task tool surfaces
dispatch correctly. RouterToolsSeam + ToolSpec exported via /loops.
Verified live: createExecutor({backend:'router-tools', tools:[get_weather], …})
called get_weather({city:Paris}), ran the host tool, and answered from the result
in 2 turns. Any adapter that has a tool surface now gets a tool-using off-box
worker for free.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What
createExecutorgainsbackend: 'router-tools'— a real agentic loop over the Tangle router's tool-calling, off-box (no sandbox). Each turn passestools; the model'stool_callsrun via the seam'sexecuteToolCallon this host and fold back astoolmessages, repeating until the model answers ormaxTurns(one turn = one completion = the equal-compute unit vs random@k).This is the multi-turn capability the single-shot
routerInlineExecutorcouldn't express, and it routes around the sandbox→router egress block (#984).executeToolCall(name, args, task)receives the task so per-task tool surfaces (e.g. a gym keyed by task) dispatch correctly.RouterToolsSeam+ToolSpecexported via/loops.Why
The chat-only
routerbackend can't do agentic work (it was the wrong worker for any tool-using domain — e.g. EOPS). This makes the tool-using off-box worker first-class, symmetric with the othercreateExecutorbackends, so any adapter with a tool surface gets it for free.Verified live
createExecutor({backend:'router-tools', tools:[get_weather], …}).execute("weather in Paris?")→ calledget_weather({city:"Paris"}), ran the host tool, answered "The weather in Paris is clear with a temperature of 18°C." in 2 turns.Test
typecheck + build clean (
router-toolsexported indist/loops.d.ts); lint clean; live end-to-end proof above.