AGENTO
v1.1.0 · Documentation
Documentation/Add conversation/Add a conversation model

Add a conversation model

2026-10-15·source 4bebed4·3 min read·10 / 27

You will learn: Add language understanding to an already verified tool.

Add a model only after direct execution works

Start with the model-free first tool. When its HTTP contract passes, add models.routing to interpret language. This isolates provider failures from mapping failures.

A provider configuration names the adapter protocol and a real model ID in your account. The model ID is not inferred from the provider name. Hosted providers require an environment key reference; Ollama can use a local base URL. Never copy a model name without verifying that your deployment supports it.

# Root fragment; replace the model placeholder before use.
models:
  routing:
    provider: openai
    model: YOUR_TOOL_CAPABLE_MODEL
    api_key: $ENV:OPENAI_API_KEY
    timeout_ms: 30000

Use raw presentation first. Then add a separate presentation model only if you need different cost, latency, or wording behavior for results. Without a separate one, presentation falls back to the routing model. Conversation uses the presentation model by default, controlled by assistant.conversation.use_presentation_model.

Capability flags describe reality

nativeTools selects native tool calling when supported. Otherwise structured output or validated JSON fallback may be used. strictSchema, systemMessages, and temperature describe protocol features; they are not guarantees about model intelligence or business correctness.

Do not enable flags to suppress an integration error. Test a valid tool call, malformed arguments, a no-tool answer, an aborted request, and provider timeout. With a custom adapter, return the documented structured shape and usage values; the runtime still validates tool selection and input.

Built-in provider IDs

AGENTO's built-in provider configuration accepts:

  • OpenAI
  • Anthropic
  • Mistral
  • Cohere
  • Ollama

Provider/model capabilities vary. The adapter exposes capability flags rather than assuming every model supports every protocol feature.

Capability contract

interface ModelCapabilities {
  nativeTools: boolean;
  structuredOutput: boolean;
  strictSchema: boolean;
  systemMessages: boolean;
  temperature: boolean;
}

Native tool calling takes precedence. If unavailable, AGENTO may use structured output or validated JSON fallback depending on capabilities.

Provider behavior summary

ProviderNative tool pathStructured fallback
OpenAIChat Completions toolsJSON Schema response format
AnthropicMessages tools/input_schemaconservative validated JSON fallback
MistralChat toolsJSON Schema response format
Coherev2 Chat toolsJSON object/schema path
Ollama/api/chat toolsformat JSON Schema

Treat this table as adapter behavior, not a promise that every model deployment supports every feature.

Custom ModelAdapter

The public interface is small:

interface ModelAdapter {
  capabilities(): ModelCapabilities;
  generateText(request: GenerationRequest): Promise<TextGenerationResult>;
  generateStructured(
    request: GenerationRequest & { schema: JsonSchema }
  ): Promise<StructuredGenerationResult>;
  selectTool(request: ToolSelectionRequest): Promise<ToolSelectionResult>;
}

Inject it:

const runtime = await AgentRuntime.create({
  config: configObject,
  model: myRoutingModel,
  presentationModel: myPresentationModel,
});

Adapter requirements

A production adapter should:

  • respect AbortSignal;
  • return bounded usage metadata;
  • never return multiple unreviewed tool calls as one action;
  • preserve the model-facing tool schemas;
  • surface provider failures rather than smuggling provider error text into normal assistant messages;
  • clearly declare unsupported capabilities.

Test your exact deployment

Provider protocols and model support change. Run routing fixtures/evaluations against the exact model IDs and endpoints you plan to deploy.