#!/usr/bin/env python3 """ TokioAI Engine -- Custom Tools Example Shows how to add your own tools to the engine. Modify engine/schemas.py to add tool definitions, or pass them through the API. """ from engine.pipeline import Pipeline, EngineConfig from engine.schemas import TOOL_DEFINITIONS # You can inspect the built-in tools print("Built-in tools:") for tool in TOOL_DEFINITIONS: name = tool["function"]["name"] desc = tool["function"]["description"][:60] print(f" {name:20s} -- {desc}") print() # Use the engine normally -- it already knows all TokioAI tools config = EngineConfig( model_name="qwen3-coder", verbose=True, ) engine = Pipeline(config) # The engine's router will classify this as tool_call # and the guided generator will constrain output to valid tool names result = engine.process("search for TODO comments in all python files") print(f"\nResult: {result}") if result.tool_calls: print(f"Tool: {result.tool_calls[0]['name']}") print(f"Args: {result.tool_calls[0]['arguments']}")