arakoodev/EdgeChains

EdgeChains.js is Full-Stack GenAI library. Front-end, backend, apis, prompt management, distributed computing. All core prompts & chains are managed declaratively in jsonnet (and not hidden in classes)

What it solves

EdgeChains treats Generative AI development as a configuration management challenge rather than a UI or library design problem. It addresses the "prompt explosion" (where different LLMs require different prompt styles) and "prompt drift" (where LLM behavior changes over time), allowing developers to manage prompts as declarative configuration rather than hard-coded logic.

How it works

Built on top of Honojs and Jsonnet (a configuration language by Google), EdgeChains separates prompt and chain logic from the application code. Prompts are written in Jsonnet files, making them versionable, diffable, and capable of being hosted externally (e.g., in S3 or via API). The framework uses a WebAssembly runtime to automatically parallelize LLM chains and chain-of-thought tasks across CPUs, GPUs, and TPUs.

Who it’s for

Developers building production-ready GenAI applications who need a scalable, fault-tolerant way to manage complex prompt engineering and chain-of-thought workflows across multiple LLM providers.

Highlights

  • Declarative Prompting: Prompts live outside the code in Jsonnet files for easier versioning and testing.
  • Automatic Parallelism: Leverages WebAssembly to distribute tasks across available hardware (CPUs, GPUs, TPUs).
  • Fault Tolerance: Built-in retry and backoff mechanisms for failed requests.
  • Cost Tracking: Includes fine-grained measurement of token costs for prompts and chains.
  • Simplified Deployment: Production applications can be executed using just one script file and one Jsonnet file.