Skip to content

fix(adk): enable default tools and simplify sandbox execution - #3283

Open
supreme-gg-gg wants to merge 3 commits into
mainfrom
jetc/fix/default-bash
Open

supreme-gg-gg wants to merge 3 commits into
mainfrom
jetc/fix/default-bash

Conversation

@supreme-gg-gg

Copy link
Copy Markdown
Contributor

Closes #3278 with a bit more cleanup work, since a lot of skill / bash related code in ADK has gone out of date since they were first implemented.

Make built-in filesystem and bash tools available independently of skills, and align Go and Python execution with Substrate’s sandbox and durable workspace.

  • Enable bash and file search by default, with explicit disable flags.
  • Share /data/workspace across root agents and subagents.
  • Align command timeouts, output capture, environment handling, and process cleanup.
  • Bound read/list/grep results and require unambiguous edits.
  • Use upstream ADK skills implementations and remove custom Python skill wrappers.
  • Remove unused artifact tools, session workspace machinery, and predefined upload/output directories.
  • Rename the shared Python package to kagent-tools, imported through kagent.tools.

Signed-off-by: Jet Chiang <pokyuen.jetchiang-ext@solo.io>
Signed-off-by: Jet Chiang <pokyuen.jetchiang-ext@solo.io>
Signed-off-by: Jet Chiang <pokyuen.jetchiang-ext@solo.io>
@supreme-gg-gg
supreme-gg-gg requested a review from a team as a code owner October 19, 2026 16:58
@github-actions github-actions Bot added the bug Something isn't working label Oct 19, 2026

@EItanya EItanya left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 AI-generated review.

Three findings below.

return

skills_directory = Path(skills_directory).resolve() if skills_directory else None
existing_tool_names = {getattr(t, "name", None) for t in agent.tools}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. Preserve custom callable tools when adding defaults.

ADK accepts plain Python functions in agent.tools, but those expose .__name__, not .name. For a BYO agent with no skills and tools=[read_file], this now appends a second read_file: ADK advertises both declarations and dispatches to the built-in ReadFileTool, making the user's implementation unreachable. Can we account for callable names here and cover the resolved declarations and dispatch mapping?

if skills:
# Skills describe behavior; scripts execute through the common bash tool.
agent.tools.append(
SkillToolset(skills=skills, tool_filter=["list_skills", "load_skill", "load_skill_resource"])

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. Align the skill instructions with bash execution.

With the locked ADK version, creating SkillToolset without a code executor or environment injects a system instruction saying bundled scripts cannot be run, while the bash description explicitly says it can execute them. That gives the model conflicting instructions for a skill that requires running a script. Can we make the injected skill guidance point to the shared bash tool when enabled and test the generated model request?

@@ -0,0 +1,122 @@
"""Command lifecycle and output contract shared with Go ADK."""

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. Put the new lifecycle tests on CI's collection path.

CI calls make test, which runs pytest ./packages/**/tests/. That glob excludes this package's src/kagent/tests/ directory, so the new command lifecycle tests are not running in CI. Can we move these tests under packages/kagent-tools/tests/?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Enable built-in filesystem tools by default, independently of skills

2 participants