Skip to content
thebrownprojectPublic

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

24 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Stilts

Self-improving harness proof of concept.

Stilts is a Python backend project that generates, evaluates, and iteratively improves LLM task harnesses.
It supports single-prompt and multi-step workflow harnesses, built-in episodic/semantic memory, self-authored tool generation, run recording/replay, and feedback-driven optimization.

Why Stilts

Most LLM apps stop at prompt engineering. Stilts treats prompting as an optimization loop:

  1. Generate an initial harness from a task description
  2. Generate an eval suite automatically
  3. Evaluate outputs with LLM-as-judge and optional outcome checks
  4. Analyze failure patterns
  5. Propose and apply changes
  6. Re-evaluate and promote or reject
  7. Repeat until convergence

Current Status

  • Self-improving harness proof-of-concept (prototype/research-stage backend)
  • CLI-first workflow
  • Persistence via local JSON file store (~/.stilts)
  • FastAPI service planned (see plan.md)

Features

  • Iterative optimization pipeline (ANALYZE -> PROPOSE -> GENERATE -> EVALUATE -> DECIDE)
  • Workflow DAG harnesses with per-node scoring
  • Synthetic + targeted + adversarial + feedback-derived test generation
  • Run recording and deterministic replay
  • Structured memory (episodic/semantic) and skill extraction
  • Cross-task transfer and self-model updates
  • Optional tool-calling (built-in + self-authored tools)
  • Parallel expert optimization mode

Repository Layout

stilts/
├── backend/
│   ├── stilts/
│   │   ├── cli.py
│   │   ├── engine/
│   │   ├── harness/
│   │   ├── runtime/
│   │   ├── skills/
│   │   ├── store/
│   │   └── tools/
│   ├── requirements.txt
│   └── tests/
├── plan.md
└── research/

Quick Start

1) Install dependencies

cd backend
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt

2) Set your LLM key

export OPENROUTER_API_KEY="your_key_here"

3) Create and optimize a task

python -m stilts.cli init "Classify support tickets by urgency and team" --name support-triage

4) Run the optimized harness

python -m stilts.cli run "User says billing failed twice and service is down" --task support-triage

Core CLI Commands

Command Purpose
init Create task + generate first optimized harness
optimize Run more improvement cycles
run Execute current best harness
history Show optimization changelog
runs List recorded runs
feedback Attach production feedback to run records
watch Check quality drift and auto-trigger optimization
replay Deterministic replay of recorded runs
compose / compose-run Build and run composed task pipelines
skill-list / skill-show Inspect learned skills
tools / tool-show Inspect self-authored tools

Safety Note (Authored Tools)

Authored tool execution is disabled by default.

If you are in a trusted environment and intentionally want to execute generated/authored tools:

export STILTS_ALLOW_UNSAFE_AUTHORED_TOOLS=1

Without this flag, authored tool validation/execution is blocked.

Development

Run tests:

cd backend
pytest -q

Compile check:

python -m compileall -q stilts tests

License

MIT

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages