symfonic.agent.types¶
types ¶
Type definitions for the symfonic agent framework.
Provides the unified FrameworkTenantScope (bridging core and memory scopes), request/response models, streaming chunk types, and the exception hierarchy.
ActivationLogEntry ¶
Bases: BaseModel
A single activated node from spreading activation.
AgentRequest ¶
Bases: BaseModel
Inbound request for agent execution.
to_scope ¶
Extract a FrameworkTenantScope from this request.
AgentResponse ¶
Bases: BaseModel
Response from agent execution.
Attachment ¶
Bases: BaseModel
Non-text content to send alongside a query.
The semantic query string is used for HMS hydration and embeddings;
attachments are forwarded to the LLM as additional content blocks but do
NOT participate in memory hydration or tool routing in v1.
Attributes:
| Name | Type | Description |
|---|---|---|
kind |
Literal['image', 'document']
|
Content type -- |
source_type |
Literal['url', 'base64']
|
How |
data |
str
|
URL string or base64-encoded content. |
media_type |
str
|
MIME type (e.g. |
filename |
str | None
|
Optional filename for documents / PDFs. |
FrameworkTenantScope ¶
Bases: TenantScope
Thin subclass of the unified TenantScope for the agent framework layer.
TenantScope in symfonic.core.scope now carries all three fields
(tenant_id, sub_tenant_id, namespace), so this subclass only
adds extra validation and the backward-compatible converter methods that
existing consumers may still call.
from_core_scope
classmethod
¶
Build from any TenantScope.
from_memory_scope
classmethod
¶
Build from any TenantScope.
model_post_init ¶
Validate that sub_tenant_id and namespace are consistent.
Source code in src/symfonic/agent/types.py
to_core_scope ¶
HydratedMemory ¶
Bases: BaseModel
Typed result from memory hydration.
Returned by SymfonicAgent._hydrate(). Replaces the previous
tuple[dict[str, Any], int] return type with a structured model
that makes all hydration fields explicit and type-safe.
MemoryBlockStatus ¶
Bases: BaseModel
API response model for a single memory block's status.
ScopeValidationError ¶
Bases: SymfonicAgentError
Raised when tenant scope validation fails.
Source code in src/symfonic/agent/types.py
SecurityScopeError ¶
Bases: SymfonicAgentError
Raised when tenant scope is missing or invalid for a security-critical operation.
Source code in src/symfonic/agent/types.py
StreamChunk ¶
Bases: BaseModel
A single streaming event from the agent.
SymfonicAgentError ¶
TranscriptUnsupportedError ¶
Bases: SymfonicAgentError
Raised when a transcript query needs a saver capability it lacks (v7.27.0).
get_transcript(time_range=...) requires the checkpointer to support
alist (to read per-checkpoint timestamps). A minimal saver without
alist cannot honour a time-range query, so the engine fails loud
(naming the saver class) rather than silently returning [] -- a
silent empty result is indistinguishable from "no messages in range"
and would mislead callers. Ordinal (index) and full-transcript
reads use aget_tuple and are unaffected.