惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

大猫的无限游戏
大猫的无限游戏
博客园 - 【当耐特】
Cloudbric
Cloudbric
H
Hackread – Cybersecurity News, Data Breaches, AI and More
Attack and Defense Labs
Attack and Defense Labs
爱范儿
爱范儿
The Cloudflare Blog
腾讯CDC
Security Archives - TechRepublic
Security Archives - TechRepublic
TaoSecurity Blog
TaoSecurity Blog
云风的 BLOG
云风的 BLOG
Recent Announcements
Recent Announcements
C
Check Point Blog
Schneier on Security
Schneier on Security
S
Schneier on Security
J
Java Code Geeks
B
Blog RSS Feed
Cisco Talos Blog
Cisco Talos Blog
Vercel News
Vercel News
Stack Overflow Blog
Stack Overflow Blog
博客园_首页
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
A
About on SuperTechFans
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Google DeepMind News
Google DeepMind News
阮一峰的网络日志
阮一峰的网络日志
罗磊的独立博客
A
Arctic Wolf
S
Secure Thoughts
P
Palo Alto Networks Blog
The Last Watchdog
The Last Watchdog
SecWiki News
SecWiki News
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
博客园 - 三生石上(FineUI控件)
D
Darknet – Hacking Tools, Hacker News & Cyber Security
量子位
U
Unit 42
I
InfoQ
D
DataBreaches.Net
P
Privacy International News Feed
T
Troy Hunt's Blog
博客园 - 叶小钗
T
Threatpost
博客园 - Franky
K
Kaspersky official blog
Hugging Face - Blog
Hugging Face - Blog
IT之家
IT之家
www.infosecurity-magazine.com
www.infosecurity-magazine.com
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
C
Cisco Blogs

Show HN

