Logo: Shellm

Shellm

OrganisatiounBeléift
laude-institute
shellm

Reference for the shellm system — recursive LLM shell, identity management, memory, skills, trajectory, and all CLI tools. Use when working on shellm itself, debugging agent behavior, or understanding how the pieces fit together.

Add to TypingMind

Iwwersiicht

Editeurlaude-institute
Repositoryheadlong
Skill-Nummshellm
Stären
1.2K
Forks
127
Matgeliwwert Dateien
Nëmmen Instruktiounen
LizenzApache-2.0
Linken
  • Instruktiounen am Markdown-Format

    Eng SKILL.md-Datei, déi de Modell bei Bedarf luet, soudatt nëmmen Token ufalen, wann eng Ufro tatsächlech dozou passt.

  • Funktionéiert mat all LLM

    KI-Skills si reng Markdown, keen ubidderspezifesche Code. Dofir funktionéiert dëse Skill mat GPT, Claude, Gemini, Grok oder engem lokale Modell.

  • Alles an den Instruktiounen

    Alles, wat de Modell brauch, steet an den Instruktiounen — keng zousätzlech Dateien ze synchroniséieren.

  • Open Source

    laude-institute huet de Skill op GitHub verëffentlecht. Liest de Quelltext, ier Dir de Skill installéiert.

Installatioun

Installéiert de KI-Skill Shellm an TypingMind, fir e mat all LLM ze benotzen, oder setzt en an en anere KI-Agent an, deen SKILL.md liest.

1

An TypingMind installéieren

TypingMind installéiert e Skill direkt aus sengem GitHub-Dossier — dobäi gëtt SKILL.md gelies, d'Ressourcedateie gi gebëndelt an d'Resultat gëtt lokal gespäichert.

  1. Maacht d'App op a gitt op Plugins → Skills.
  2. Wielt „Vu GitHub installéieren“.
  3. Pecht d'URL vum Skill-Dossier, déi hei drënner steet, an a bestätegt d'Installatioun.
    https://github.com/laude-institute/headlong/tree/main/skills/shellm
  4. Aktivéiert de Skill an all Chat, an deem Dir e benotze wëllt.
Plugins → Skills → Skill derbäisetzen → Iwwer eng GitHub-URL. Pecht dann d'URL vum Dossier an a klickt op Weider.
2

An engem anere KI-Agent installéieren

All KI-Agent, deen d'Format Agent Skills liest, kann dëse Skill benotzen — kopéiert den Dossier an d'Skill-Verzeechnes vun deem KI-Agent.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/laude-institute/headlong.git /tmp/headlong
mkdir -p .claude/skills
cp -r /tmp/headlong/skills/shellm .claude/skills/shellm
Start Claude Code nom Kopéieren nei, fir datt den neie Skill erkannt gëtt.

An TypingMind benotzen

Aktivéiert Shellm an engem Chat vun TypingMind, an de Modell iwwerhëlt de Rescht. Den Numm an d'Beschreiwung stinn am System-Prompt. Soubal eng Ufro dozou passt, luet de Modell déi komplett Instruktioune selwer — Dir musst de Skill ni manuell opruffen, an et fale keng Token un, bis en tatsächlech benotzt gëtt.

De Modell luet Shellm automatesch, soubal eng Ufro dozou passt.

Funktionéiert mat all KI-Modell

KI-Skills si reng Markdown-Instruktiounen amplaz vun ubidderspezifeschem Code. Dofir ass Shellm net un de Modell gebonnen, fir deen de Skill geschriwwe gouf. Installéiert en eemol an TypingMind a benotzt e mat GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama oder engem lokale Modell, deen Dir selwer bedreift — alles mat Ären eegenen API-Schlësselen.

  • Gëtt nëmme gelueden, wann et néideg ass

    De System-Prompt enthält nëmmen den Numm an d'Beschreiwung. D'Instruktioune gi bei der éischter passender Ufro gelueden, soudatt en onbenotzte Skill näischt kascht.

  • De Modell am lafende Chat wiesselen

    Well de Skill aus Instruktiounen amplaz vu Code besteet, funktionéiert en och no engem Modellwiessel — den nächste Modell liest déi selwecht SKILL.md-Datei.

Skill-Instruktiounen

Dëst ass den Inhalt vu SKILL.md, deen de Modell luet. Liest e virun der Installatioun — e Skill besteet aus Instruktiounen, déi Äre Modell befollegt.

shellm

This skill may be out of date. The source of truth is always the code in bin/. If you find discrepancies, use the skill-author skill to update this file and open a PR.

Architecture overview

shellm is a set of composable bash scripts that turn an LLM into an autonomous agent living in a shell. The stack, bottom to top:

llm              raw LLM calls (Anthropic, OpenAI, Gemini)
shellm           recursive execute-in-shell loop on top of llm
traj / context   step log (DAG) + message assembly for multi-turn
mem / skills     persistent memory + learnable capabilities
identity         isolated agent identities (own mem, skills, traj)
think / chat     autonomous thinking + human conversation
focus            goal tracking

