18 lines
376 B
Python
18 lines
376 B
Python
"""
|
||
Utility tools used by the deep agent.
|
||
|
||
The functions are decorated with `@tool` from langchain and can be called by the agent.
|
||
"""
|
||
|
||
from langchain.tools import tool
|
||
|
||
@tool
|
||
def echo(text: str) -> str:
|
||
"""Return the same text – useful for demonstration."""
|
||
return f"Echo: {text}"
|
||
|
||
@tool
|
||
def add(a: int, b: int) -> int:
|
||
"""Add two integers."""
|
||
return a + b
|