GitHub - steveking-gh/firmion: Firmion is DSL and engine for firmware image generation. GitHub - villagesql/villagesql-skills: Agent skills for VillageSQL - gemini-cli-extension; claude-code-plugin GitHub - flightdeckhq/flightdeck: Observability and control plane for AI agents. CSP Radar GitHub - Light-Heart-Labs/DreamServer: Turn your PC, Mac, or Linux box into an AI server. LLM inference, chat UI, voice, agents, workflows, RAG, and image generation. GitHub - Diplomat-ai/diplomat-agent-ts: What can your TypeScript AI agent do to the real world? Scan your code. See which tool calls have zero checks Code Block Selector - Visual Studio Marketplace Prometheus dependency graph — interactive showcase | Riftmap Show HN: I made a vi-like modal keyboard plugin for Figma GitHub - run-llama/liteparse: A fast, helpful, and open-source document parser GitHub - dalemyers/Roar: A macOS CLI tool for notifications GitHub - district-solutions/open-agent-tools-coder: Enables small-to-large self-hosted ai models to use local source code when running tool-calling agentic workloads. We actively data mine 20,900+ (2+ TB) popular github repos using large and small ai models to create reuseable: json, markdown and parquet files for local-first tool-calling models. GitHub - progapandist/stripeek: A local TUI proxy for real-time Stripe API debugging, built for navigating complex payloads fast. GitHub - sir1st/hermes-desktop: All-in-one cross-platform desktop app for Hermes Agent — bundles Python + hermes-agent + hermes-web-ui GitHub - astefanutti/shaderbang: Shebang for Shaders Show HN: Generate Claude Code Workflows using Spec Driven Development approach GitHub - nixys/nxs-universal-chart: The Helm chart you can use to install any of your applications into Kubernetes/OpenShift Show HN: AI agents for UK GDAD PCF roles and their skills The Two Pillars: Mixer Mode and Meta-Software in the Reorganization of Software Work After AI GitHub - JaiCode08/teleport-env What 1,000+ Harness Experiments Taught Me About Self-Improving Agents Show HN: Liiists, a Markdown-first, iOS and CLI list app SwiperTab – Get this Extension for 🦊 Firefox (en-US) GitHub - kouhxp/fftext: Summarize, explain, fact-check, or translate any text, URL, or file. No GPU. No cloud. One command GitHub - sweetpad-dev/sweetpad: Develop Swift/iOS projects using VSCode GitHub - dogmaticdev/IRON: IRON a.k.a. Intermediate Representation Object Notation is a Interpreter/Database that is used to create Programming Languages. GitHub - sjhalani7/vaen: Package your AI coding harness into a portable .agent file, and share it across repos, teams, & the community without ever having to copy-paste instructions, skills, MCP config, or secrets. Show HN: Gandalf the Grader Show HN: Citadeld – replay any CI failure locally from a single file GitHub - tdortman/cuSBF: High-Performance GPU Super Bloom Filter coral-ai/claude-code-token-xray at main · Coral-Bricks-AI/coral-ai GitHub - ulyssestenn/funes: Funes is a Git-based framework for LLM-managed knowledge work: an AI Librarian ingests raw sources, builds an interlinked Markdown knowledge base, and uses it to produce cited reports, analyses, and other outputs. GitHub - ThatXliner/gah: Git Add Hunk, built for agents to use GitHub - harmont-dev/harmont-cli: Command-line client for the Harmont CI platform GitHub - brooksmcmillin/mcp-authflow: OAuth 2.0 Authorization Server framework for MCP servers GitHub - javaid-codes/audit-supply-chain-agents GitHub - amorey/gochan: A small library of common channel architectures for Go, inspired by Rust GitHub - arifozgun/OpenGem: Free, Open-Source AI API Gateway with Gemini, OpenAI & Anthropic Compatibility in 1 file GitHub - Pranesh950/BioPetals: 🌸 Run BIOxAI models at home, BitTorrent-style. Fine-tuning and inference up to 10x faster than offloading GitHub - cnguyen14/bounty-doctor: Diagnose a GitHub bounty issue before you waste hours: detects honeypot scam repos, AI-bot attempt swarms, and stale contests. Show HN: CoreMCP – MCP Server for On-Prem DBs Show HN: KittyHTML – Render HTML/CSS as an inline image in your terminal GitHub - bingud/filemat: Web-based file manager Show HN: TruthLens – Free multi-signal deepfake image detector GitHub - apexlocal-jz/claude-usage-tray: Windows system-tray app showing your Claude Code rate-limit usage at a glance. Zero deps, ~300 lines of PowerShell. Cross-IDE (works regardless of VS Code, Cursor, plain terminal). Release v0.1.2.1 · kouhxp/yapsnap GitHub - noopolis/moltnet: Self-hostable chat network for AI agents. Pre-built bridges for Claude Code, Codex, and the Claws. Rooms, DMs, history. No Slack bots, no Matrix, no glue code. GitHub - tamerh/enju: Coordinating Humans, AI Agents, and Compute as Peers on a Shared Workflow Graph Show HN: Continuity-auth – Respect-weighted rate limits for the open web GitHub - luml-ai/luml: AI lifecycle platform where engineers and agents track experiments, train models, and ship to production. GitHub - mrdanielcasper/CoreTex: A UNIX-inspired, biomimetic, flat-file AI harness and knowledge engine. GitHub - clemg/pierre-github: Pierre's diffs.com and trees.software for Github GitHub - lyriks-io/unspaghettit: Behavior-driven AI development without prompt spaghetti. GitHub - sofumel/claude-handoff-revive: Resume Claude Code work after rate/usage/context limits without replaying the prior transcript. Auto-saves at 90%/95% usage. Plugin-installable, 10 languages. GitHub - dotexorg/saferpc: Typed, end-to-end encrypted RPC over any bidirectional channel. GitHub - BeeZeeAgent/beezee: Agent harness orchestration Legato Next.js Boilerplate for Internal Tools · CoreUI GitHub - clark-labs-inc/clark-hash: Clark Hash, 32x smaller searchable sketches for embeddings GitHub - ZeroPointRepo/youtube-mcp: The fastest YouTube transcript + YouTube search MCP for AI agents. Try for free. Typing Mastery — climb toward 100+ WPM, deliberately GitHub - Andebugulin/Awareen GitHub - fayzan123/claude-workflow-composer: Visual desktop app for composing multi-agent coding workflows. Drag agents, attach skills and MCPs, wire handoffs, export to .claude/ GitHub - harshaneel/humanize: Best static AI text humanizer. Two research-grounded skills that work in any LLM (Claude, ChatGPT, Gemini, Codex): humanize beats perplexity-based detectors, ai-check produces forensic scoring with evidence-quoted flags. Nine levers, 50+ peer-reviewed sources, 2024-2026 detection literature. GitHub - StackOneHQ/stack-nudge GitHub - nodes-app/swift-markdown-engine: A native AppKit Markdown editor for macOS, built on TextKit 2 and bridged to SwiftUI. We hardened an LLM agent. Each defense we added made it more exploitable. GitHub - alkait/WhatsKept: Agent-queryable WhatsApp history from an iOS backup — a single Go binary. GitHub - octelium/cordium: Open-source, general-purpose sandbox platform for devs and AI agents that provides identity-based secure access to infrastructure without credentials. WAR.GOV/UFO Microfilm5 GitHub - scosman/videowright: Build animated explainer videos with your coding agent GitHub - dipankar/dscode: The code editor you can take apart. GitHub - zoharbabin/web-researcher-mcp: MCP server (Go) for AI assistants: web search, content extraction, academic/patent/news research. Multi-provider routing, 4-tier scraping, search lenses. Works with Claude, Cursor, and any MCP client. GitHub - ruvnet/RuView: π RuView turns commodity WiFi signals into real-time spatial intelligence, vital sign monitoring, and presence detection — all without a single pixel of video. GitHub - scanaislop/aislop: Catch the slop AI coding agents leave in your code: narrative comments, swallowed exceptions, as-any casts, dead code, oversized functions. 50+ rules across 7 languages (TypeScript, JavaScript, Python, Go, Rust, Ruby, PHP). Sub-second, deterministic, no LLM at runtime. MIT-licensed. GitHub - kouhxp/cheap-im: CPU-only voice agent approximating Thinking Machines' Interaction Models demo GitHub - unprovable/OrchidMantis: Orchid Mantis — standalone framework for Zero-Knowledge Proofs of eXploit (ZKPoX). GitHub - MarcellM01/TinySearch: Shrink the web for your local LLMs! GitHub - TangibleResearch/Halgorithem: A Algo designed to detect AI Hallucitions GitHub - DO-SAY-GO/freelang: I love freelang GitHub - CarpseDeam/Aura-IDE: An AI coding harness that shaped itself - Planner/Worker agents, repo awareness, surgical edits, validation, recovery, and safe diff approvals. GitHub - chojs23/concord: A feature-rich TUI client for Discord GitHub - tommyjepsen/awesome-ux-skills: UX & AI Product designs skills you can use today in Claude Code GitHub - aerf-spec/aerf: Agent Evidence Receipt Format (AERF) — an open specification for tamper-evident, independently verifiable records of AI agent actions. GitHub - kklimuk/docx-cli: CLI for AI agents (Claude, Codex) to read, edit, and comment on .docx files with full format fidelity. GitHub - Jwrede/tokentoll: Catch LLM cost changes in code review. Infracost for LLM spend. GitHub - samchon/ttsc: A `typescript-go` toolchain for compiler-powered plugins and type-safe execution + 500x faster lint integrated into compiler GitHub - Higangssh/homebutler: 🏠 Manage your homelab from chat. Single binary, zero dependencies. GitHub - olalie/tapmap: See where your computer connects and what stands out on a live world map. GitHub - Diplomat-ai/diplomat-agent: What can your AI agent do to the real world? Scan your code. See which tool calls have zero checks GitHub - Bajusz15/beacon: Open-source agent for secure remote access, monitoring, and deploys across home-lab and self-hosted machines like Raspberry Pi, N100, or any Linux server. Open web based TTY or tunnel Home Assistant and other local services securely without opening ports. BigTech AI News - Chrome 应用商店 GitHub - vinhnx/VTCode: VT Code is an open-source coding agent with LLM-native code understanding and robust shell safety. Supports multiple LLM providers with automatic failover and efficient context management. GitHub - michaelaz774/decision-engine: A decision operating system for startup founders, powered by Claude Code. Synthesizes wisdom from 25+ legendary founders and investors into interactive AI-driven decision frameworks. GitHub - Chrilleweb/dotenv-diff: Validate environment variable usage in your codebase GitHub - Lumen-Labs/brainapi2: BrainAPI is a knowledge graph–powered AI memory layer that transforms unstructured data into structured knowledge, enabling intelligent search, recommendations, and contextual memory for AI agents and applications. GitHub - familiar-software/familiar: Let AI watch you work. Familiar lets your AI update its memory, skills, and knowledge by watching your screen. GitHub - skorotkiewicz/rudo: A small, elegant dock for Wayland GitHub - muxshed/shed: One stream in, or many. Every destination, simultaneously. No cloud middleman, no per-channel fees, no limits. make sidebar/address bar rounded corner toggleable
GitHub - syndicalt/llmff: FFmpeg for Inference
syndicalt · 2026-06-01 · via Show HN

llmff: FFmpeg-shaped pipelines for LLM workflows

llmff is an FFmpeg-shaped command-line and library tool for LLM inference pipelines. The MVP focuses on a typed pipeline graph, reproducible YAML manifests, backend adapters, local retrieval, JSON validation and repair, and JSONL traces.

Start Here

Install

Install from GitHub:

cargo install --git https://github.com/syndicalt/llmff llmff

Install the stable v1.0.0 release with:

cargo install --git https://github.com/syndicalt/llmff --tag v1.0.0 llmff

For a local checkout:

cargo install --path crates/llmff-cli

Verify the installed binary:

llmff --version
llmff stages list

Check local prerequisites without running a pipeline or calling provider endpoints:

llmff doctor \
  --run-dir .llmff/run \
  --plugin-dir ./plugins \
  --backend openai=https://api.openai.com/v1 \
  --api-key-env openai=OPENAI_API_KEY

Supported release targets and installer assumptions are documented in docs/platform-support.md.

Run the install smoke gate from a checkout:

scripts/smoke-install.sh --path .

Smoke test a generated release archive without installing:

scripts/smoke-archive.sh --archive dist/llmff-1.0.0-x86_64-unknown-linux-gnu.tar.gz

Run the release metadata preflight before creating or pushing a release tag:

