symfonic.agent¶
agent ¶
symfonic.agent -- High-level orchestration layer for multi-memory agents.
Integrates symfonic.core (execution engine) and symfonic.memory (5-layer HMS) into a unified, engine-first Python module with an optional FastAPI bridge.
Public API re-exports. Internal modules should not be imported directly.
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.
StreamChunk ¶
Bases: BaseModel
A single streaming event from the agent.