Skip to content

Introducing Knosh

Knosh is an LLM agent for "one-shot" prompts and structured software development activities. While it has a robust suite of tools, it specifically excludes any sort of arbitrary shell access (e.g., a Bash tool). It is written in Kotlin, and so it is a Kotlin no-shell (Knosh) agent.

Right now, you can use Knosh to:

  • Execute an arbitrary one-shot prompt
  • Help maintain KDocs

The current version of Knosh is 0.1.0. These are early days, and Knosh is largely a proof-of-concept at this point.

Supported Model Providers

The primary use of Knosh will be with Ollama, for models hosted on your development machine or another local machine.

Knosh also supports:

  • Anthropic
  • Mistral (beta-caliber)
  • OpenAI

All of these are through Koog. If there are additional Koog model providers that you want Knosh to support, either file an issue or otherwise reach out.

Knosh supports the models supported by Koog for the supported providers.

Installation

Knosh is a CLI tool. For macOS and Linux users, it is distributed through Homebrew:

brew install commonsguy/knosh/knosh

Users of other operating systems... you're on your own.

Using Knosh

Initialization

After installing Knosh, it is simplest if you use the init command to initialize your configuration options:

knosh init --global

Configuration

This will create a ~/.config/knosh/ directory. In there will be a knosh.json file and an agents/ subdirectory.

You will need to do two things to use Knosh:

  1. Add API keys or an Ollama URL, so Knosh knows how to use your model provider(s) of choice
  2. Add at least one agent configuration file to agents/, describing an agent that you wish to use

If you wish to use Ollama running on the same machine as Knosh itself, a minimal knosh.json file is:

{
    "ollamaURL": "http://localhost:11434"
}

A minimal agent file consists of a Markdown system prompt, preceded by frontmatter that provides details of the model that you want to use and a description of the agent:

---
model: "ollama/qwen3.6:35b-a3b-coding-nvfp4"
description: a general-purpose agent with full tool access
---
You are a helpful assistant to an experienced software developer.

Here, we are seeking to use the qwen3.6:35b-a3b-coding-nvfp4 model from our Ollama server.

This file needs to be saved in the agents/ directory, with a .md file extension. The base name of the file is referred to as the "agent ID", and it will be used with the --agentId option when running Knosh. For example, if you save the file as general.md, --agentId=general says to use that particular agent (instead of others that you may have defined).

Running Commands

At this point, you can run Knosh commands that use your agent:

knosh prompt --agentId general "What model is this, and what can you do for me?"

Tools

Agents can have access to tools to perform operations on the machine where Knosh runs. By default, agents have access to the full roster of tools. You can set up permissions to control which tools an agent can access and, in some cases, what those tools are allowed to do.

Open Source

The source code to Knosh is on Codeberg and is licensed under the Apache Software License 2.0.