From 4b6127ac40ba3e00b50f30c39ca576e8d2789f60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9A=D0=B8=D1=80=D0=B8=D0=BB=D0=BB=20=D0=9A=D1=83=D1=82?= =?UTF-8?q?=D0=BB=D0=B0=D1=85=D0=BC=D0=B5=D1=82=D0=BE=D0=B2?= Date: Wed, 27 May 2026 13:11:57 +0000 Subject: [PATCH] add tools.py --- tools.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 tools.py diff --git a/tools.py b/tools.py new file mode 100644 index 0000000..f5f2e61 --- /dev/null +++ b/tools.py @@ -0,0 +1,17 @@ +""" +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