Repository navigation
feat(tool-search): bump tinyagents and expose per-session discovery options - #710
Merged
Merged
Conversation
Takes tool sizes on ToolCompleted/TurnObservation::Tool and the discovery policy options (promote, compact, collapse, tool_call repair). The tool completion test literals gain input_bytes: None. Co-authored-by: Medulla <medulla@tinyhumans.ai>
Adds promote_found_tools, compact_search_results, collapse_search_results, repair_tool_call_wrapper and max_limit to [agent].tool_search (with env overrides), mapped onto the harness ToolDiscoveryPolicy. A session takes the four prompt-shaping options from the config when it creates a thread, records them on the thread's first transcript row when they differ from today's, and reads them back on resume, so a thread keeps the behaviour it started with. openhuman-embed gains AgentSpec::tool_discovery and Turn::tool_discovery (ToolDiscoveryOptions) and documents the tool sizes on observations. Co-authored-by: Medulla <medulla@tinyhumans.ai>
This was referenced Nov 7, 2026
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.
Closes #705
Part of tinyhumansai/chottu-core#712
What changed
vendor/tinyagentsto senamakel/tinyagentsepic/712-tool-tokenstip3611644ff([tinyagents-slim] delete: agent teams (runtime,agent_team.*RPC, e2e spec) #197 tool sizes, [tinyagents-slim] delete: graph workflow runs (workflow_run.*, planner/critic, topology endpoint) — tinyflows untouched #198-[tinyagents-slim] delete: sync and graph delegation (delegate_graph,delegate,agent_work.*, fleet tools) #200 discovery options). The tinyagentsCargo.tomlfiles are unchanged across the bump, so the[patch]tables need no re-copy. TheToolCompletedtest literals gaininput_bytes: None.[agent.tool_search]gainsmax_limit(20),promote_found_tools(true),compact_search_results(false),collapse_search_results(false),repair_tool_call_wrapper(true), withOPENHUMAN_TOOL_SEARCH_*env overrides.discovery_policy()maps them ontoToolDiscoveryPolicy; defaults are today's behaviour.RunConfig::discovery(all four fields, so the process-wide policy never leaks in) and, when they differ from today's, records them on the thread's first fresh transcript row (extra_metadata.tool_discovery). Every other turn reads them back from the transcript; a thread with no record keeps today's behaviour. Code:agent/tinyagents/discovery/pin.rs,session_host/runtime_session/ensure.rs,session_host/codec.rs.ToolDiscoveryOptions(re-export of coreDiscoveryOptions;TODAY= defaults),AgentSpec::tool_discovery(..)(agent default for new threads) andTurn::tool_discovery(..)(for the thread this turn creates; ignored on an existing thread).TurnObservation::Tool.input_bytes/output_bytesreach hosts through the existingobservere-export (embed test +OBSERVERS.md); the tool-completion projection logs both.docs/gitbooks/en/developing/jev.md,tinyagents/README.md.TinyJuice / tool_search (report only, not changed here)
ToolOutputMiddlewaredoes not exempttool_search:is_compaction_exempt/is_truncation_exemptcover proposal tools, sampling tools,mcp_list_*and the REPL tools only. Atool_searchresult is therefore subject to tokenjuice tabulation, the payload summariser and the char / byte-budget cap before it is stored, so the harness'scollapse_search_results(which only rewrites results still in the bridge's own format) can miss it. AddingTOOL_SEARCH_NAMEtoDISCOVERY_TOOLSis the fix; I wrote and verified that change (red test, then green) and then reverted it on instruction. It is a one-line follow-up.Gates (in vendor/openhuman)
cargo fmt --all -- --check: pass.cargo test -p openhuman --lib -- the_codec_records_discovery discovery::pin discovery::tests env_overlay_sets_the_tool_search tool_completed_projects: 25 passed.cargo clippy -p openhuman -p openhuman-embed --all-targets: no diagnostic in a changed file (the existing unrelated lints remain).cargo check -p openhuman-embed --test observed_turns: pass.check-test-ownership.mjs: pass.check-openhuman-rust-layout.mjs: fails onartifacts/tiny_store_tests.rs(784 lines), which this PR does not touch (pre-existing).generate-architecture-docs.mjs --checkcrashes on a missing node dependency locally.Not verified locally
Every test that builds a runtime or runs a session turn fails or hangs in this sandbox with "could not admit the secrets directory: Not a directory", including the existing
config_fn_final_autonomy_is_captured_on_the_built_agent_contextand thetranscript_compat_tests. These new tests are written beside them and have not run locally:session_host/discovery_pin_tests.rs, the twobuild_tests.rsagent tests, and the extendedtests/observed_turns.rs. The codec stamping, the pin resolution and the config mapping are covered by tests that do run.Follow-ups
all).tool_searchfrom the TinyJuice middleware (above).