SuperAPI AI Directory

chat-ollama

An open source chatbot based on LLMs. It supports a wide range of language models, and knowledge base management.

Open website

About this tool

ChatOllama is an open-source agentic application for running AI agents on local or hosted models. Its current primary user entry point is the installable chatollama-agent command-line application. The project is not an SDK for building agents, but an application for running agents.

Purpose ChatOllama's core purpose is to let users interact with AI agents via the command line and execute tasks on local or remote models. It supports multiple model providers, can automatically discover available models, and allows agents to call tools during a conversation to inspect the working directory.

Main capabilities

  • Support for local and hosted models: Ollama is supported as one of the OpenAI-compatible providers, and other providers can also be configured.
  • Automatic model discovery: On startup, ChatOllama discovers available models. Configured remote providers offer a built-in model catalog; OpenAI also performs filtered model discovery; available Ollama endpoints provide their installed models. Discovery failures produce warnings but do not prevent the CLI from opening.
  • Tool calling: At runtime, read_file, list_directory, grep, and find_files can be called to inspect the directory where the CLI was started. Terminal mode displays each tool's validated input, execution status, and limited results.
  • Model switching and management: Use /models to view and select available models, use /model <provider>/<model-id> to switch directly, use /new to clear the conversation history while keeping the current model, and use /exit to quit.
  • Conversation and cancellation: Enter a message and press Enter to send it; subsequent messages continue the same in-memory conversation. Pressing Ctrl+C during a response cancels that response and keeps the CLI open; pressing Ctrl+C while idle exits.
  • Workspace file operations: write_file and edit_file support atomic replacement, changes to the same path are serialized, and content exceeding 1,048,576 bytes is rejected. Successful reads, writes, and edits return a sha256:<hex> version of the full content. Writes and edits can accept an optional expectedVersion; a stale value returns VERSION_CONFLICT without changing the file. edit_file supports a single exact replacement as well as batch operations of up to 100 replacements, requiring each oldText matches exactly once in the original content, ranges do not overlap, and the entire batch is atomic. Matching does not support fuzzy matching. Shell commands are not exposed.

Usage

  • Environment requirements: Node.js 24 or higher is required.
  • Configure providers: Before starting the CLI, set the API key for the provider you want to use. The CLI also recognizes explicit startup override parameters such as AGENT_PROVIDER, AGENT_MODEL, AGENT_BASE_URL, and AGENT_API_KEY. AGENT_PROVIDER or AGENT_MODEL takes precedence over the saved selection; AGENT_BASE_URL and AGENT_API_KEY override its endpoint and credentials without changing the provider/model identity. To add a provider's models to automatic discovery, mapped provider credentials are still required; AGENT_API_KEY alone is not enough.
  • Ollama compatibility: When no model is available, the CLI falls back to ollama/qwen3:8b; when only AGENT_MODEL is set and AGENT_PROVIDER is not set, Ollama is used. To select explicitly, set AGENT_PROVIDER=ollama and, if necessary, set AGENT_BASE_URL.
  • Interactive commands: Enter /models to view and select a model; in an interactive terminal, the arrow keys and Enter are available, and Escape cancels; enter /model <provider>/<model-id> to switch directly, for example /model openrouter/openai/gpt-5-mini; enter /new to clear the conversation history; enter /exit to quit.
  • Plain text or script input: /models prints a numbered list instead of an interactive selector.
  • Provider-free demo: A deterministic tool loop can be run without a provider, network requests, or a paid API key. This demo uses AI SDK MockLanguageModelV3 to execute two real model steps: the first step requests a safe UTC time tool, and the second step receives the result and streams the final answer.
  • Workspace restrictions: The CLI startup directory is the workspace root, and tool paths must be relative to that root; absolute paths, .. escapes, prefix-confusion paths, and symbolic links that resolve outside the root are rejected. Read/search results have limits and report truncation.

Use cases

  • Users who need to run AI agents on local or remote models and interact through the command line.
  • Scenarios that require inspecting files in the working directory and searching content during a conversation.
  • Developers or advanced users who need automatic model discovery and switching.
  • Projects that want to use an open-source tool to run agents rather than build agents.

Limitations

  • It is an application for running agents, not an SDK for building agents.
  • Node.js 24 or higher is required.
  • Conversations and API keys are not saved; the model selection is saved as the default for the next startup.
  • File operations do not expose shell commands.
  • Content size is limited to 1,048,576 bytes, and fuzzy matching is not supported.
  • Discovery failures produce warnings but do not prevent the CLI from opening.
  • The fallback model ollama/qwen3:8b does not mean that the model is installed or reachable.
  • For configuration precedence, saved preference locations, plain mode behavior, and provider-specific examples, refer to the Agent CLI guide (the documentation does not provide specific content here).