Vision: your auto-optimizing local stack of agents, models, and engines

Our vision is that Lemonade can automatically produce an optimized end-to-end agentic stack for you.

Introduction

Agentic coding has upended local AI software development in 2026. We're seeing a rapid increase in the number of important engines upstream of Lemonade, as well as the number of important agents and apps downstream of Lemonade. This presents an exciting opportunity for Lemonade to serve as a central hub, similar to an "app store", where a curated selection of agents, engines, and models are distributed, auto-optimized, and "just work" with each other in a single click.

This work will improve adoption of local AI in both enthusiast and enterprise use cases by:

Vision

The fragmented ecosystem of engines should be abstracted away from users and developers. They should be automatically presented with an automatically optimized starting point for their use case, which we refer to as auto-opt.

In practice:

1

Select an agent

The user picks from a menu of options.

Hermes Pi AnythingLLM DeepSeek Harness etc.
2

Get a recommendation

Lemonade recommends a default model/engine combination known to work well with that agent on that system.

model + engine or your own choice
3

Install the stack

The entire stack is automatically installed and configured.

Agent Model Engine
1 clickLive in minutes

Theory

Auto-Opt is possible because there are two subjective aspects to setting up a local AI agent, and everything else has an objective answer.

Subjective
Agent Must meet the user's unique use case.
Model The results of every agent for every use case vary with model.

We can recommend a default model for each agent/system combination based on benchmark data.

once selected, everything else is deterministic
Objective
  1. Best engine for the modelSelected based on performance data for that system.
  2. Engine setupInstalled and configured to run the model on the target system.
  3. Agent setupInstalled and configured to talk to the engine and the user.

Future work may take this a step further by auto-optimizing the engine code itself for the specific hardware, model, and use case.

Enabling Technology

What do we need to build to enable the vision of auto-opt?

Engine Database

Deterministically selecting an engine for a target system is possible when we have a comprehensive database of performance for all relevant models/engine combinations on that system.

DimensionCoverage
PerformancePP, TG, memory, and power. For both the single-user and batched cases.
Relevant modelsThe latest releases from Qwen, Meta, Liquid, Google, etc.
SystemsStrix Halo first. Radeon 9700, Gorgon Halo, and non-AMD systems to follow based on availability.
EnginesAnything that has demonstrated significant community traction; at the time of this writing it should include DwarfStar4, Halogen, Gufo, and strix-llama.cpp engines.

Correctness

We should adopt a way to assess whether an engine correctly implements a model, since performance data for incorrect implementations should be disregarded. Donato's Terminal Bench Mini is a good candidate.

Official Submissions

A baseline of data will be collected using AMD's DevLab cloud.

User Submissions

The database should also support user-submitted data, which enables:

Engine Integrations

New engines should be integrated into Lemonade as soon as they meet the following criteria:

Engines will be classified into the following support tiers:

TierSupport
CoreSupported by Lemonade's maintainers for production use.
ExperimentalProvided by Lemonade's maintainers, but not supported for production use.
GuestDeveloped and published outside Lemonade's maintainers. Use at your own risk.

Agent Manager

Assists users with the installation, configuration, and launch of agents to work with local AI. Contains enough metadata about each agent's use case to enable automatic optimization, along with benchmark data, to recommend engines and models.

Candidate agents: Pi, AnythingLLM, Hermes, DeepSeek Harness, Claude Code, Codex, GitHub CLI.

We will also investigate deep integration of Pi into Lemonade, which could be used for:

Note: we are still working to define this capability in more detail. It will have a phased rollout, first enabling easy-to-deploy developer-first agents (e.g., Pi) before moving on to more complex cases. Model recommendations will be performed by humans until benchmark data is available.

Smart Router

The smart router enables the agents to easily take advantage of on-prem token servers (e.g., Instinct Coder, Threadripper Halo, etc.) and cloud APIs when available. Our work will improve the ease of configuration of such resources, such as by integration of Lemonade Nexus.

Maintainability

As Lemonade grows, certain measures are needed to ensure that we can sustain both high code velocity and high quality.

Container Strategy

Historically Lemonade has preferred to distribute native engines. We're adopting containers as a distribution mechanism for two reasons:

  1. Enabling sandboxed deployment, which keeps users' systems and data safer than running native binaries as the lemonade user.
  2. Minimizing the amount of glue logic needed to integrate new engines and agents.

Once containerized backends are available we will also investigate:

  1. Sandboxing native backends using nono.sh.
  2. Enabling container-based agents in the agent manager.

API Contract

The Lemonade Contract is a set of CI tests that assert certain APIs never receive breaking changes. It will solve two maintainability problems:

  1. PR reviewers need certainty that a PR they're approving won't have unintended downstream consequences.
  2. Downstream apps need certainty that they can take a dependence on these APIs.

Extensibility

Users should be able to try new agents, engines, models, and parameterizations without waiting for Lemonade to add in-tree support. This can be accomplished with the following extensibility interfaces:

Planned Refactors

There are a few major Lemonade code modules that recently hit their maintainability limit: PRs became too difficult to correctly review, so we stopped accepting contributions. The refactors will allow for greatly increased code velocity by adding specs, tests, and other guardrails to allow agents to autonomously write correct code.

ModuleFileRefactor
Model Managermodel_manager.cpp~7000 LoCRefactor into subclasses with crisp interfaces, which will enable future work such as custom user-provided model catalogs.
API serverserver.cpp~8000 LoCRefactor onto an endpoint base class, break into API-specific modules (OpenAI API, Lemonade API, etc.), and auto-generate the API docs. This will make endpoint modifications and additions much easier to review, and enable our API Contract work.
Smart Routerrouter.cpp~3000 LoCNeeds a clear architecture, to be determined.