alphagenome_agent / managers /tools /builtin_tools.py
Paper2Agent's picture
Upload 56 files
8b54db1 verified
raw
history blame contribute delete
742 Bytes
"""
Built-in tool functions for CodeAct agent.
Example tools that demonstrate the tool system.
"""
from typing import Any, List
__all__ = ["FUNCTION_REGISTRY", "get_all_tool_functions",
"add_numbers", "multiply_numbers"]
def add_numbers(a: int, b: int) -> int:
"""Add two numbers together."""
return a + b
def multiply_numbers(a: int, b: int) -> int:
"""Multiply two numbers together."""
return a * b
# ====================
# FUNCTION REGISTRY
# ====================
FUNCTION_REGISTRY = {
"add_numbers": add_numbers,
"multiply_numbers": multiply_numbers,
}
def get_all_tool_functions() -> List[Any]:
"""Get all functions from FUNCTION_REGISTRY."""
return list(FUNCTION_REGISTRY.values())