Skip to content

feat(tool): add built-in ask_user tool for LLM-driven user input - #86

Merged
bouillipx merged 1 commit into
mainfrom
claude/elated-wing
Feb 12, 2026
Merged

bouillipx merged 1 commit into
mainfrom
claude/elated-wing

Conversation

@bouillipx

Copy link
Copy Markdown
Collaborator

Add AskUserTool as a framework-built-in tool that is automatically registered for every agent, allowing the LLM to ask structured questions when it needs user clarification, decisions, or approval.

  • AskUserTool: ITool implementation with structured question schema
  • IUserInputHandler: callback protocol for host apps (CLI, web, etc.)
  • CLIUserInputHandler: default stdin/stdout implementation
  • Builder auto-registers ask_user; no manual add_tools() needed
  • with_user_input_handler() on builder for custom handler injection

Summary

  • What does this PR change?
  • Why is this change needed?

Scope (One PR One Thing)

  • Primary objective:
  • Out of scope:
  • I confirm this PR handles a single objective only: [ ] Yes

Changed Files (required)

List all touched files and why each file changed.

File Reason
path/to/file reason

If this PR is a large diff (>300 changed lines), explain why split PRs are not possible and provide a split follow-up plan.

Acceptance Criteria

  • Criteria 1
  • Criteria 2

Test Evidence (required)

  • Local commands run:
    • ...
  • CI links or job names:
    • ...
  • Evidence/output summary:
    • ...

If this PR changes high-risk runtime paths (auth/concurrency/execution control), include risk-matrix evidence.

Risk and Rollback

  • Risk level: Low / Medium / High
  • Main risk points:
  • Rollback plan:

Dependency and Lockfile Changes

  • Lockfile changed in this PR: [ ] Yes [ ] No
  • If yes, manifest updated in same PR (requirements.txt/pyproject.toml/package.json): [ ] Yes [ ] No [ ] N/A

Agent Rules Checklist (required)

Reference: docs/agent_rules.md

  • Only task-related files changed; no opportunistic refactor
  • Public interfaces/data structures unchanged unless explicitly required
  • Tests added/updated and evidence attached
  • Any skip/only/exclude usage is explained and reviewed
  • Merge will be done by approved reviewer (no self-merge auto-ship)

Add AskUserTool as a framework-built-in tool that is automatically
registered for every agent, allowing the LLM to ask structured
questions when it needs user clarification, decisions, or approval.

- AskUserTool: ITool (kernel.ITool ABC, new execute signature)
- IUserInputHandler: ABC callback for host apps (CLI, web, etc.)
- CLIUserInputHandler: default stdin/stdout implementation
- Auto-registered in builder._resolve_tools() — no add_tools() needed
- with_user_input_handler() on builder for custom handler injection
- Merged ask_user example into examples/02-with-tools

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@bouillipx
bouillipx merged commit 34499b7 into main Feb 12, 2026
6 checks passed
@bouillipx
bouillipx deleted the claude/elated-wing branch February 12, 2026 14:27
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.

1 participant