Microsoft Agent Framework integration
Astrocyte memory tools for the Microsoft Agent Framework.
Module: astrocyte.integrations.microsoft_agent
Pattern: OpenAI-compatible tool definitions + handler dispatch
Framework dependency: microsoft-agent-framework (optional)
Install
Section titled “Install”pip install astrocyte microsoft-agent-frameworkfrom astrocyte import Astrocytefrom astrocyte.integrations.microsoft_agent import astrocyte_ms_agent_tools
brain = Astrocyte.from_config("astrocyte.yaml")tools, handlers = astrocyte_ms_agent_tools(brain, bank_id="user-123")
from microsoft.agent_framework import Agentagent = Agent(tools=tools)
# Dispatch tool callsresult = await handlers["memory_retain"](content="Calvin prefers dark mode")result = await handlers["memory_recall"](query="preferences")Integration pattern
Section titled “Integration pattern”Uses the same OpenAI-compatible format as the OpenAI Agents SDK integration. See OpenAI Agents SDK for the full tool schema format.
| Tool | Handler | Astrocyte call |
|---|---|---|
memory_retain | handlers["memory_retain"] | brain.retain() |
memory_recall | handlers["memory_recall"] | brain.recall() |
memory_reflect | handlers["memory_reflect"] | brain.reflect() |
memory_forget | handlers["memory_forget"] | brain.forget() |
API reference
Section titled “API reference”astrocyte_ms_agent_tools(brain, bank_id, *, include_reflect=True, include_forget=False)
Section titled “astrocyte_ms_agent_tools(brain, bank_id, *, include_reflect=True, include_forget=False)”Returns tuple[list[dict], dict[str, Callable]] — same signature as astrocyte_tool_definitions().