Launch HN: Respan (YC W24) – Open-source Rust AI gateway built around plugins
Introducing Respan (YC W24): A Plugin-First AI Gateway Crafted in Rust
Respan, a fresh graduate of the YC Winter 2024 cohort, is redefining how developers interface with Large Language Models (LLMs). At its core, Respan is an open-source AI gateway designed specifically for extensibility, performance, and reliability.
Rather than offering a rigid, monolithic proxy, Respan is built entirely around a plugin architecture, allowing teams to customize their AI infrastructure without fighting the core codebase.
🚀 The Core Philosophy
Most AI gateways are static wrappers flexible but bloated. Respan takes a different approach by leveraging Rust to ensure that the overhead added between your application and the LLM is negligible.
"The goal is to provide a high-performance foundation where the logic of the gateway—routing, caching, and observability—is decoupled from the core engine via plugins."
Why Rust?
The choice of Rust isn't just about trendiness; it's about the math of latency. If is the total latency, then: By minimizing through Rust's zero-cost abstractions and memory safety, Respan ensures that the gateway doesn't become the bottleneck.
🛠 Technical Architecture
Respan acts as the intelligent intermediary. Instead of your app calling OpenAI or Anthropic directly, it calls Respan, which then executes a pipeline of plugins before forwarding the request.
Key Capabilities
| Feature | Description | Benefit |
|---|---|---|
| Plugin System | Modular logic hooks | Infinite extensibility |
| Rust Core | Compiled, memory-safe binary | Ultra-low latency |
| Open Source | Transparent codebase | No vendor lock-in |
| Multi-LLM Support | Unified interface for various APIs | Easy model switching |
🧩 The Power of Plugins
Respan allows you to inject custom logic at various stages of the request lifecycle. You can implement:
- Dynamic Routing: Send requests to GPT-4 for complex tasks and GPT-3.5 for simple ones.
- Intelligent Caching: Store common prompts to reduce costs and speed up response times.
- Observability: Log every token and latency metric to your preferred dashboard.
- Guardrails: Filter sensitive data before it leaves your network.
Example Configuration
Here is a conceptual look at how a plugin might be defined in a respan.toml or similar config:
// Conceptual Rust plugin snippet
impl Plugin for CachePlugin {
fn on_request(&self, req: Request) -> Response {
if let Some(cached_res) = self.cache.get(&req.prompt) {
return Response::from_cache(cached_res);
}
req.next()
}
}
🖼 Visualizing the Workflow
Figure 1: Conceptual flow of a request passing through the Respan plugin pipeline.
🏁 Getting Started
If you are looking to integrate Respan into your stack, here is the general roadmap:
- Clone the open-source repository.
- Configure your LLM API keys in the environment.
- Select or write your first
Rustplugin. - Deploy the binary to your production environment.
Whether you need to manage costs, ensure security, or simply want a unified API for all your AI models, Respan provides the industrial-grade tooling necessary to scale AI applications.