scripts/release-preflight.sh v1.0.0

After release-tag CI completes, verify a published release's assets, checksums, and host-compatible packages:

scripts/check-release-assets.sh v1.0.0

Generate and validate Windows MSI packaging metadata:

scripts/package-windows-msi.sh --binary target/release/llmff.exe --version 1.0.0 --target x86_64-pc-windows-msvc --out-dir dist --emit-wxs-only

Build a Windows MSI on a Windows host:

dotnet tool restore
scripts/package-windows-msi.sh --binary target/release/llmff.exe --version 1.0.0 --target x86_64-pc-windows-msvc --out-dir dist

Smoke test a staged Windows MSI payload without installing:

scripts/smoke-windows-msi.sh --payload-root dist/windows-msi-smoke-root

Generate and validate macOS installer payload metadata:

scripts/package-macos-pkg.sh --binary target/release/llmff --version 1.0.0 --target aarch64-apple-darwin --out-dir dist --emit-payload-only

Smoke test a generated macOS installer payload without installing:

scripts/smoke-macos-pkg.sh --payload-root dist/llmff-1.0.0-aarch64-apple-darwin.pkgroot

Smoke test a generated Debian package without root:

scripts/smoke-deb.sh --deb dist/llmff_1.0.0_amd64.deb

Release tags build compressed binary archives, Ubuntu/Debian .deb packages, Arch PKGBUILD metadata, unsigned Windows MSI packages, and unsigned macOS .pkg packages in CI. Trusted Windows Authenticode signing and Apple Developer ID signing/notarization are deferred until paid credentials are available. See docs/platform-support.md for the current target matrix.

Tagged release builds publish archives, checksums, .deb packages, Arch metadata, Windows MSI packages, and macOS .pkg packages as GitHub Release assets. Manual workflow runs keep the same files as Actions artifacts.

Current Scope

  • llmff run <manifest> executes a pipeline manifest.
  • llmff inspect <manifest> dry-run validates graph references, stage requirements, conservative type compatibility, and backend availability.
  • llmff stages list prints built-in stage names.
  • llmff stages list --format json prints machine-readable stage metadata and capability flags.
  • llmff backends list prints built-in and explicitly registered backend families.
  • llmff backends list --format json prints machine-readable backend family metadata and capability flags, including backends registered with --backend, --ollama, or --plugin-dir.
  • llmff models list --format json prints runtime model metadata for built-in mock models, CLI-registered OpenAI-compatible or Ollama aliases, and plugin command backends.
  • llmff plugins list --plugin-dir <path> discovers llmff-plugin.yaml manifests and prints plugin capability metadata.
  • llmff run --plugin-dir <path> can execute plugin-provided stages, backends, and tool transports declared in those manifests.
  • llmff doctor checks local prerequisites such as binary version, run-dir writability, plugin manifest validity, API-key environment wiring, and optional release trust manifest presence without making network calls.
  • The core crate owns execution semantics; the CLI is a thin adapter.
  • Mock backends are available for deterministic local runs and tests.
  • An OpenAI-compatible backend exists in the core crate for /v1/chat/completions servers.

This is not a native inference kernel, model conversion tool, serving platform, or agent framework.

Example

Run the JSON repair example with deterministic mock model responses:

LLMFF_MOCK_BAD_RESPONSE='{"wrong":true}' \
LLMFF_MOCK_GOOD_RESPONSE='{"answer":"ok"}' \
llmff run examples/json-repair.yaml --trace /tmp/llmff-trace.jsonl

Run independent ready stages concurrently:

LLMFF_MOCK_GOOD_RESPONSE='{"answer":"ok"}' \
llmff run --parallel pipeline.yaml

Stream run and stage lifecycle events as JSONL:

LLMFF_MOCK_GOOD_RESPONSE='{"answer":"ok"}' \
llmff run --events - pipeline.yaml

Run a compact inline graph:

LLMFF_MOCK_GOOD_RESPONSE='{"answer":"ok"}' \
llmff run -i examples/question.txt \
  -g 'load | infer(model=mock:good) | write(-)'

Run inline retrieval over local documents:

llmff run -i examples/question.txt \
  -g 'load | retrieve(documents=examples/retrieval/python.txt;examples/retrieval/rust.txt,top_k=1) | write(matches.json)'

Use deterministic local embedding-style retrieval when lexical token overlap is too strict:

llmff run -i examples/question.txt \
  -g 'load | retrieve(documents=examples/retrieval/python.txt;examples/retrieval/rust.txt,top_k=1,strategy=embedding) | write(matches.json)'

Rerank retrieved matches without calling a remote service:

llmff run -i examples/question.txt \
  -g 'load | retrieve(documents=examples/retrieval/python.txt;examples/retrieval/rust.txt,top_k=2) | rerank(strategy=embedding,top_k=1) | write(matches.json)'

Cache an inline pipeline value across runs:

llmff run -i examples/question.txt \
  -g 'load | cache(path=.llmff/cache,key=prompt-v1) | write(cached-question.txt)'

Name inline stages and reference them explicitly:

LLMFF_MOCK_GOOD_RESPONSE='ok' \
llmff run -i examples/question.txt \
  -g 'load#prompt | template#render(examples/prompt.tmpl) | infer#draft(from=render,model=mock:good) | write#save(from=draft,path=answer.txt)'

Inline load reads stdin when -i/--input is omitted:

cat examples/question.txt | LLMFF_MOCK_GOOD_RESPONSE='{"answer":"ok"}' \
  llmff run -g 'load | infer(model=mock:good) | write(-)'

Inspect the manifest without running model calls:

llmff inspect examples/json-repair.yaml

Emit a machine-readable reproducibility report for agents and CI:

llmff inspect examples/json-repair.yaml --format json

The JSON report includes schema compatibility versions, the manifest hash, resolved inputs and outputs, stage order, backend registrations, plugin protocol metadata, plugin manifests, execution controls, and stdout ownership.

Inspect an inline graph without running model calls:

llmff inspect -g 'load | infer(model=mock:good) | write(-)'

inspect catches type mismatches that are statically provable, such as field-based route stages whose source is known to be text rather than JSON.

Inspect a manifest that references a registered backend alias:

llmff inspect pipeline.yaml \
  --backend openai=https://api.openai.com/v1 \
  --api-key-env openai=OPENAI_API_KEY

Inspect a manifest that references plugin stages:

llmff inspect pipeline.yaml --plugin-dir ./plugins

List built-in stages:

List stage capability metadata:

llmff stages list --format json

List backend capability metadata:

llmff backends list --format json

Include runtime-registered providers in backend metadata:

llmff backends list --format json \
  --backend openai_alt=https://api.example.test/v1 \
  --ollama local=http://localhost:11434 \
  --plugin-dir ./plugins

List runtime model metadata separately from backend family metadata:

llmff models list --format json \
  --backend openai_alt=https://api.example.test/v1 \
  --ollama local=http://localhost:11434 \
  --plugin-dir ./plugins

List plugin manifest metadata:

llmff plugins list --plugin-dir ./plugins --format json

Run a manifest that uses plugin capabilities:

llmff run pipeline.yaml --plugin-dir ./plugins

Plugin stage capabilities run as stdin/stdout command stages with op: plugin:<capability-name>. Plugin tool transports run through op: tool with transport: <capability-name>. Plugin backend capabilities register their capability name as a model alias, so a backend named local-echo serves manifest model ids such as local-echo:test-model. Backend commands receive the serialized inference request on stdin and return JSON on stdout:

{"text":"model output","usage":{"prompt_tokens":12,"completion_tokens":8,"total_tokens":20}}

Plugin sampler capabilities can be attached to infer and repair stages with sampler: <capability-name>. Sampler commands receive the serialized inference request on stdin and return JSON sampling overrides on stdout:

{"temperature":0.1,"top_p":0.9,"max_tokens":256,"seed":12345,"response_format":"json","stop":["DONE"]}

Only returned fields are applied; omitted fields keep the stage or backend defaults.

Use stdin/stdout by setting manifest input or output paths to -.

Inline graphs support op, op(value), and op(key=value) stage syntax for run and inspect. A stage can be named as op#id, and later stages can use from=id to reference it instead of the previous stage. Use semicolons inside the documents value for inline retrieve, such as documents=docs/a.txt;docs/b.txt. Inline retrieve and rerank accept strategy=lexical or strategy=embedding. Inline tool supports command, method, url, and header:<name> parameters. Manifests remain the canonical format for complex branching graphs and version-controlled recipes.

Call a command tool from an inline graph:

llmff run -i examples/question.txt \
  -g 'load | tool(command=/bin/cat) | write(tool-output.txt)'

Call an HTTP tool from an inline graph:

llmff run -i examples/question.txt \
  -g 'load | tool(method=POST,url=http://127.0.0.1:8080/process,header:content-type=text/plain) | write(tool-output.txt)'

For development without installing, prefix commands with cargo run -p llmff --, for example:

cargo run -p llmff -- inspect examples/json-repair.yaml

Manifest stages may be written in any order. llmff validates references across the full graph and executes stages in dependency order. By default stages execute sequentially for deterministic local behavior; run --parallel executes independent ready stages concurrently.

run --events <path> writes the same JSONL lifecycle events as --trace while the pipeline is running. Use run --events - to stream those events to stdout for supervisors, dashboards, or shell pipelines. Keep pipeline outputs pointed at files when streaming events to stdout to avoid interleaving two data streams.

Manifest stages can reference file-backed resources relative to the manifest:

graph:
  - id: render_prompt
    op: template
    from: load_prompt
    path: ./prompt.tmpl

  - id: apply_policy
    op: system
    from: render_prompt
    path: ./policy.md

  - id: validate
    op: validate_json
    from: draft
    schema_path: ./answer.schema.json

