r/AIAgentsStack

I built an open-source, self-hosted AI gateway: 237 providers (90+ free), auto-fallback combos, and a 10-engine token-compression pipeline (MIT)
▲ 325 r/AIAgentsStack+69 crossposts

I built an open-source, self-hosted AI gateway: 237 providers (90+ free), auto-fallback combos, and a 10-engine token-compression pipeline (MIT)

Builders-welcome post with the substance up front (disclosure: I'm the maintainer). OmniRoute is a free, MIT, self-hosted AI gateway — one OpenAI-compatible endpoint over 237 providers — built around two problems: runs dying on a provider 429, and tokens bleeding on tool/log output.

One endpoint, 237 providers — 90+ of them free. You point any tool or agent at a single OpenAI-compatible endpoint (localhost:20128/v1) and it can reach 237 LLM providers without you rewriting anything. 90+ have free tiers and 11 are free forever (no card), which aggregates to ~1.6B documented free tokens/month — and that's honest, pool-deduped math (we count each shared pool once instead of inflating it; the methodology is public in the repo). There's a one-command setup-* for 13+ coding tools (Claude Code, Codex, Cursor, Cline, Roo, Kilo, Gemini CLI…), so switching your existing setup over takes seconds.

Fallback combos — so it never stops mid-task. A "combo" is a ladder of models the router walks automatically: your subscription first, then API keys, then cheap models, then free ones. When a provider returns a 500 or you hit a rate limit, it slides to the next target in milliseconds, mid-request, and your tool never even sees the error. There are 17 routing strategies (priority, weighted, round-robin, cost-optimized, auto/coding:fast…) plus three resilience layers — a per-provider circuit breaker, a per-key cooldown, and a per-model lockout — so one dead key can't take down a whole provider.

Fusion — an ensemble mode for the hard steps. Beyond simple routing, there's a fusion strategy that fans a single prompt out to a panel of different models in parallel and then has a judge model synthesize one best answer (mixture-of-agents, built in). It's cost-aware, so easy turns stay on one fast model and it only fuses when the step is worth it.

A 10-engine compression pipeline — the part most routers don't have. Every request flows through a transparent compression pass you can toggle/stack per combo. Instead of one trick, it stacks the best of the open-source ecosystem: RTK filters command/tool output (git diffs, test logs, builds) at 60–90%, Microsoft's LLMLingua-2 does ML semantic pruning, Caveman handles prose, session-dedup strips repeats across turns. Critically, code, URLs and JSON are preserved byte-perfect, and a default-on inflation guard throws the compressed version away and sends the original if compressing would actually grow the prompt — it never makes things worse. On tool-heavy sessions that's ~89% average input-token reduction (an 8k-token git diff becomes a few hundred). Full credit to every upstream project (RTK, Caveman, LLMLingua-2, Troglodita) is in the README.

Agent-native — the agent can drive the router itself. There's a built-in MCP server (95 tools across 30 audited scopes, over stdio / SSE / streamable-HTTP), plus A2A (v0.3, JSON-RPC 2.0) support. That means an agent can query providers, switch combos, read its own remaining quota and manage memory through the gateway — not just consume tokens through it.

It's 100% local (zero telemetry, AES-256-GCM at rest), MIT-licensed, has a prompt-injection guard on every LLM route, opt-in memory, and runs on npm, Docker, desktop or your phone via Termux.

For context on whether it's worth your time: it's grown to ~9.8K GitHub stars, 1,490+ forks and 280+ contributors in ~4.5 months, with 21,000+ automated tests and 1,830+ issues closed — so it's a battle-tested project, not a brand-new experiment.

npm install -g omniroute

GitHub: https://github.com/diegosouzapw/OmniRoute · Site: https://omniroute.online

Would value a critique of the routing/compression architecture from this crowd.

u/ZombieGold5145 — 2 days ago
▲ 12 r/AIAgentsStack+9 crossposts

Open handoff: Thought Tree, a markup/spec idea for modular LLM workflows

I’m releasing an open handoff draft of a framework I’ve been developing called the Thought Tree AI Framework.

At its core, the framework uses a simple pattern:

Data Units → Operations → Data Units

A Thought Tree program applies this recursively. Complex cognitive work is decomposed into named artefacts, transformations, contracts, modules and traces.

It came out of experiments with Auto-GPT-style agents, creative production pipelines and the need to separate what LLMs are good at from what deterministic code should handle.

I don’t currently have time to continue developing it properly, so I’m releasing it as an open handoff for anyone who wants to critique, fork, implement or reinterpret it.

The repo includes:

- a concise README;

- one-page summary;

- draft TTML schema;

- minimal example workflow;

- roadmap;

- original long-form explainer.

I’m especially interested in whether people see value in Thought Tree as:

- an intermediate representation for LLM workflows;

- a design vocabulary for structured AI production;

- a small open-source executor;

- or something that could map onto LangGraph / LlamaIndex / other orchestration tools.

Repo: https://github.com/RobertBateman/thoughttree-framework

Feedback, criticism, forks and maintainers welcome.

u/xavier1764 — 6 days ago

I think "abandoned cart recovery" is solving the wrong problem.

Hear me out.

Most ecommerce teams only start talking to a customer after they've left.

Cart abandoned?
Send an email.

Still no purchase?
Send a discount.

Still nothing?
Retarget them.

But by then, the decision has already happened.

Lately I've been looking at session recordings, customer interviews, and Reddit threads, and most people don't leave randomly.

They hesitate first.

They compare products.

They check shipping.

They open your return policy.

They read reviews.

Sometimes they even Google your brand before coming back.

That's where the buying decision is actually happening.

The cart is just the final symptom.

We've been testing a more behavior-first approach using Markopolo, where the AI reacts to those signals instead of waiting for an abandoned cart event. It's less about "recovering" customers and more about helping them before they disappear.

It made me realize we've probably been optimizing the last step of the journey while ignoring everything that happens before it.

Curious if anyone else has shifted from event-based automation to behavior-based automation.

reddit.com
u/Ok-Community-4926 — 8 days ago
▲ 4 r/AIAgentsStack+1 crossposts

A client had plenty of traffic but almost no revenue growth. The fix wasn't more ads.

Worked with an ecommerce brand recently that had a problem I keep seeing everywhere.

Traffic was growing.

Email open rates looked fine.

Add-to-carts were happening.

Revenue barely moved.

The first assumption was "we need more traffic."

Wrong.

After digging through session recordings, customer conversations, and Reddit discussions, we noticed something interesting:

Most visitors weren't leaving because they hated the product.

They were leaving because they were stuck.

Comparing options.

Looking for reviews.

Checking shipping details.

Opening competitor tabs.

The funny part is that almost every tool in the stack treated those visitors exactly the same.

Generic abandoned cart email.

Generic discount.

Generic retargeting ad.

Once we started responding differently based on behavior, things changed fast.

Researchers got social proof.

Price-sensitive shoppers got offers.

High-intent visitors got immediate follow-up.

Conversion rate improved significantly without increasing traffic.

Made me realize most ecommerce stacks are still built around segments, while customer decisions happen at an individual level.

Curious what tools people are actually using for this today.

Here's what I've come across:

Klaviyo
Great for email marketing and traditional flows. Strong ecosystem. Still mostly rule-based.

Omnisend
Easy to use for ecommerce. Email + SMS. Good for smaller teams.

Braze
Powerful enterprise platform. Handles large-scale customer journeys.

Customer.io
Flexible automation. Good if you want lots of customization.

Markopolo
Interesting approach. Uses behavioral signals and AI agents to decide channel, timing, and messaging per visitor instead of relying mainly on predefined flows.

Feels like we're slowly moving from campaign automation to decision automation.

Anyone else seeing this shift?

reddit.com
u/Flaky_Site_4660 — 11 days ago
▲ 19 r/AIAgentsStack+2 crossposts

Claude Code vs Cursor vs Codex: what are people actually using in production?

A few months ago the answer felt obvious.

Cursor was everywhere.

Now every other dev I talk to seems to be experimenting with Claude Code or Codex.

What's interesting is that everyone seems to use them differently.

Cursor
Great editor experience.
Feels like the easiest one to adopt.
Most people I know use it for day-to-day coding.

Claude Code
Seems to be winning with people who want to hand over larger chunks of work.
I've seen teams use it for debugging, refactors, documentation, and entire feature implementations.

Codex
Still seeing mixed opinions.
Some people love how deeply it understands codebases.
Others say they're not reaching for it as often as Claude Code.

The thing I've noticed is that the conversation has shifted.

A year ago people were comparing models.

Now they're comparing workflows.

Which tool actually saves time?
Which one breaks things less?
Which one can you trust with real production code?

Curious where everyone has landed.

If you had to pick only one today, Claude Code, Cursor, or Codex, what are you choosing and why?

reddit.com
u/Flaky_Site_4660 — 14 days ago
▲ 4 r/AIAgentsStack+2 crossposts

How do you keep AI agent costs from spiraling in production?

For anyone running agents in prod (or even heavy LLM workflows), how do you actually keep spend under control?

A few things I'm curious about:

- Do you set a budget per agent, or just watch the total bill?

- How do you catch a runaway before the invoice shows up?

- Can you tell which agent or task drove a cost spike, or is it basically a black box?

Trying to get a real picture of how teams handle this. War stories very welcome, especially the "we found out at month-end" kind.

Thanks!

reddit.com
u/Fine-Charge6149 — 13 days ago

The best customer research I've done this year came from Reddit, not surveys

We spent months asking customers what they wanted.

Surveys.
Feedback forms.
NPS responses.

Got plenty of answers.

Then I spent a weekend reading Reddit threads where people were discussing the exact problem we solve.

The difference was honestly shocking.

Customers tell surveys what they think.

They tell Reddit what they actually feel.

Instead of:

"Price is a concern."

You see:

"I almost bought it but couldn't justify spending another $40."

Instead of:

"Looking at alternatives."

You see:

"I had 3 tabs open for an hour and still couldn't decide."

Those tiny details completely changed how we think about messaging.

Now before launching anything new, I spend more time reading comment sections than dashboards.

Curious if anyone else has had this experience.

What's the most valuable customer insight you've found outside traditional research?

reddit.com
u/Ok-Community-4926 — 14 days ago