Skip to content

feat: add ReAct.Tool behaviour + migrate tools (TICKET-004)#7

Open
clawd-conroy wants to merge 1 commit into
conroywhitney:mainfrom
clawd-conroy:ticket-004
Open

feat: add ReAct.Tool behaviour + migrate tools (TICKET-004)#7
clawd-conroy wants to merge 1 commit into
conroywhitney:mainfrom
clawd-conroy:ticket-004

Conversation

@clawd-conroy

Copy link
Copy Markdown

TICKET-004: Tool Behaviour

Replaces the heavy Jido Actions with a simple behaviour any module can implement in ~20 lines.

Changes

  • lib/react/tool.ex — behaviour + JSON Schema auto-generation (Anthropic + OpenAI formats)
  • lib/react/tools.ex — registry/discovery module
  • lib/react/tools/{read_file,write_file,list_files,fetch_url,shell}.ex — 5 migrated tools
  • test/react/tool_test.exs — behaviour, schema generation tests
  • test/react/tools_test.exs — per-tool unit tests

689 lines, all additive. No existing files modified.

Co-authored-by: Claude Sonnet 4.6

- Define ReAct.Tool behaviour with name/0, description/0, parameters/0, run/2 callbacks
- Auto-generate Anthropic and OpenAI JSON Schema from behaviour callbacks
- Tool discovery via ReAct.Tool.all_in/1 and ReAct.Tool.implements?/1
- Migrate 5 tools (read_file, write_file, list_files, fetch_url, shell) to lib/react/tools/
- Add ReAct.Tools registry module
- Tests under test/react/ covering behaviour, schema generation, and each tool

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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