๐Ÿ”ง AI Tool-Use Simulator โ€” Function Calling & Byte 2.0 Integration

Byte 2.0's function calling live: model emits ```tool {"tool": "open_tool", "params": {...}}``` โ€” UI executes with inline preview. Simulate tool-use, test JSON schemas, and see how Byte turns natural language into actionable tool calls with pre-filled inputs.

Available meta-tools (Byte 2.0)
search_tools(query, intent?, category?, limit?)
Hybrid BM25+embed search over 1119 tools
open_tool(name, inputs?)
Open tool with pre-filled inputs via URL or postMessage
compare_tools(names)
Side-by-side comparison with descriptions & categories
create_workflow(goal, steps)
Plan multi-step workflow, map each step to tools
Generated tool calls (model output)

      
      
Validation: โ€”
How Byte 2.0 tool-use works
1. System prompt defines meta-tools with JSON schemas and instructs model to emit ```tool {...}``` fences
2. Model (SmolLM2 360M excels at JSON) generates tool calls interleaved with reasoning
3. Parser extracts ```tool``` fences + raw JSON via regex, validates against schema
4. Executor runs search_tools via RetrievalEngine (BM25+embed), open_tool via iframe with pre-filled inputs
5. UI renders tool cards with open/embed/preview actions, tracks feedback for retrieval weight updates
Privacy: All tool execution local โ€” no data leaves browser. Inputs via URL params or postMessage to iframe.