RAGSpine

Introduction

RAGSpine is an offline-first Python RAG engine with deterministic dual-channel retrieval, provenance, workflow scaffolding, and optional HTTP compatibility surfaces.

RAGSpine is a framework-free backend RAG engine assembled with ordinary Python functions and typed Protocols. Its structured channel answers questions whose evidence is a fact table; its narrative channel retrieves cited text. The orchestrator routes between them and replaces an unsupported answer with an explicit refusal. A deterministic MockProvider keeps the base path usable without an API key.

RAGSpine now also includes workflow tooling. The ragspine command can turn a natural-language description into a safe Dify 0.6 workflow, reuse a close bundled template, serialize JSON or YAML, and emit a versioned graph preview. JSON, YAML, and TOML workflow documents can be normalized to a JSON-compatible mapping. These compatibility tools do not turn the engine into Dify or n8n, and the runtime never downloads or executes an upstream marketplace workflow.

What is enforced

  • No unsupported values. A failed structured lookup becomes not_found, regardless of model prose.
  • Source lineage. Facts and narrative snippets retain document and locator information.
  • Restricted-content isolation. Restricted children are removed before prompt assembly; parent/window expansion cannot reintroduce them.
  • Explicit execution. Workflow scaffolding, parsing, conversion, compilation, and preview are non-executing operations. Dify and n8n execution routes are disabled by default.
  • Pluggable edges. Providers, embeddings, stores, rerankers, chunkers, queues, connectors, and other integrations enter through typed seams.

Start here

Repository version and published package

The published reference baseline is rag-spine 0.13.0. Check the installed version with ragspine version. Pages discussing unreleased main features may differ; this baseline does not claim every source-tree page has been validated against the release.

Major domains

On this page