An agent activates an identity (source .identities/<name>/activate), which sets env vars. All tools read from those env vars — no global config files.

bin/ reference

Core engine

ScriptPurpose
shellmRecursive LLM-in-bash loop. Sends a prompt to the LLM, executes returned bash code blocks, feeds output back, repeats until FINAL is set. The heart of the system.
llmMulti-provider LLM CLI. llm [options] prompt or stdin. Supports Anthropic, OpenAI, Gemini. Key flags: -m MODEL, -s SYSTEM, -M MESSAGES_JSON, --stream, --thinking.

Identity & activation

ScriptPurpose
identityManage isolated identities. Each has its own memories, skills, kernel, traj. Subcommands: new, list, info, switch, delete, shell, prompt.

Activate an identity to set env vars for all other tools:

bash
source .identities/myagent/activate   # activate in current shell
deactivate_identity                    # undo
identity shell myagent                 # or: start a subshell

Thinking & conversation

ScriptPurpose
thinkOne autonomous think cycle. Reads traj + memories, calls shellm with think prompt, writes thought/action to traj, dispatches thought processes. think step [--dry-run].
chatSend messages into the thought stream. chat send <msg> appends a human-msg step. chat repl gives a readline loop.
focusGoal management. focus set <goal>, focus show, focus done <query>. Stores goals as mem entries with type=goal.

Memory & skills

ScriptPurpose
memFile-based memory store (markdown + YAML frontmatter). mem add --type TYPE <text>, mem search <query>, mem list, mem show <name>, mem forget <name>, mem edit <name> <text>.
skillsSkill management. skills install <src>, skills show <name>, skills promote <name> (to kernel), skills search <query>, skills remote add <path>.

Trajectory & context

ScriptPurpose
trajTrajectory operations (single-file and tree). Uses TRAJ_DIR + TRAJ_ID. traj new, traj append, traj tail, traj cat, traj fork, traj merge, traj show, traj list, traj root. show is unified: pass any ID (trajectory or step) and it searches all files in traj_dir.
contextReads traj, outputs a JSON messages array for llm -M. Maps step types to assistant/user roles. Key flags: --traj_dir, --tail N, --head N, --max-bytes, --pin <step_id>.

File utilities

ScriptPurpose
viewRead files with line numbers. view FILE [START[:END]].
globGit-aware glob matching sorted by mtime. glob PATTERN [DIR] [--limit N].
subExact-string substitution in files. sub FILE OLD NEW [--replace-all].
putAtomic file write from stdin. echo content | put FILE [--force].

Docker sandboxing

ScriptPurpose
shellm-dockerConstrained Docker facade for sandboxed execution. run, build, ps, logs, rm.
shellm-docker-brokerHost-side broker that manages Docker containers for sandboxed shellm envs.
shellm-explore(Not covered here — run exploration tool.)

Key environment variables

These are set by source .identities/<name>/activate:

VariablePoints to
IDENTITY_NAMEIdentity name (e.g. "andy")
IDENTITY_DIRIdentity root dir (e.g. .identities/andy)
MEM_DIR$IDENTITY_DIR/memories
SKILLS_DIR$IDENTITY_DIR/skills
SKILLS_KERNEL_DIR$IDENTITY_DIR/kernel
TRAJ_DIR$IDENTITY_DIR/trajectories
TRAJ_IDUUID of root trajectory
SHELLM_TRAJ_DIRTrajectory directory (default $HOME/.shellm/trajectories)
SHELLM_ENVS_DIREnv/container state directory
SHELLM_WORKDIRS_DIRWorking directories base
SHELLM_BROKER_DIRDocker broker state directory
THINK_MODELModel for think cycles
THINK_TICK_INTERVALSeconds between autonomous ticks

Other important vars (not identity-scoped):

VariablePurpose
SHELLM_MODELDefault model for shellm
ANTHROPIC_API_KEYAnthropic API key for llm
OPENAI_API_KEYOpenAI API key for llm

Identity directory layout

.identities/<name>/
  info.txt              name=, cwd=, created=, think_model=, interval=
  activate              source-able activation script
  core_identity_prompt.md  (optional) custom system prompt
  .env                  (optional) identity-specific env vars
  memories/             mem entries (markdown files)
  skills/               installed skills
    .skillsrc           skill remotes config
  kernel/               kernel skills (always loaded)
    mem/SKILL.md        bootstrapped mem skill
  .trajectories/        trajectory files
    trajectory.jsonl          main consciousness stream
    blobs/              spilled large fields
  .shellm/              shellm working state
  workdir/              working directory for think cycles

How a think cycle works

  1. think step loads the think prompt template from $IDENTITY_DIR/prompts/think.md
  2. Replaces {{identity_name}} and {{goals}} in the template
  3. Appends recent traj context (last N steps via traj tail)
  4. Calls shellm with this prompt — shellm executes bash, loops until FINAL
  5. Writes the resulting thought or action to traj
  6. If it was an action, forks a child branch, executes via shellm, merges back
  7. Dispatches thought processes (TPs) — each TP gets recent thoughts and can write to traj/mem

