wiki:Sllim

Sllim

Sllim logo (SVG)

Sllim is a command-line interface (a CLI, not a TUI) for running AI agents and interacting with LLM APIs.

It talks to Ollama and OpenAI-compatible endpoints, whether from an API provider (such as fireworks.ai) or DwarfStar on a local DGX Spark running DeepSeek-v4-Flash. The central agentic tool of Sllim is a real bash shell, generally sandboxed in a VM with filtered networking and scoped filesystem access.

Why I built it

I've spent much of my career building tools for software engineering, and I'm a CLI kind of guy: my "IDE" is a grid of terminals, and I reach for grep over a code-navigation tool. When I first saw an Open Source model with a bash tool write a full-page Python script, properly escaped to execute in bash, and it worked, I knew I wanted to harness that. The existing harnesses didn't fit my hand; most are TUIs claiming to be CLIs, and it seems all take a wrong-headed approach to sandboxing.

When it comes to sandboxing, most tools look at the command the LLM wants to run, decide if it's "safe", and execute it. That doesn't even pass a security sniff test. You want the agent to write test cases and run them, which means you want it to run arbitrary code. So you must constrain what it can do instead: scoped access to specific directories, whitelist-filtered internet through a proxy, harness code that runs outside the sandbox, and LLM actions that execute inside it. Anything short of that eventually ends in sudo rm -rf /*, or worse.

What it does

Each level of AI interaction is supported:

  • sllim ask is non-agentic: one prompt, one response. Great for code review - feed it a git diff with context plus a task description, and get back a list of concerns.
  • sllim act is agentic: the model gets a shell tool and can spawn sub-agents, looping until it stops.
  • sllim goal wraps act in a loop with an evaluation command before each attempt. Define what "goal met" means, hand it off, and let it cook.

Features

  • Multiple sandbox options: host (dangerous), remote over ssh, container via podman with configured volume mounts, and, most powerfully, vm with virtiofs-based shared directories and filtered networking. The VM proxy whitelist grants access to specific URL patterns and HTTP verbs.
  • Transparent; no spinner hiding the action. It streams responses as they arrive, and shows tool calls being built up token-by-token so you see the command stream in, then the output stream back.
  • Logging to text-based formats (YAML, JSON, JSONL) building up a pile of data you can mine later for test cases, debugging, or even model training.
  • Conversation history that lets you resume any session with --continue or --continue-from.
  • Cost accounting. Per-turn tokens and dollars, including cached tokens and sub-agent totals.
  • A single self-contained binary. A shiv-built zipapp (~25 MB) that runs on any Python 3.11+ Linux box, with no virtualenv or package install on the target.
  • Loop detection, with retry, so a spiraling model stops burning tokens instead of running forever.

Quick start

git clone https://retracile.net/git/sllim.git
cd sllim
./run-all            # lint + tests + build the binary
cp output/sllim ~/bin/sllim

Point it at a local model server and ask something:

sllim provider create local --type dwarfstar --base-url http://spark-0000.lan:8888/v1
sllim model-config create default --provider local --model deepseek-v4-flash
sllim ask "Explain TCP vs UDP in one paragraph"

For the agentic part, create a profile with a sandbox:

sllim profile create agent \
    --model-config default \
    --sandbox-type vm \
    --base https://mirror.servaxnet.com/fedora/linux/releases/44/Cloud/x86_64/images/Fedora-Cloud-Base-Generic-44-1.7.x86_64.qcow2 \
    --add-vol "$HOME/agent-workspace:$HOME/agent-workspace" \
    --network filtered \
    --dnf-mirror https://mirrors.fedoraproject.org \
    --yolo
cd ~/agent-workspace
sllim act "List the files here and tell me what each is for"

Going further

Last modified 12 days ago Last modified on 10/04/26 00:52:31

Attachments (1)

Download all attachments as: .zip

Note: See TracWiki for help on using the wiki.