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 current documentation follows the repository's main source, whose package metadata is 0.11.0. That number is a source-tree version, not a statement that PyPI already serves 0.11.0. For reproducible released behavior, check the version selected by your package manager with ragspine version; use an editable source install when following unreleased main documentation.

Major domains

On this page