Skip to content

[codex] Add Tiny Local tool-use profile#1719

Merged
3clyp50 merged 2 commits into
agent0ai:readyfrom
TerminallyLazy:codex/tiny-local-tool-use
Jun 24, 2026
Merged

[codex] Add Tiny Local tool-use profile#1719
3clyp50 merged 2 commits into
agent0ai:readyfrom
TerminallyLazy:codex/tiny-local-tool-use

Conversation

@TerminallyLazy

Copy link
Copy Markdown
Contributor

Summary

  • Add a bundled Tiny Local profile with a minimal action-first JSON/tool-use contract for small local models.
  • Document the same contract as a project-scoped Prompt Include recipe in docs/guides/local-model-tool-use.md.
  • Tighten Tiny Local tool prompts for code_execution_tool, text_editor, and response so qwen-sized models avoid visible reasoning, repeated writes, and continuation-status loops.
  • Fix the bundled Editor/Text Editor plugin handoff so open_in_canvas: true Markdown writes actually open the changed file in the Editor canvas.

Why

PR #1714 was doing too much in core framework/runtime code. This branch keeps the replacement on prompt/profile/plugin surfaces unless later evidence proves deeper framework changes are required.

The local-model failure modes reproduced with qwen3.5:9b were:

  • models narrating or promising the next step instead of using tools,
  • continuation messages like excellent proceed / okay continue producing duplicate status responses,
  • Markdown writes setting open_in_canvas: true in the tool result while the Editor canvas stayed on its empty start state.

Core-code audit

No core framework code is changed in this branch.

I explicitly checked the staged diff for core paths with:

git diff --cached --name-only | rg '^(agent\.py|initialize\.py|helpers/|models\.py|api/|extensions/|tools/|webui/|prompts/|knowledge/|lib/|scripts/|conf/|docker/)'

That command returned no matches before commit.

The staged files are limited to:

  • agents/ profile files and profile DOX,
  • docs/guides/ user documentation,
  • bundled plugin files under plugins/_editor and plugins/_text_editor,
  • focused tests.

Plugin-code explanation

This branch does include bundled plugin code changes, but not core Agent Zero framework/runtime changes.

plugins/_text_editor/tools/text_editor.py now includes the active agent context id in write/patch result metadata when available. This lets UI consumers know which chat context produced a Markdown file update.

plugins/_editor/extensions/webui/set_messages_after_loop/sync-text-editor-results.js now:

  • preserves context_id / ctxid from text-editor results,
  • allows explicit fresh open_in_canvas: true results to open the Editor even on the first rendered chat turn,
  • keeps the old guard for passive refresh-only syncs when the chat history is initially empty.

plugins/_editor/webui/editor-store.js now honors an explicit context id passed by the tool-result handoff instead of always falling back to the currently selected UI context.

These plugin changes are what make Create and open a TODO.md list in the Canvas. actually open TODO.md in the right Editor canvas after the text-editor write succeeds.

Validation

  • git diff --cached --check
  • python3 -m py_compile tests/test_default_prompt_budget.py tests/test_tool_action_contracts.py tests/test_text_editor_context_patch.py tests/test_office_canvas_setup.py plugins/_text_editor/tools/text_editor.py
  • node --check plugins/_editor/extensions/webui/set_messages_after_loop/sync-text-editor-results.js
  • node --check plugins/_editor/webui/editor-store.js
  • ruby -e 'require "yaml"; p YAML.load_file("agents/tiny-local/agent.yaml")'
  • Manual live WebUI smoke with qwen3.5:9b + Tiny Local: Create and open a TODO.md list in the Canvas. wrote TODO.md and opened it in the Editor canvas.
  • Direct qwen3.5:9b continuation smokes: excellent proceed and okay continue emitted code_execution_tool instead of duplicate response status text.

Full pytest was not run because the current host/container test environments are missing required test dependencies (tiktoken/litellm on host, pytest in the container).

@3clyp50 3clyp50 merged commit 1a43bfe into agent0ai:ready Jun 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants