Skip to content
/

Simple Agent Harness

bquast-simple-agent-harness · bquast/simple-agent-harness · ★ 0 · last commit 2026-05-03

Minimal autonomous LLM agent: cron + Ollama + soul/memory/heartbeat markdown files, no dependencies.

Best whenThe minimal viable agent harness is 6 files and 1 bash script — everything else is optional complexity.
Skip ifFramework dependencies, Cloud API requirements
vs seeds
agent-osprovides context for human-driven sessions, while this IS an au…
Primitive shape
No installable primitives
00

Summary

bquast simple-agent-harness — Summary

Simple Agent Harness by bquast is a minimal autonomous LLM agent with zero framework dependencies: a shell script (agent.sh) that calls Ollama on a cron schedule, a soul file defining identity, a heartbeat prompt sent every 30 minutes, a rewritable memory file, and an append-only log. The agent can execute shell commands (fenced sh blocks) and rewrite its own memory (fenced memory blocks). This is the purest example of Archetype 4 (markdown scaffold + minimal primitives) pushed to its extreme: the "harness" is a 6-file system where the entire runtime is a bash script and the "framework" is three markdown files. It explicitly avoids all AI framework complexity. Differs from seeds: closest to agent-os (markdown scaffold, zero agent primitives) but agent-os generates project memory for Claude Code, while this IS an autonomous agent itself running locally via Ollama. The closest architectural analog is the continuous-ralph execution mode described for some seeds but implemented without any framework — a cron-driven daemon loop.

01

Overview

bquast simple-agent-harness — Overview

Origin

GitHub: https://github.com/bquast/simple-agent-harness
Stars: 0
License: unknown (none declared)
Language: Shell
Last commit: 2026-05-03

Philosophy

From README:

"A minimal autonomous LLM agent. No framework, no dependencies beyond Ollama."

The README is 25 lines. The philosophy is radical minimalism: the agent harness should be readable in 5 minutes and require no installation beyond Ollama and cron.

Files

File Purpose
soul.md Identity and behavioral rules
heartbeat.md Prompt sent to the LLM every 30 minutes
memory.md Persistent memory, rewritten by the LLM when needed
agent.sh The runtime loop
cron.txt The cron schedule
log.txt Append-only record

Key Design Decisions

  1. No dependencies: only Ollama (local LLM) and standard shell tools.
  2. Self-modifying memory: the agent can rewrite memory.md via ```memory fenced blocks.
  3. Shell execution: the agent can run shell commands via ```sh fenced blocks.
  4. Log as audit trail: every response and action is appended to log.txt.
  5. Heartbeat as scheduler: cron + heartbeat.md replace a complex scheduler.
02

Architecture

bquast simple-agent-harness — Architecture

Distribution

Manual: clone the repo and install cron job.

# Install Ollama
curl -fsSL https://ollama.com/install.sh | sh
# Pull a model
ollama pull gemma4:e2b
# Make executable
chmod +x agent.sh
# Install cron job (adjust path first)
crontab cron.txt

File Tree

simple-agent-harness/
├── agent.sh          # Runtime loop (shell script)
├── cron.txt          # Cron schedule
├── heartbeat.md      # Prompt sent every 30 minutes
├── memory.md         # Persistent memory (LLM-rewritable)
├── soul.md           # Identity + behavioral rules
└── log.txt           # Append-only audit log

Required Runtime

  • Ollama (local LLM)
  • bash + cron
  • No Node.js, no Python, no framework

Agent Action Protocol

The LLM can take two actions by wrapping content in fenced code blocks:

  1. ```sh — shell command executed immediately, output logged
  2. ```memory — replaces the contents of memory.md

Everything else is logged to log.txt and ignored.

Target

Local machine. No cloud dependencies. No API keys.

03

Components

bquast simple-agent-harness — Components

Scripts (1)

Name Purpose Trigger
agent.sh Reads soul.md + memory.md + heartbeat.md, calls Ollama, executes fenced sh/memory blocks, appends to log.txt cron

Templates/Markdown (3 functional files)

File Purpose
soul.md Identity definition + behavioral rules (not modified at runtime)
heartbeat.md Prompt template for periodic invocations
memory.md LLM-rewritable persistent memory (owned by agent at runtime)

Cron (1)

File Schedule
cron.txt Every 30 minutes

Log (1)

File Format
log.txt Append-only plain text

No commands, no skills, no hooks, no MCP servers, no agents directory.

05

Prompts

bquast simple-agent-harness — Prompts

Excerpt 1: soul.md (from README description)

Technique: Identity declaration + behavioral rules (minimal)

The soul.md file defines the agent's identity and behavioral rules. Content is user-defined — the README does not include a sample, but the convention is clear: this file is the static persona, read at every invocation.

Excerpt 2: heartbeat.md (from README description)

Technique: Periodic prompt injection for continuous operation

