Skip to main content
It reads your key from LEVANTO_API_KEY.

Decisions

The state can be text, JSON or a list of chat messages. Every answer comes back, so set your own threshold on the probability. To get null when Sage isn’t sure, or to send images, call /decide. Options: reasoning, grounding and timeout, as in the SystemOne API.

Guard an agent

LangChain’s auto-mode middleware asks Sage, before each listed tool runs, whether the call is risky or wasn’t asked for. Sage blocks it if so.
ModelRouterMiddleware (modelRouterMiddleware in TypeScript) takes Sage the same way, as its classifier, to pick a model per run.

LLMs

The model defaults to auto, which lets the router pick. Streaming, tools and structured output work as with ChatOpenAI. Source: github.com/levantolabs/langchain-levanto.