(self, model: BaseModel, config: Dict[str, Any])
| 95 | """Assistant agent with support for both function-based and MCP tools""" |
| 96 | |
| 97 | def __init__(self, model: BaseModel, config: Dict[str, Any]): |
| 98 | super().__init__(model, config) |
| 99 | |
| 100 | # Get tool registry |
| 101 | self.tool_registry = get_registry() |
| 102 | |
| 103 | # Get allowed tools list from config (whitelist mode) |
| 104 | self.allowed_tools = config.get("allowed_tools", None) |
| 105 | |
| 106 | logger.info(f"MyAgent '{self.name}' initialized") |
| 107 | if self.allowed_tools: |
| 108 | logger.info(f"Allowed tools: {self.allowed_tools}") |
| 109 | else: |
| 110 | logger.info(f"All tools available") |
| 111 | |
| 112 | async def _execute_tool(self, function_name: str, function_args: Dict[str, Any]) -> Any: |
| 113 | """Execute tool function (routes to either function-based or MCP tool)""" |
nothing calls this directly
no test coverage detected