Skip to content

Commit 6bc85d4

Browse files
committed
Add schema printing to memory tools notebook for debugging
Print the args_schema for each memory tool to verify the schema matches what the LLM is expected to send.
1 parent af26356 commit 6bc85d4

File tree

2 files changed

+19
-1
lines changed

2 files changed

+19
-1
lines changed
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
Requirement already satisfied: agent-memory-client in /Users/andrew.brookins/.pyenv/versions/3.12.8/lib/python3.12/site-packages (0.12.2)
2+
Requirement already satisfied: httpx>=0.25.0 in /Users/andrew.brookins/.pyenv/versions/3.12.8/lib/python3.12/site-packages (from agent-memory-client) (0.28.1)
3+
Requirement already satisfied: pydantic>=2.0.0 in /Users/andrew.brookins/.pyenv/versions/3.12.8/lib/python3.12/site-packages (from agent-memory-client) (2.10.3)
4+
Requirement already satisfied: python-ulid>=3.0.0 in /Users/andrew.brookins/.pyenv/versions/3.12.8/lib/python3.12/site-packages (from agent-memory-client) (3.1.0)
5+
Requirement already satisfied: anyio in /Users/andrew.brookins/.pyenv/versions/3.12.8/lib/python3.12/site-packages (from httpx>=0.25.0->agent-memory-client) (4.9.0)
6+
Requirement already satisfied: certifi in /Users/andrew.brookins/.pyenv/versions/3.12.8/lib/python3.12/site-packages (from httpx>=0.25.0->agent-memory-client) (2025.6.15)
7+
Requirement already satisfied: httpcore==1.* in /Users/andrew.brookins/.pyenv/versions/3.12.8/lib/python3.12/site-packages (from httpx>=0.25.0->agent-memory-client) (1.0.9)
8+
Requirement already satisfied: idna in /Users/andrew.brookins/.pyenv/versions/3.12.8/lib/python3.12/site-packages (from httpx>=0.25.0->agent-memory-client) (3.10)
9+
Requirement already satisfied: h11>=0.16 in /Users/andrew.brookins/.pyenv/versions/3.12.8/lib/python3.12/site-packages (from httpcore==1.*->httpx>=0.25.0->agent-memory-client) (0.16.0)
10+
Requirement already satisfied: annotated-types>=0.6.0 in /Users/andrew.brookins/.pyenv/versions/3.12.8/lib/python3.12/site-packages (from pydantic>=2.0.0->agent-memory-client) (0.7.0)
11+
Requirement already satisfied: pydantic-core==2.27.1 in /Users/andrew.brookins/.pyenv/versions/3.12.8/lib/python3.12/site-packages (from pydantic>=2.0.0->agent-memory-client) (2.27.1)
12+
Requirement already satisfied: typing-extensions>=4.12.2 in /Users/andrew.brookins/.pyenv/versions/3.12.8/lib/python3.12/site-packages (from pydantic>=2.0.0->agent-memory-client) (4.14.0)
13+
Requirement already satisfied: sniffio>=1.1 in /Users/andrew.brookins/.pyenv/versions/3.12.8/lib/python3.12/site-packages (from anyio->httpx>=0.25.0->agent-memory-client) (1.3.1)
14+
15+
[notice] A new release of pip is available: 24.3.1 -> 25.2
16+
[notice] To update, run: pip install --upgrade pip

python-recipes/context-engineering/notebooks/section-3-memory/04_memory_tools.ipynb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,9 @@
181181
"\n",
182182
"print(\"Available memory tools:\")\n",
183183
"for tool in memory_tools:\n",
184-
" print(f\" - {tool.name}: {tool.description[:80]}...\")\n",
184+
" print(f\"\\n - {tool.name}: {tool.description[:80]}...\")\n",
185+
" if hasattr(tool, 'args_schema') and tool.args_schema:\n",
186+
" print(f\" Schema: {tool.args_schema.model_json_schema()}\")\n",
185187
"\n",
186188
"print(f\"\\n✅ Got {len(memory_tools)} LangChain tools from memory client\")"
187189
]

0 commit comments

Comments
 (0)