Yantra is a local-first platform for public-web research, governed browser automation, and deterministic saved workflows. It provides a CLI and a browser-based app, with application-enforced boundaries for consent, secrets, outbound access, budgets, validation, and local audit records.
Yantra is intentionally focused on browser and web tasks. It is not a general desktop, shell, filesystem, or code-execution agent.
This repository is a private, unpublished 0.0.1 pnpm workspace. Build and run both apps from a source checkout.
@yantra/protocoldefines the shared Zod contracts and generates TypeScript types, JSON Schema, and the protocol reference.@yantra/coreprovides the provider-independent browser, workflow, research, policy, persistence, scheduling, and diagnostics engines.@yantra/agentcomposes core services for governed model-driven execution and confines provider-SDK integration to its adapter seam.@yantra/uiis Drshya, the design system for the Yantra app: OKLCH tokens on Tailwind v4, a semantic icon registry, and accessible React Aria primitives (browser code; protocol types only).@yantra/webis the Yantra app: a React client of the local app host, built on Drshya and embedded into the CLI build (browser code; protocol types only).@yantra/test-helperssupplies shared fixtures and no-LLM/provider test-tag plumbing.@yantra/cliis the executable composition root for commands, configuration, output rendering, and exit-code mapping.
Use Node.js 24.15.0 or newer and pnpm 11.1.0. The commands work from the repository root on Windows (PowerShell), Linux (Bash), and macOS (zsh). See the platform setup instructions.
pnpm install --frozen-lockfilepnpm exec turbo run build --filter=@yantra/cli
node apps/cli/dist/bin.js --helpSee the CLI quickstart and smoke test and CLI automated tests.
pnpm exec turbo run build --filter=@yantra/cli
node apps/cli/dist/bin.js uiThe CLI build includes the UI assets, and ui opens the local app in Chrome, Edge, or the browser Yantra resolves for its runs. See the UI quickstart and smoke test and UI automated tests.
Browser tasks and saved-workflow replay require a compatible Chrome or Chromium installation. Yantra can use a discovered external browser or, on a supported host, install a Yantra-owned Chrome for Testing Stable build after explicit consent.
If Yantra cannot discover a compatible external browser, review the destination and approximate 200 MB download notice, then prepare the managed browser interactively:
node apps/cli/dist/bin.js browser installThe download is stored below Yantra's resolved data directory and does not modify external Chrome installations. JSON and non-interactive use require explicit acceptance with browser install --yes; see the managed-browser usage guide before automating that flag.
To see which browser Yantra will actually use, pin a different one, or test the selected browser against the primitives Yantra needs — all locally, with no network access:
node apps/cli/dist/bin.js browser list
node apps/cli/dist/bin.js browser use system
node apps/cli/dist/bin.js browser checkThe smallest useful no-model task uses keyless DuckDuckGo search and local synthesis. It contacts public sites and writes a local run directory:
node apps/cli/dist/bin.js ask "what is Yantra's current public release status?" --no-llm --search-provider duckduckgoYantra keeps everything it owns under one home directory, ~/.yantra (override with YANTRA_HOME), identically on Windows, macOS, and Linux. Installation state lives in <home>/config.yaml and personal preferences in <home>/profile.yaml; the command line owns both, so neither file needs hand-editing:
node apps/cli/dist/bin.js config path
node apps/cli/dist/bin.js model add claude-opus-4-7 --provider anthropic --api-key-ref '${env:ANTHROPIC_API_KEY}'
node apps/cli/dist/bin.js secret set tavily.api_key
node apps/cli/dist/bin.js open --printCredentials are never written to YAML or passed as arguments: config.yaml holds only ${env:NAME} or ${secret:key} references, resolved at the execution boundary.
See the Quickstart for source setup and browser prerequisites, the Configuration guide for the full key reference and environment-variable table, then the Usage guide for managed-browser installation, model credentials, local models, commands, and artifacts.
- Answer focused web questions with
ask, or investigate broader topics with bounded multi-hopresearch. Both support deterministic--no-llmexecution. - Run governed model-driven browser tasks with
do, including navigation, extraction, form filling, separately confirmed protected actions, and requested screenshots saved locally without sending pixels to the model. - Promote successful browser traces or author reviewable YAML workflows, then replay them with a fixed plan that a model cannot steer.
- Schedule saved workflows through a local daemon. Scheduled runs are always zero-LLM and pause rather than auto-confirm protected actions.
- Shape model-backed output with local report templates, and inspect local profiles, history, usage, run reports, and audit trails.
- Manage configuration, models, credentials, browser selection, and explicitly consented browser installation from the command line, and reopen any finished run's artifacts with
open. - Open Yantra in its own app window with
ui. A local app host on127.0.0.1serves the window and runs app-started commands as ordinary background Yantra processes;ui --printprints the single-use URL instead. Besides Home, the window lists every recorded run in the Ledger and opens each run's result (a Brief or templated document whose citations open their evidence, or the outcome of a run without a document), its Audit, and bounded viewers for the run files the host is allowed to serve. Set its appearance with theui.themeandui.surfacespreferences; see Open the Yantra app.
Ordinary agentic Briefs can include cited findings, sections, and comparison tables with row citations. In do, these can also cite browser actions; an Actions section shows the cited fills, clicks, refused submits, and captures. When a task contract is declared, Conditions shows each filter as verified, unverified, or not met, and results citing only hosts outside the required sources appear under Alternatives. Sources lists cited pages; Also consulted lists pages read without a citation. Yantra flags values its evidence check cannot anchor; see Reading an attributed Brief.
During do, Yantra reports task-contract progress and uses bounded recovery when work stalls. Adjust its per-turn thinking limit (default 2m) with --turn-timeout; see Progress and recovery.
Yantra honors robots policy, blocklists, rate limits, CAPTCHAs, and bot walls; it reports a refusal or handoff instead of evading controls. Managed-browser downloads require per-operation consent, stay in Yantra-owned storage, and are never initiated by unattended execution. Agentic browser profiles are fresh and ephemeral, while model-backed do tasks require configured credentials. Explicit input masking and keychain-backed secrets reduce exposure, but run directories (including saved screenshots, which are unmasked pixels) and provider-session artifacts can still contain sensitive material and should be reviewed before sharing. Sources and citations establish provenance, not correctness or freshness.
- Architecture — components, data flows, persistence, and design decisions.
- Quickstart — source setup and local smoke tests for both apps.
- Usage — local build and automated tests, commands, configuration, and run artifacts.
- Configuration, Models, Credentials, and Storage — the two-file model,
config.yamlreference, storage layout, and environment variables. - Browser Resolution and Lifecycle — which browser Yantra picks, local capability checking instead of a version floor, and startup and shutdown resource ownership.
- Managed Stable Installation — consented Chrome for Testing acquisition, verification, storage, retries, and current limitations.
- Browser Selection and Diagnostics — persisting and overriding the browser choice, the local inventory, and explicit compatibility checking.
- Explicit Managed Update — the only update-check surface, availability-only
--dry-run, consented replacement, and why nothing checks in the background. - Ask — focused public-web questions and cited, structured agentic Briefs.
- Research — multi-hop research, cited tables, conditions, and source requirements.
- Agentic Tasks — governed browser and web tasks with
do, task contracts, locally saved screenshots, and attributed publication. - Saved Workflows — workflow YAML, replay, promotion, and resume.
- Report Templates — typed, user-authored report structures and their separate citation path.
- Profiles and History — preferences, context grants, runs, and usage.
- Local Site Ranking — local domain outcome scores and curation.
- Scheduling — recurring workflow runs and the local daemon.
- Diagnostics and Audit — environment checks, run inspection, and the in-app Audit.
- Opt-In Vision Assist — consent-gated, budgeted, audited screenshots sent to the model for agentic browser fallback, and how they differ from local saved captures.
- Recovery as Declarative Data — bounded fill and click recovery plans, shared accounting, and verdict diagnostics.
- Puppeteer 25.10 API Migration — preserved browser behavior, explicit resource ownership, and migration-test coverage.
- Widget Gauntlet and Interaction Message Catalog — generic widget regression fixtures, operation accounting, real-browser tool testing, and catalog contracts.
- Task-Fidelity Harness — whole-run outcome scoring against generic fixture sites, a CI-gating scripted tier, the never-gating
pnpm eval:tasksagentic scorecard, and offlinepnpm eval:benchmarkcomparisons. - The Yantra App —
yantra ui, the loopback-only app host, browser choice, sessions, the persisted two-slot queue with drift review, crash recovery, attendance, the Ledger of runs, run results with citation evidence, the in-app Audit, bounded run-file viewers, and theui.theme/ui.surfacespreferences. - Drshya Design System — the
@yantra/uipackage for the Yantra app: OKLCH tokens with build-time contrast checks, the semantic icon registry, 16 accessible primitive families, and the real-Chrome gallery harness. - Command Registry — every CLI command as declarative data in
@yantra/protocol/commands, the generated commander tree with byte-identical--help,parseInvocation, and shell-awareformatInvocationfor copyable commands. - Parity, Command Palette, and Generated Surfaces — registry-derived settings/library/system pages, typed tables, exceptional adapters, and the Ctrl/Cmd+K CLI-syntax palette.
- Safety and Privacy — masking, consent, secrets, policy, audit boundaries, and which run files the app serves.
- Protocol specification — generated Zod contracts, fields, and examples.
See CONTRIBUTING.md for the pnpm workflow, architectural boundaries, testing conventions, and pre-commit checks.
Yantra is licensed under the Apache License 2.0. Third-party attribution notices are in NOTICE.