The heartbeat.md is "the prompt sent to the LLM every 30 minutes." The user authors this to describe what the agent should think about or do on each cycle. This is the only input mechanism beyond memory — there is no interactive REPL.

Excerpt 3: Action protocol (from README)

Technique: Fenced-block action encoding in free-text responses

The LLM can take two actions by wrapping content in fenced blocks:
- ```sh — shell command, executed immediately, output logged
- ```memory — replaces the contents of memory.md

Everything else is logged to log.txt and ignored.

This is the full action space: two verbs (execute, remember). All other LLM output is observation-only.

09

Uniqueness

bquast simple-agent-harness — Uniqueness

differs_from_seeds

Closest to agent-os (Archetype 4: markdown scaffold, minimal primitives) but inverted: agent-os provides context engineering for human-driven Claude Code sessions, while this IS the autonomous agent running without any AI coding tool. The cron-driven continuous loop resembles what some seeds describe as "continuous-ralph" execution mode, but implemented with nothing more than bash and cron. No seed achieves this level of minimalism — agent-os ships 5 commands, this ships 0.

Positioning

This is the floor of harness complexity: 6 files, 1 bash script, cron for scheduling, Ollama for local inference. It makes explicit that the minimal viable agent harness is: identity (soul.md) + memory (memory.md) + task (heartbeat.md) + runtime (agent.sh). Everything else in other frameworks is additional structure on top of these primitives.

Observable Failure Modes

  1. No error handling: if the shell command fails, the only evidence is log.txt — there is no retry or error recovery.
  2. Memory explosion: as memory.md grows, context window fills; the agent must proactively compact its own memory.
  3. No human override: fully autonomous with no interrupt mechanism.
  4. Ollama-only: cannot use cloud models.
  5. Zero stars: not adopted; purely illustrative.
04

Workflow

bquast simple-agent-harness — Workflow

Runtime Loop

Step Action
1 (cron trigger) agent.sh runs every 30 minutes
2 Read soul.md (identity + rules)
3 Read memory.md (persistent state)
4 Read heartbeat.md (this period's prompt)
5 Call Ollama with combined context
6 Parse response for fenced blocks
7a If ```sh block: execute shell command, log output
7b If ```memory block: replace memory.md contents
8 Append all responses and actions to log.txt

Approval Gates

None. Fully autonomous — no human-in-the-loop.

Files Not to Edit Manually

memory.md and log.txt are owned by the agent at runtime. Human edits to memory.md will be overwritten on the next memory block.

06

Memory Context

bquast simple-agent-harness — Memory & Context

State Storage

  • memory.md — LLM-rewritable persistent memory. On each invocation, the full memory.md is included in the context. The agent replaces it via ```memory blocks.
  • log.txt — append-only record of every response and action. Not read back into context (audit only).

Memory Type

File-based, project-scoped.

Memory Persistence

Between cron invocations: memory.md persists on disk and is re-read at each heartbeat.

Context Window

The combined context is: soul.md + memory.md + heartbeat.md. No explicit compaction mechanism — as memory.md grows, the agent must compress it via ```memory rewrites.

Cross-Session

Yes — memory.md is the persistent store across cron runs.

07

Orchestration

bquast simple-agent-harness — Orchestration

Multi-Agent

No. Single agent, single Ollama call per cron cycle.

Orchestration Pattern

None.

Isolation Mechanism

None (edits in-place on the local filesystem).

Execution Mode

Scheduled: cron every 30 minutes. This is a background-daemon pattern implemented with standard cron.

Multi-Model

No. Uses whatever Ollama model is configured.

Cross-Tool Portability

High in theory (runs independently of any AI coding tool), but it does not integrate with Claude Code, Cursor, or any IDE — it is a standalone local agent.

08

Ui Cli Surface

bquast simple-agent-harness — UI & CLI Surface

Dedicated CLI Binary

No.

Local UI

No.

Runtime

The agent runs headlessly via cron. There is no interactive interface.

Observability

log.txt — append-only plain text log of every LLM response and shell command output.

Related frameworks

same archetype · same primary tool · same memory type

BMAD-METHOD ★ 48k

Provides a full agile delivery lifecycle with named expert-persona AI collaborators that elicit the human's best thinking rather…

Agent OS ★ 4.6k

Extracts implicit codebase conventions into token-efficient markdown standards files and injects them selectively into AI agent…

Claude Conductor ★ 367

Gives Claude Code a persistent, cross-linked, auto-analyzed documentation system so it retains codebase context across sessions.

Spec-Driver (Greenfield Spec-Driven Development) ★ 25

Prevents spec rot in AI-assisted development by making implementation changes flow back into evergreen, authoritative specs via…

Anthropic Knowledge Work Plugins ★ 16k

Role-specialized plugin bundles with live MCP connectors that turn Claude into a domain expert for enterprise knowledge workers.

Codex Integration for Claude Code (skill-codex) ★ 1.3k

Single Claude Code skill that handles Codex CLI invocation correctly (stdin blocking, thinking token suppression, session resume)…