Inputs default to text. Set format: json to parse an input into a structured JSON value:

inputs:
  payload:
    path: ./payload.json
    format: json

JSON inputs can be templated by object field and used by field-based routes. Invalid JSON fails the load stage with a stage execution error.

template replaces {{input}} when the parent value is text. When the parent value is a JSON object, object fields are available by name, such as {{name}}.

system with a path preserves chat roles for model calls: the file contents become a system message and the parent value becomes a user message. Text-only stages render messages conservatively as role: content lines when they need a string.

Retrieve stages select local UTF-8 documents with deterministic lexical scoring:

graph:
  - id: retrieve_context
    op: retrieve
    from: load_prompt
    documents:
      - examples/retrieval/python.txt
      - examples/retrieval/rust.txt
    top_k: 1

retrieve renders its parent value as query text and returns JSON with query, strategy, and matches. The default strategy: lexical tokenizes the query and each document, scores documents by matching unique query terms, then sorts by score and path. strategy: embedding uses deterministic local character n-gram vectors and cosine similarity so near-overlap text can rank even when whole tokens differ. Embedding retrieval can persist those local vectors with index: .llmff/retrieve/context.index.json; matching document metadata is reused on later runs, changed documents are re-indexed, and the output includes index.path, index.reused_documents, and index.indexed_documents. strategy: command runs a stdin/stdout command provider for remote embedding services or external vector indexes. The command receives JSON with query, documents, and optional top_k, and returns retrieve-shaped JSON. Document paths are relative to the manifest unless absolute. top_k is optional and must be greater than zero when present.

rerank accepts retrieve-shaped JSON with query and matches, rescoring each match's text with strategy: lexical or strategy: embedding. strategy: command runs a stdin/stdout command provider for learned reranker models. The command receives the retrieve-shaped JSON plus optional top_k, and returns retrieve-shaped JSON. Local reranking preserves match fields, replaces score, writes the selected strategy, and applies optional top_k after sorting.

Cache stages persist and reuse successful parent values across runs:

graph:
  - id: cached_prompt
    op: cache
    from: render_prompt
    path: .llmff/cache
    key: prompt-v1

cache stores typed values as versioned JSON records under path, defaulting to .llmff/cache. With an explicit key, the manifest author controls the cache identity; without one, the parent value is part of the digest. Cache stages do not require environment variables and only cache successful parent values.

Route stages choose between already-computed stage outputs:

graph:
  - id: choose_final
    op: route
    from: validate
    on_success: validate
    on_invalid: repair

For JSON object outputs, route can select by scalar field value:

graph:
  - id: choose_model_output
    op: route
    from: classify
    field: kind
    cases:
      simple: fast_answer
      hard: strong_answer
    default: fast_answer

Stages can be guarded with when so they only run when their parent stage has a matching status:

graph:
  - id: repair
    op: repair
    from: validate
    when: invalid
    model: mock:good

Supported conditions are success, invalid, and skipped. A non-matching condition marks the guarded stage as skipped before any stage-specific work runs, so model calls, tool calls, and writes are not invoked for skipped stages. Skipped stages still appear in traces with status=skipped.

Tool stages call explicitly declared commands or HTTP endpoints:

graph:
  - id: normalize
    op: tool
    from: render_prompt
    command: ["/bin/cat"]

Command tools use argv directly, never a shell string. The serialized parent value is written to stdin and stdout becomes the stage output.

graph:
  - id: call_endpoint
    op: tool
    from: render_prompt
    method: POST
    url: http://127.0.0.1:8080/process
    headers:
      content-type: text/plain

HTTP tools require method and url. POST, PUT, and PATCH send the serialized parent value as the request body; response text becomes the stage output.

Write stages persist a successful parent value from inside the graph and forward the same value:

graph:
  - id: save_answer
    op: write
    from: validate
    path: ./answer.json

Top-level outputs remain supported for simple final outputs. Use write when the pipeline itself should express the write step, or when an intermediate value should be saved.

Trace Notes

