npm.io
0.9.9 • Published 9h ago

@younndai/lyt-llm

Licence
Apache-2.0
Version
0.9.9
Deps
1
Size
73 kB
Vulns
0
Weekly
0

Lyt

@younndai/lyt-llm
The LLM gateway — multi-provider routing for AI-assisted vault operations, with hard cost budgets, on your terms.
Part of the Lyt toolchain — federated markdown vaults you own, made legible to AI.

Website · Repository · Apache 2.0 · Trademark Policy · Contributing

npm license status

Public alpha — under active testing. Lyt works and we use it daily, but surfaces change between releases and docs are still growing. Install only via the alpha dist-tag. Your vaults are plain markdown in plain git repos — your data is never locked in, and Lyt never phones home.

What is this?

@younndai/lyt-llm is the LLM gateway of Lyt — multi-source LLM routing for AI-assisted vault operations, designed around one principle: you choose where intelligence runs. Local model via Ollama, your own provider keys, your existing Claude Code / Codex subscription, or external providers through a relay — the gateway composes four adapters behind a single createLlmGateway() surface, and your knowledge only goes where you point it.

This keeps Lyt's AI-first posture honest on the model side too: automations that need an LLM step declare a source preference, not a hard-wired vendor, and a per-run cost-budget hard-stop guarantees a runaway automation can't burn through an API budget. No hidden defaults, no silent cloud calls — the gateway is configuration you can read.

You usually do not install this package directly — it is pulled in by @younndai/lyt and consumed by @younndai/lyt-runner.

Install (standalone)

npm install -g @younndai/lyt-llm@alpha

The four adapters

Adapter Routes to Use when
harness Claude Code / Codex skill invocation You already pay for an agent subscription — reuse it, no extra keys
ollama OpenAI-compatible local HTTP at localhost:11434 Fully local inference — knowledge never leaves the machine
byok Your own provider keys (Anthropic, OpenAI, …) Direct provider access under your own account + billing
ai-relay External providers via @younndai/ai-relay Managed multi-provider routing

Routing honours per-automator source_preference + hard_constraints — for example "local only, never external" is a declared, enforced constraint, not a hope.

Cost control

  • Per-run hard-stop — a run that exceeds its declared budget is stopped, not billed onward.
  • Monthly budget — warn-level in v1.

Programmatic use

import { createLlmGateway } from "@younndai/lyt-llm";

The gateway registers std:llm.generate@v1, std:llm.stream@v1, std:llm.generate_object@v1, and std:llm.embed@v1 ops with @younndai/lyt-runner, so YON automators can declare LLM steps like any other governed operation.

The Lyt toolchain

Package Role
@younndai/lyt The unified lyt CLI (meta package)
@younndai/lyt-vault The vault primitive
@younndai/lyt-mesh The mesh layer — multi-vault operations
@younndai/lyt-skills Agent-harness skills (Claude Code, Codex, agents)
@younndai/lyt-mcp The MCP server
@younndai/lyt-runner The YON automation runner
@younndai/lyt-llm This package — the LLM gateway

About YounndAI

YounndAI — You and AI, unified. (pronounced "yoon-dye")

A philosophy of intelligence: building with intention, so humans and machines think together without losing what makes either whole.

License & Attribution

Apache-2.0. 2026 MARLINK TRADING SRL (YounndAI). See LICENSE and NOTICE.

"LYT", "Lyt", and "YounndAI" are trademarks of MARLINK TRADING SRL — see TRADEMARK.md.

Created by Alexandru Mareș.

Website: linkyourthink.com

Structure before scale. Harmony above all.


Project Lyt — Link Your Think
Author Alexandru Mareș
Company MARLINK TRADING SRL · YounndAI
License Apache 2.0 — 2026 MARLINK TRADING SRL
Trademark YounndAI Trademark Guidelines

Keywords