symfonic.core.prompt.sections¶
sections ¶
Built-in PromptSection implementations.
AgentsSection
dataclass
¶
AgentsSection(name: str = 'Available Agents', required: bool = False, priority: int = 45, cache_breakpoint: bool = False)
Section that renders available agents from state.
render
async
¶
LinkedContextSection
dataclass
¶
LinkedContextSection(name: str = 'Associated Context', required: bool = False, priority: int = 35, cache_breakpoint: bool = False)
Section that renders spreading activation results as associated facts.
Formats neighbor nodes compactly to minimize token usage: [linked] Marinos -> prefers: Pescado, Ribeye (via: food_preference)
render
async
¶
Render linked context from spreading activation results.
Source code in src/symfonic/core/prompt/sections.py
MemorySection
dataclass
¶
MemorySection(name: str = 'Memory Context', required: bool = False, priority: int = 30, cache_breakpoint: bool = False)
Section that renders memory context from state.
render
async
¶
Render memory context entries.
Source code in src/symfonic/core/prompt/sections.py
ScopeSection
dataclass
¶
ScopeSection(name: str = 'Scope', required: bool = False, priority: int = 10, cache_breakpoint: bool = False)
Section that renders tenant scope from state.
render
async
¶
Render tenant scope.
Source code in src/symfonic/core/prompt/sections.py
SkillsSection
dataclass
¶
SkillsSection(name: str = 'Available Skills', required: bool = False, priority: int = 40, cache_breakpoint: bool = False)
Section that renders available skills from state.
render
async
¶
StaticSection
dataclass
¶
StaticSection(name: str, required: bool = False, priority: int = 50, content: str = '', cache_breakpoint: bool = False, cache_ttl: Literal['5m', '1h'] | None = None)
Section with fixed content.
v7.24.0: cache_ttl (None / "5m" / "1h") propagates into the
section's terminal CacheBlock via the getattr path in
:class:PromptBuilder. None (default) preserves v7.23 wire
shape -- the bare {"type":"ephemeral"} marker. "1h" flips
the marker to {"type":"ephemeral","ttl":"1h"} when the section
actually carries a cache breakpoint. Used by the stratigraphic L1
section to honour FrameworkConfig.system_prefix_cache_ttl.