LLMAgent

LLMAgent is the single package class through which model prompts, interpretation helpers, response coercion, and agentic-session creation reach the configured provider layer.

Main methods

MethodVerified behavior
complete(options)Central model-call hub. It resolves model configuration, invokes the strategy, counts input and output characters, and logs call metadata.
executePrompt(promptText, options)Prepends supplied global, user, session, and skill memory and optionally coerces the result as JSON, code, or JSON containing code.
interpretMessage(message, options)Classifies accept, cancel, update, or configured intents with heuristics first and an LLM fallback for ambiguous text.
resolveConfirmation(input, options)Returns yes, no, or unclear by checking explicit phrases before using a model fallback.
detectIntents(skills, prompt, options)Requests Markdown intent sections and parses them into a structured skill-and-intent result.
startLoopAgentSession(tools, prompt, options)Creates a bounded adaptive session, executes its initial turn, and returns the live session.
startSOPLangAgentSession(skills, prompt, options)Creates a plan-first LightSOPLang session, executes its initial turn, and returns the live session.
setModelConfig(config)Replaces tag-to-model mappings or restores defaults loaded by the runtime configuration.
getInputCounter() / getOutputCounter()Return cumulative character counts used by evaluation and telemetry code.
cancel()Requests cancellation of in-flight provider calls.

Model selection contract

The integrating application may pass a concrete model, semantic tags, and reasoningEffort. An application-supplied modelConfig is the manual override for tag mappings; otherwise LLMAgent builds mappings from runtime defaults. Provider configuration may come from LLMConfig.json, LLM_MODELS_CONFIG_PATH, or supported environment variables. Routing-sensitive work should use tags such as documentation, specification, orchestration, bootstrap, and testing when configured by the application.

Ownership boundary

LLMAgent does not discover skills and does not own long-lived conversation state. MainAgent assembles the tool surface, while agentic sessions store history, plans, tool results, and continuation state.