Skip to content

symfonic.core.protocols

protocols

Phase 2 storage and web protocols — async capability contracts.

Defines runtime-checkable Protocol classes for document/skill/agent stores and web fetching/searching. Also provides the error hierarchy and dependency group dataclasses for Phase 2 integration.

AgentStore

Bases: Protocol

Async agent definition store and runner.

ConflictError

Bases: StorageError

Write conflict (e.g. optimistic-lock failure, duplicate key).

DocumentStore

Bases: Protocol

Async document persistence contract.

MemoryFlusher

Bases: Protocol

Async contract for flushing compacted memory to an external store.

NotFoundError

Bases: StorageError

Requested resource does not exist.

RuntimeDeps dataclass

RuntimeDeps(observability: ObservabilityHook | None = None)

Groups runtime cross-cutting concerns.

SkillStore

Bases: Protocol

Async skill registry contract.

StorageDeps dataclass

StorageDeps(
    document_store: DocumentStore | None = None,
    skill_store: SkillStore | None = None,
    agent_store: AgentStore | None = None,
)

Groups the three storage protocols for injection.

StorageError

Bases: Exception

Base error for all storage operations.

WebDeps dataclass

WebDeps(
    fetcher: WebFetcher | None = None,
    searcher: WebSearcher | None = None,
)

Groups web-facing protocols for injection.

WebFetcher

Bases: Protocol

Async HTTP fetch contract.

WebSearcher

Bases: Protocol

Async web search contract.