--trace <path> writes JSONL events for run and stage lifecycle events. Trace events include timestamp_ms; stage_finished events also include duration_ms.

Stage traces add safe operation metadata when available:

  • model, backend, and provider_model for model-calling stages.
  • prompt_tokens, completion_tokens, and total_tokens for model-calling stages when the backend reports usage.
  • validation_errors for invalid validation results.
  • tool_kind and tool_target for tool stages.
  • output_path for write stages.
  • cache_hit and cache_path for cache stages.

Trace metadata intentionally avoids full prompt bodies, cached values, tool stdin/stdout, headers, and secrets.

Summarize a trace file:

llmff trace /tmp/llmff-trace.jsonl

The trace summary prints run status, stage status, duration, and safe metadata only. Total usage is summarized as usage=<total>.

Backend Notes

The CLI keeps backend registration explicit. This keeps commands portable and FFmpeg-like: the command line describes the run, while environment variables are only used when you choose to read a secret by name.

run and inspect accept the same backend registration flags. inspect validates that model ids resolve to configured backends, but it does not call model servers, tools, or pipeline stages.

Register an OpenAI-compatible backend:

llmff run pipeline.yaml \
  --backend openai=https://api.openai.com/v1 \
  --api-key-env openai=OPENAI_API_KEY

OpenAI-compatible backend URLs may point either at the server root or at the API root. Both https://api.openai.com and https://api.openai.com/v1 resolve to the /v1/chat/completions endpoint.

Then reference that backend alias from a manifest:

graph:
  - id: draft
    op: infer
    from: load_prompt
    model: openai:gpt-4.1-mini

The model id before the first colon is the backend alias. The model id after the first colon is sent to the provider.

For local OpenAI-compatible servers that do not require auth, omit the key flag:

llmff run pipeline.yaml \
  --backend local=http://localhost:8000/v1

Register a native Ollama backend:

llmff run pipeline.yaml \
  --ollama ollama=http://localhost:11434

Then reference the alias from a manifest or inline graph:

graph:
  - id: draft
    op: infer
    from: load_prompt
    model: ollama:llama3.1

Model-calling stages accept portable sampling controls:

graph:
  - id: draft
    op: infer
    from: load_prompt
    model: openai:gpt-test
    temperature: 0.2
    top_p: 0.9
    max_tokens: 256
    seed: 12345
    response_format: json
    stop:
      - "\nEND"
      - "</answer>"

OpenAI-compatible backends receive temperature, top_p, max_tokens, seed, response_format, and stop. They also expose a streaming contract for server-sent chat completion deltas. Use llmff run --stream-stage <stage-id> to stream one stage to stdout while still writing the normal manifest outputs. For infer stages, llmff streams backend token deltas as they arrive; for deterministic and integration stages, it streams the serialized stage payload when the stage finishes. Do not combine --stream-stage with --events - or manifest outputs that write to -; write lifecycle events and final outputs to files to keep the stream clean. Ollama receives the same controls under options except response_format: json, which maps to the top-level Ollama format: "json" hint. Inline graphs accept seed=12345, response_format=json, and stop sequences with semicolon separators, such as stop=END;DONE.

Mock backends remain available for deterministic local runs and tests:

  • LLMFF_MOCK_BAD_RESPONSE
  • LLMFF_MOCK_GOOD_RESPONSE

Those mock env vars are convenience fixtures, not the primary backend configuration model.

llmff models list reports the runtime model aliases that the current command line makes available. JSON output includes the model alias, backend name, backend kind, runtime class, source, registration flag, API key requirement, and portable capability flags.

Limitations

  • Schema values are inline JSON strings in the current manifest format.
  • llmff run --stream-stage <stage-id> streams one selected stage to stdout. infer stages stream token deltas when the backend supports them; other stages stream their serialized payload after the stage finishes.
  • Plugin manifests can be discovered and listed, and plugin stages, backend commands, tool transports, and samplers can run through stdin/stdout plugin entrypoints.
  • Multimodal values are not implemented yet.
  • Native model loading, quantization, and hardware scheduling are out of scope for this MVP.