Skip to content

latent.agents.guided.guidelines

Guideline data models for GuidedAgent.

Classes

CannedResponse

CannedResponse(id: str, template: str, variables: dict[str, str] = dict())

Pre-approved response template for strict mode.

Glossary

Glossary(terms: dict[str, str])

Domain terminology injected into the prompt when terms appear in conversation.

Guideline

Guideline(when: str, then: str, id: str = '', priority: int = 0, tools: tuple[str, ...] = tuple(), excludes: tuple[str, ...] = tuple())

A behavioral rule: when condition is met, follow the instruction.

GuidelineMatch

GuidelineMatch(guideline: Guideline, matched: bool, reason: str = '')

Result of evaluating a guideline against the current conversation context.

Methods

CannedResponse.render

render(overrides: dict[str, str] | None = None) -> str

Render the template, substituting default variables then overrides.

Glossary.find_mentioned

find_mentioned(text: str) -> dict[str, str]

Return subset of terms whose keys appear in text (case-insensitive).

Attributes

CompositionMode