Defer Streaming and Keep Langflow Focused on Evidence Flows
2026-05-31 · decision · 6 min read
Summary
Streaming is useful, but it is not the next priority. The current priority is to make the Langflow flows strong: search planning, SearXNG retrieval, source filtering, crawler extraction, reranking, evidence chunks, and citation-aware answering. The streaming work should be paused and recorded as a later architectural layer. When we return to it, the best path is a lightweight FastAPI gateway around Langflow, not forcing token streaming into every Langflow flow.Decision
Pause streaming implementation for now. Keep the active work focused on building and testing Langflow flows:- Search API-style flow
- Search with content flow
- Web search/open URL tool flow
- Sonar-style grounded QA flow
- Agent run schema flow
- Visual Onyx-style crawler flow
- Planner/reranker/citation Sonar flow
Alternatives Considered
Put streaming directly inside Langflow
This would mean trying to make each Langflow flow stream progress or token deltas through the normal Langflow run API. Why this is not the preferred path:- Langflow is strongest as a visual orchestration layer.
- The current
/api/v1/run/{flow_id}pattern is better for complete run results. - Streaming needs protocol-level control:
text/event-stream, keep-alive, cancellation, event ordering, and structured error events. - Forcing every flow to define its own streaming behavior would make the system harder to reuse.
Build a new full frontend and backend framework immediately
This would mean building a Perplexity-like UI, backend, stream protocol, and flow gateway all at once. Why this is not the preferred path:- The immediate bottleneck is not UI.
- The core product quality depends more on Langflow search/crawler/reranker/citation flows.
- A frontend should come after the API behavior stabilizes.
Add a small FastAPI gateway later
This is the chosen future direction. The gateway can expose:- OpenAI-compatible request shapes
- Perplexity-like response shapes
- SSE streaming
- tool trace events
- search progress events
- answer token deltas
- citation events
- error and cancellation handling
Rationale
The current Langflow work has already moved from simple web-connected answering to a stronger Perplexity-like skeleton:Trade-offs & Risks
The accepted trade-off is:Revisit Trigger
Return to streaming when one of these becomes true:- The main Langflow flows are stable enough that API ergonomics becomes the bottleneck.
- A frontend needs Perplexity-like progressive output.
- Agent runs need live tool traces.
- Long crawler or PDF workflows need progress events.
- External clients need OpenAI-compatible
stream: true.
Metadata
Quick Reference
Type: decision
Tags: langflow · streaming · gateway · architecture
Related: [[Using the Perplexity-Like Langflow Search Flows]]
Tags: langflow · streaming · gateway · architecture
Related: [[Using the Perplexity-Like Langflow Search Flows]]