Thinkers

Thinkers live in thinkers/. Each has a step script, prompt.md, and subscriptions.jsonl. They subscribe to trajectory events and run autonomously via thinkers start:

  • main — core thought generator, produces stream-of-consciousness thoughts and actions
  • intentions-goals-creator — notices emerging goals, stores via mem
  • intentions-goals-enforcer — redirects when the stream drifts from goals
  • learning — extracts lessons from action/observation pairs
  • mind-wandering — surfaces associative memories
  • system-architecture — meta-cognitive self-modification
  • values-beliefs-creator — crystallizes values and beliefs
  • values-beliefs-enforcer — flags misalignment between behavior and values

Tips

  • All tools are designed to be composed via pipes and env vars
  • shellm is the only script that calls the LLM directly (via llm); everything else builds prompts and calls shellm
  • The context script is the bridge between traj (step log) and llm (messages array)
  • Skills are loaded on-demand via skills show <name>; kernel skills are always in context
  • To understand any script's full interface, run it with --help or read the source in bin/

Heefeg gestallte Froen

Wat mécht de KI-Skill Shellm?

Reference for the shellm system — recursive LLM shell, identity management, memory, skills, trajectory, and all CLI tools. Use when working on shellm itself, debugging agent behavior, or understanding how the pieces fit together.

Firwat Shellm op TypingMind benotzen?

Well Dir en eemol installéiert a mat all Modell benotze kënnt. Shellm besteet aus einfachem Markdown amplaz vun ubidderspezifeschem Code. Dee selwechte Skill funktionéiert also mat GPT-5, Claude, Gemini, Grok oder engem lokale Modell – an Dir kënnt de Modell matzen am Chat wiesselen, ouni datt de Skill ophält ze funktionéieren. TypingMind benotzt Är eegen API-Schlësselen, sou datt Dir d'Ubidder direkt bezuelt, amplaz en Abonnement pro Benotzerplaz ze bezuelen. Är Skills a Chats bleiwen an Ärem eegene Späicher.

Wéi installéieren ech Shellm an TypingMind?

Maacht an TypingMind Plugins → Skills → Vu GitHub installéieren op a setzt https://github.com/laude-institute/headlong/tree/main/skills/shellm an. TypingMind liest d'Datei SKILL.md an installéiert de Skill, deen Dir pro Chat aktivéiere kënnt.

Wéi eng KI-Modeller kënnen Shellm benotzen?

All Modell, deen Dir an TypingMind verbënnt. KI-Skills sinn einfach Markdown-Instruktiounen an net ubidderspezifesche Code. Dofir kënne GPT, Claude, Gemini, Grok a lokal Modeller dëse Skill lueden, wann eng Ufro dozou passt.

Wéi vill KI-Modeller kann ech mat Shellm benotzen?

Esou vill wéi Dir wëllt. Soulaang e Modell Skills ënnerstëtzt, kënnt Dir Shellm domat benotzen – zum Beispill mat GPT, Claude, Gemini, Grok, DeepSeek, Mistral oder Llama – alles op TypingMind mat Ären eegenen API-Schlësselen.

Ass de KI-Skill Shellm gratis?

Jo. laude-institute huet de Skill ënner der Lizenz Apache-2.0 op GitHub publizéiert. Dir bezuelt nëmmen Ären eegene KI-Ubidder fir d'Token, déi Dir benotzt.

Wat si KI-Skills?

E KI-Skill ass e weiderverwendbare Pak vun Instruktiounen, deen engem KI-Modell bäibréngt, wéi en eng bestëmmt Aufgab erfëllt. E follegt dem oppenen Agent Skills-Format: eng Datei SKILL.md mat engem Numm an enger Beschreiwung, plus all Scripten, Virlagen oder Referenzdateien, déi de Modell eventuell brauch. De Modell liest d'Instruktiounen eréischt, wann Är Ufro zum Skill passt. En installéierte Skill kascht also näischt, bis e benotzt gëtt.

Wéi ënnerscheede sech KI-Skills vu Plugins oder MCP-Serveren?

E Plugin oder MCP-Server gëtt engem Modell nei Tools, déi en opruffe kann – Code, deen iergendwou leeft an e Resultat zeréckgëtt. E KI-Skill gëtt dem Modell dogéint Wëssen an eng Virgoensweis: wéi en eng Aufgab ugeet, wéi eng Schrëtt e maache soll a wéi eng gutt Ausgab ausgesäit. Skills bestinn aus einfachem Markdown, brauche kee Server, keen API-Schlëssel a kee Lafzäitëmfeld a funktionéiere mat all Modell.

Alleguer weisen

Elo Ären eegene KI-Aarbechtsberäich ariichten

Abonnéiert Iech op eisen Newsletter, fir iwwer nei Funktiounen an zukünfteg Gewënnspiller informéiert ze ginn 👇