New ask Command Shipping with v1.5
#44
logan-markewich
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
v1.5 is shipping with a new
askcommand in the CLI. This is essentially a RAG agent that will search your files and cite it's sources!This is the same syntax as the search tool, but instead, uses agentic RAG to search your files or respond directly
How the Agent Works
The agent has 3 main tools
search-- this is just thesearchCLI command packaged as an agent tool. It works the same way with the same options, and also integrates with workspacesgrep-- a standard grep tool for exact pattern matching. This building on top of thegrepcrate built by the ripgrep teamread-- a tool to open and read a file, with options for specifying line numbersAll three of these tools have the same return structure, so the agent can deal with a familiar interface across all 3 tools.
Here's a sample of the returned format:
stdinModeThe one caveat here is when piping in content directly with
stdin, all agent tools are removed, and the LLM responds directly using the provided text as context.Changing the LLM
By default,
askusesgpt-4.1-mini. I've found the 4.1 series to be a ton more reliable, and faster, compared to gpt-5, so that's why I chose it.Since this relies on OpenAI, you can also swap in any OpenAI-compatible API as well. This means you can swap in [Anthropic], [Gemini], or even open-source LLMs served by vLLM or Ollama.
By modifying the config at
~/.semtools_config.json, you can set the params:{ "ask": { "api_key": "fake", "base_url": "http://localhost:11434/v1", "model": "gpt-oss:20b", "max_iterations": 10, "api_mode": "chat", } }There's support for both
"api_mode": "chat"(which uses chat completions) and"api_mode": "responses"(which uses OpenAI's newer responses API).Future Work
There's a million things that could be added to this, but at this point I am very open to feedback. Should there be more tools? A dedicated planning step? More config? The sky is the limit honestly. Try it out and see what you think!
Beta Was this translation helpful? Give feedback.
All reactions