from pydantic_ai import Agentfrom synap_pydantic_ai import SynapDeps, register_synap_toolsagent: Agent[SynapDeps, str] = Agent( "openai:gpt-4o", deps_type=SynapDeps, system_prompt="You are a helpful assistant with long-term memory.",)register_synap_tools(agent)deps = SynapDeps(sdk=sdk, user_id="alice", customer_id="acme")result = await agent.run("What do you remember about my project?", deps=deps)print(result.data)
register_synap_tools does three things:
Adds a synap_search tool the agent can call to retrieve memories
Adds a synap_store tool the agent can call to persist new memories
Appends a system prompt fragment instructing the agent to use both tools