LLM Layer Guidelines
Scope
- Applies to
src/llm/. - Inherits root
AGENTS.mdandsrc/AGENTS.md.
Adapter Contracts
- Provider clients must implement
HyperAgentLLM. - Wire provider selection through
createLLMClientinsrc/llm/providers/index.ts. - Keep each provider aligned with shared model capabilities and structured output expectations.
Message and Schema Translation
- Update
src/llm/utils/message-converter.tsandsrc/llm/utils/schema-converter.tswhen provider message/schema requirements change. - Preserve zod-first structured output flow for tool/action decisions.
- Avoid provider-specific assumptions leaking into agent/runtime modules.