osyra_ome.adapters.autogen
Private pre-release / network boundary: The currently usable customer surface is offline verification of an existing signed artifact against an out-of-band trust anchor. Memory/network RPC APIs and host snippets on this page describe protocol and interface shape; the public Edge bridge, package publication, and release acceptance remain pending. Do not treat
api.osyra.ai:443examples as a released customer route.
AutoGen adapter — register OME as a ConversableAgent memory backend.
Exports:
- :class:`OmeConversableAgentMemory` — concrete async
autogen_core.memory.Memoryimplementation. Per-agent namespacing viaagent_id(encoded into the OME subject_id) and cross-agentadd_bridgeclaims for traceable multi-agent flows.
Optional install::
pip install 'osyra-ome[autogen]'Classes
class OmeConversableAgentMemory
Bases: Memory
OME-backed async Memory for AutoGen agents.
Args:
client: OmeAsyncClient bound to the destination workspace.
agent_id: identifier for the owning agent; encoded into
the OME subject_id.
workspace_id: OME workspace UUID-like id; if omitted,
defers to the workspace_id bound on the wrapped client.
top_k: max number of relevant memories to surface from
:meth:update_context. Defaults to 5.
Memory protocol methods covered: add, query, update_context, clear, close plus the OME-specific helper add_bridge.
Methods
__init__
def __init__(self, *, client: OmeAsyncClient, agent_id: str, workspace_id: str | None = None, top_k: int = 5) -> Noneadd (async)
async def add(self, content: MemoryContent, cancellation_token: CancellationToken | None = None) -> NonePersist a single MemoryContent as an OME Claim.
add_bridge (async)
async def add_bridge(self, content: MemoryContent, *, source_agent_id: str, cancellation_token: CancellationToken | None = None) -> NonePersist a cross-agent bridge claim.
Use when one agent's output becomes another agent's input. ``source_agent_id`` is recorded in the Claim body AND on the audit event for reconstruction of the cross-agent flow.
agent_id @property
def agent_id(self) -> strclear (async)
async def clear(self) -> NoneForget the in-process buffer of written claim ids.
Does NOT tombstone the underlying claims (v0.2 surface).
close (async)
async def close(self) -> NoneNo-op — the underlying OmeAsyncClient is owned by the caller.
Per AutoGen Memory protocol, ``close()`` releases any resources the memory holds. The wrapped OmeAsyncClient is an external resource the caller is responsible for closing (so it can be shared across multiple memory instances).
query (async)
async def query(self, query: str | MemoryContent, cancellation_token: CancellationToken | None = None, **kwargs: Any) -> MemoryQueryResultReturn all memory entries for this agent.
v0.1 surface: returns every memory entry (oldest first). AutoGen's protocol allows the implementation to do similarity-search-style filtering; v0.2 will plug into the OME ``proof`` / ``witness`` namespaces for cryptographically verifiable retrieval. For now the query value is ignored.
update_context (async)
async def update_context(self, model_context: ChatCompletionContext) -> UpdateContextResultEnrich the model context with the most-recent memories.
v0.1 behaviour: surface the last ``top_k`` memory entries verbatim. AutoGen 0.4 adds these to the model_context as ``SystemMessage`` content prefixed with "Relevant memory:".
workspace_id @property
def workspace_id(self) -> strwritten_claim_ids @property
def written_claim_ids(self) -> tuple[str, ...]