actrone_memory.integrations.claude_agent_sdk module¶
Claude Agent SDK memory adapter for actrone-memory (Tier 1).
The Claude Agent SDK’s query(prompt, options=ClaudeAgentOptions(system_prompt=...)) accepts a
system prompt. This adapter returns the system prompt for a turn, the developer’s base system
prompt with governed Actrone memory appended, and persists the completed turn. The SDK has no
formal memory interface, so the system-prompt path is the idiomatic integration.
Framework-free: nothing from claude-agent-sdk is imported, this runs against a local,
service-free MemoryManager. Mirrors the TypeScript claudeAgentMemory adapter.
- class actrone_memory.integrations.claude_agent_sdk.ActroneClaudeAgentMemory(agent_id, session_id, *, token_budget=4096, config=None, memory_manager=None)[source]¶
Bases:
BaseActroneMemoryGoverned memory for the Claude Agent SDK
queryloop.Usage:
from claude_agent_sdk import query, ClaudeAgentOptions from actrone_memory.integrations.claude_agent_sdk import ActroneClaudeAgentMemory memory = ActroneClaudeAgentMemory(agent_id="support-bot", session_id="s1") sys_prompt = await memory.append_to_system_prompt("You are support.", user_input) options = ClaudeAgentOptions(system_prompt=sys_prompt) async for msg in query(prompt=user_input, options=options): ... # collect the reply into `answer` await memory.remember(user_input, answer)
- Parameters:
agent_id (str)
session_id (str)
token_budget (int)
config (MemoryConfig | None)
memory_manager (MemoryManager | None)