Documentation Index Fetch the complete documentation index at: https://docs.maximem.ai/llms.txt
Use this file to discover all available pages before exploring further.
Install
pip install maximem-synap-semantic-kernel
What’s included
Class Purpose SynapPluginSemantic Kernel plugin with search_memory and store_memory kernel functions
Quick start
from semantic_kernel import Kernel
from semantic_kernel.connectors.ai.open_ai import OpenAIChatCompletion
from synap_semantic_kernel import SynapPlugin
kernel = Kernel()
kernel.add_service(OpenAIChatCompletion( service_id = "default" ))
kernel.add_plugin(
SynapPlugin( sdk = sdk, user_id = "alice" , customer_id = "acme" ),
plugin_name = "synap" ,
)
result = await kernel.invoke_prompt(
" {{ synap.search_memory query='project priorities' }} What are my top priorities?"
)
Plugin functions
search_memory(query: str, max_results: int = 5) -> str
Searches Synap for memories matching query. Returns a formatted string of results for direct use in prompt templates.
store_memory(content: str, memory_type: str = 'fact') -> str
Stores a new memory. Returns "Memory stored successfully." on success.
Using with auto function calling
Register the plugin and enable auto function calling so the kernel invokes Synap tools automatically:
from semantic_kernel.connectors.ai import FunctionChoiceBehavior
settings = kernel.get_prompt_execution_settings_from_service_id( "default" )
settings.function_choice_behavior = FunctionChoiceBehavior.Auto()
kernel.add_plugin(SynapPlugin( sdk = sdk, user_id = "alice" ), plugin_name = "synap" )
chat_history = ChatHistory()
chat_history.add_user_message( "What do you remember about my travel preferences?" )
response = await kernel.invoke_stream(
function = kernel.get_function( "chat" , "chat" ),
settings = settings,
chat_history = chat_history,
)
Next steps
Microsoft Agent Framework Context and history providers for MAF agents.
OpenAI Agents Function tools for the OpenAI Agents SDK.