Repository navigation
feat(agents): add tool registry and built-in connectors - #328
codeforstartups merged 2 commits into
Conversation
…orstartups#287) Adds ToolRegistry for tool discovery and execution. Adds built-in connectors for HTTP requests, Python execution, and MCP. Updates ReActAgent to consume ToolRegistry natively.
…helper dispatch (DRY)
|
Reviewed — complete, well-built tool layer (closes #287). 🎯 Registry — Connectors — HTTP tool, Python-code tool, and MCP adapters in both sync ( The One note for the docs later: |
Description
This PR introduces the
ToolRegistryand built-in tool connectors, completing the next phase of thedynaflowagent primitives.It allows agents to discover and dynamically execute registered tools, including natively supported HTTP requests, sandboxed Python code execution, and external MCP servers.
Related issue
Fixes #287
Changes
ToolRegistryfor centralized tool registration, dynamic schema generation (to_chat_tools), and sync/async execution (execute,aexecute).create_http_tool(REST API connector) with zero external dependencies and graceful error capturing.create_python_code_toolfor sandboxed Python code execution capturingstdoutand runtime exceptions.mcp_tools_from_session(MCP Tool Connector) to map any MCP client session into dynaflow agent tools.AgentTool(_prepare_call) to robustly handle**kwargs/VAR_KEYWORD.ReActAgentto acceptToolRegistrynatively.Testing
Checklist