# LatentStack > LatentStack, by Latent Force Intelligence Private Limited, gives every team the superpower of AI: one secure deployment on infrastructure you own (your cloud, a GPU cloud provider, on-premises, or fully air-gapped), with your data never leaving your walls. Its gateway puts many LLMs behind one API, with access control, rate limits, an audit trail and content guardrails built in; LatentCode, LatentWork and hosted agents run through it. Website: https://latentstack.dev/ Full documentation text: https://latentstack.dev/llms-full.txt ## FAQ ### What is LatentStack? A secure enterprise AI gateway. One deployment on infrastructure you own gives every team access to many LLMs through one API, with per-user keys, tiers, rate limits, usage metering and content guardrails enforced centrally. ### Where does LatentStack run? On infrastructure you own: your cloud, a GPU cloud provider under your own account, on-premises, or fully air-gapped. Models can run on your own GPUs. Work you restrict to private models stays inside your network, with no external fallback; work you permit may use approved external providers, under that provider's terms. ### Which models does LatentStack support? Models from Anthropic, OpenAI, Google (including Vertex) and self-hosted open models such as Llama, Qwen and Mistral, all behind one OpenAI- and Anthropic-compatible API. ### How does LatentStack control access and cost? Admins issue per-user API keys and assign tiers and projects. Rate limits apply per model and per user at the gateway, and every request is priced, logged and attributable by user, project, model and provider. ### How do LatentStack guardrails work? Guardrails screen every prompt before it is routed: regex and checksum rules (L1), an AI judge (L2) and PII detection (L3). Admins decide whether a match is blocked, masked or allowed. ### What are LatentCode and LatentWork? LatentCode is an AI coding agent for the terminal, with a TUI and a scriptable CLI. LatentWork is a desktop app that runs agentic AI workflows on your own machine. Both connect to the LatentStack gateway with your API key. ### How do I install LatentStack clients? One command installs the LatentCode CLI and the LatentWork desktop app, pointed at your gateway: curl -fsSL https://latentstack.dev/install.sh | bash on Linux and macOS, or irm https://latentstack.dev/install.ps1 | iex in Windows PowerShell. ### Do we have to take all of LatentStack? No. An enterprise can subscribe to the whole stack or to individual components. ### Does our code leave our network? It depends on the configuration you choose. Work restricted to private models has no external fallback. Work you permit to use approved third-party models sends the permitted inputs to that provider under that provider's terms. ### Does LatentStack train on our code? No. There is no training on Customer Content. ### Can we evaluate LatentStack on our own code? Yes: a scoped proof of concept around one team, one repository and one workflow, with agreed acceptance criteria. ## Documentation - [LatentStack Docs — LatentCode, LatentWork, Admin Console and Agents API](https://latentstack.dev/docs): LatentStack documentation: install and use LatentCode, the terminal AI coding agent, LatentWork, the desktop agent app, the Admin Console for users, policy and usage, and the Agents API for hosted agents. - [Quickstart](https://latentstack.dev/docs/quickstart): Get an API key, install LatentCode, run your first coding task, then run a hosted agent from your own code. It takes a few minutes. - [Install](https://latentstack.dev/docs/install): One command installs the LatentCode CLI, the LatentWork desktop app and the editor extension, all downloaded from your own LatentStack server. - [Concepts](https://latentstack.dev/docs/concepts): The ideas every LatentStack product shares: organizations, roles, API keys, models, tiers, teams, guardrails and usage. - [Troubleshooting](https://latentstack.dev/docs/troubleshooting): Find the error you're seeing, what causes it and how to fix it, for LatentCode, LatentWork, the Agents API and the console. ## LatentCode - [LatentCode](https://latentstack.dev/docs/latentcode): A coding agent that runs in your terminal. It reads your code, edits files and runs commands to get a task done, and asks before it does anything you haven't allowed. - [Quickstart](https://latentstack.dev/docs/latentcode/quickstart): Install LatentCode, connect it to your gateway, and have it make and verify a change in your project. - [Common workflows](https://latentstack.dev/docs/latentcode/workflows): Prompts and commands for everyday tasks: understanding code, fixing bugs, testing, reviewing and working with git. - [The TUI](https://latentstack.dev/docs/latentcode/tui): Run latentcode with no arguments to open the full-screen terminal UI. This page covers the screen, the prompt and everything you can put in it. - [Agents](https://latentstack.dev/docs/latentcode/agents): An agent is a role: a system prompt, a set of permissions and optionally its own model. Primary agents are the ones you talk to; subagents are helpers they hand work to. - [Permissions](https://latentstack.dev/docs/latentcode/permissions): Decide what the agent may do on its own, what it has to ask about, and what it may never do. - [Models](https://latentstack.dev/docs/latentcode/models): Choose which model LatentCode uses, how hard it thinks, and which organization pays for it. - [Goals and loops](https://latentstack.dev/docs/latentcode/goals): Let the agent keep working without you: a goal runs turn after turn until a condition is true; a loop runs a prompt again and again on a schedule. - [Sessions and context](https://latentstack.dev/docs/latentcode/sessions): Every conversation is a session, saved on your machine. Resume, branch, undo, and keep long sessions within the model's context window. - [Configuration](https://latentstack.dev/docs/latentcode/configuration): Where LatentCode reads its settings from, how files combine, and every setting you can use. - [Rules and memory](https://latentstack.dev/docs/latentcode/rules): Tell LatentCode how your project works once, in files it reads at the start of every session, and let it remember what it learns. - [Custom commands](https://latentstack.dev/docs/latentcode/custom-commands): Turn a prompt you type often into a slash command, with arguments, file contents and live shell output filled in. - [Skills](https://latentstack.dev/docs/latentcode/skills): A skill is a folder of instructions, and optionally scripts and reference files, that the agent loads only when a task needs it. - [MCP servers](https://latentstack.dev/docs/latentcode/mcp): Connect LatentCode to other tools and data, such as issue trackers, databases and internal APIs, through the Model Context Protocol. - [Plugins and custom tools](https://latentstack.dev/docs/latentcode/plugins): Extend LatentCode with JavaScript or TypeScript: react to events, check or change what the agent does, and give it new tools. - [Keybindings](https://latentstack.dev/docs/latentcode/keybindings): Every TUI shortcut, its default keys, and how to change them. - [CLI reference](https://latentstack.dev/docs/latentcode/cli): Every latentcode command and flag. Run latentcode with no command to open the TUI; add a command to script it, manage configuration or inspect state. - [Slash commands](https://latentstack.dev/docs/latentcode/slash-commands): Every built-in command you can type at the start of a prompt. Type / to see them, with your own commands, skills and MCP prompts. - [Environment variables](https://latentstack.dev/docs/latentcode/environment-variables): Variables that change how LatentCode behaves for one process or one shell. Most have a config equivalent; use these for CI, scripts and quick experiments. - [Troubleshooting](https://latentstack.dev/docs/latentcode/troubleshooting): Find out what went wrong, fix the common problems, and reset LatentCode if you need to. ## LatentWork - [LatentWork](https://latentstack.dev/docs/latentwork): LatentWork is the LatentStack desktop app. You describe a task in plain language, and an agent does the work in a folder on your computer while you watch each step and approve anything sensitive. - [Install and first launch](https://latentstack.dev/docs/latentwork/install): Install LatentWork from your LatentStack server, connect it to your gateway, and pick the folder it works in. - [Quickstart](https://latentstack.dev/docs/latentwork/quickstart): Ask LatentWork to build a spreadsheet, approve what it asks, open the result, and change it with a follow-up. - [Tasks and history](https://latentstack.dev/docs/latentwork/tasks): Every conversation with the agent is a task. Start tasks, find old ones, organize them in the sidebar, and roll a task back when it goes the wrong way. - [Workspaces and folders](https://latentstack.dev/docs/latentwork/workspaces): A workspace is a folder on your computer that the agent works in. Add a workspace for each project, and authorize extra folders when a task needs files from elsewhere. - [Prompts and attachments](https://latentstack.dev/docs/latentwork/composer): Everything you ask starts in the message box at the bottom of a task. Attach files, point at files in the workspace, run commands and skills, and steer the agent while it works. - [Files, artifacts and the browser](https://latentstack.dev/docs/latentwork/files): The panel on the right of a task shows what the agent made, lets you browse the workspace, and holds a web browser and a terminal. - [Permissions and approvals](https://latentstack.dev/docs/latentwork/approvals): The agent works freely inside your workspace, but asks before anything riskier: most shell commands, going online, sensitive files, and folders outside the workspace. - [Models, teams and usage](https://latentstack.dev/docs/latentwork/models): LatentWork uses the models your organization allows through your LatentStack gateway. Pick one per task, switch team or organization, and keep an eye on context and cost. - [Apps, skills and extensions](https://latentstack.dev/docs/latentwork/extensions): Give the agent more to work with: connect apps over MCP, add skills that teach it how to do a job, and turn on built-in extensions. - [Memory](https://latentstack.dev/docs/latentwork/memory): LatentWork can remember things about you and your projects so you don't have to repeat them, and always follow standing instructions you write yourself. - [Settings reference](https://latentstack.dev/docs/latentwork/settings): Every page in LatentWork's settings, with each option as it's labelled in the app, its default, and what it does. - [Keyboard shortcuts](https://latentstack.dev/docs/latentwork/shortcuts): Shortcuts for the LatentWork desktop app. On macOS use ⌘; on Windows and Linux use Ctrl. - [Data and privacy](https://latentstack.dev/docs/latentwork/data): What LatentWork runs on your computer, what it stores there, and what it sends over the network. - [Troubleshooting](https://latentstack.dev/docs/latentwork/troubleshooting): Find the message or symptom you see, then the cause and the fix. For installer problems, see Install. ## Admin Console - [Admin Console overview](https://latentstack.dev/docs/console): The web console is where you manage your LatentStack account and API key, and where organization owners and admins control who can use which models, at what limits, and under which policies. - [Sign in and your account](https://latentstack.dev/docs/console/account): Create an account, sign in, reset a forgotten password, and manage your profile, password and API key. - [Organizations and members](https://latentstack.dev/docs/console/organizations): Create, join and switch organizations, invite people, approve join requests, and manage roles and ownership. - [Users](https://latentstack.dev/docs/console/users): Add people to your organization one at a time or from a spreadsheet, assign their tiers, and manage their roles, limits and access. - [Tiers and limits](https://latentstack.dev/docs/console/tiers): A tier decides which models someone can use, which models run LatentCode's background work, and how many requests and dollars they can spend per window. - [Teams](https://latentstack.dev/docs/console/teams): A team gives a group of members its own tier and system instruction. Members pick the team in their client, and requests made from it use the team's models and limits. - [Credits](https://latentstack.dev/docs/console/credits): Credits are a prepaid dollar balance that spending draws down. Set one for the whole organization, give individual members their own allowance, and handle members' requests for more. - [Guardrails](https://latentstack.dev/docs/console/guardrails): Screen every request your organization sends through the gateway: an AI judge that enforces your written policies, and a PII detector that blocks or redacts sensitive data before it reaches a model provider. - [Platform settings](https://latentstack.dev/docs/console/settings): Register models and providers, set prices and context windows, and set rate limits and retry behaviour for your organization. - [Prompt management](https://latentstack.dev/docs/console/prompts): Set the base system prompt that LatentCode and LatentWork run with in your organization, per product and per model. - [Usage analytics](https://latentstack.dev/docs/console/usage): See your organization's spend, requests, tokens and latency, break them down by model, person, provider and team, and email yourself a report. - [My usage and budget alerts](https://latentstack.dev/docs/console/my-usage): Check your tier, what you've used of your limits, and your spend, and get an email before you reach your daily budget. - [Shared sessions](https://latentstack.dev/docs/console/sessions): Share a LatentCode session with your organization so teammates can pull it into their own sessions as context, and manage what's been shared. - [Feedback and notifications](https://latentstack.dev/docs/console/feedback): Send feedback to your organization's admins, read what members have sent, and keep up with invites, requests and changes through the notifications bell. - [LStack Cloud Agent](https://latentstack.dev/docs/console/cloud-agent): Connect your GitHub account so hosted agents can work on your repositories, choose the agent's model, and run agent jobs from the browser. - [Console troubleshooting](https://latentstack.dev/docs/console/troubleshooting): Common problems in the console and the gateway errors that console settings cause, with what to change. ## Agents API - [Agents API](https://latentstack.dev/docs/agents): Run LatentCode agents in the cloud from your own code. - [Quickstart](https://latentstack.dev/docs/agents/quickstart): Run a task in a hosted sandbox, continue the conversation, then have an agent change code in a repository. - [Configuring agents](https://latentstack.dev/docs/agents/configuration): Choose the model, write the instructions, and decide what the agent may do without asking. - [Run and continue](https://latentstack.dev/docs/agents/sessions): Give an agent a task, know when it's done, and keep the conversation going. - [Events](https://latentstack.dev/docs/agents/events): Follow what an agent does as it works, and pick up exactly where you left off. - [Approvals](https://latentstack.dev/docs/agents/approvals): Let an agent work on its own, but decide yourself before it does something risky. - [Manage sessions](https://latentstack.dev/docs/agents/manage): Check a session's state, pause and resume it, fork it, find your sessions, and clean up. - [Repositories and patches](https://latentstack.dev/docs/agents/repositories): Give an agent your GitHub repositories on any branch, tag or commit, and get back what it changed as a patch. - [Files](https://latentstack.dev/docs/agents/files): Give the agent files and take back what it makes. - [Outputs](https://latentstack.dev/docs/agents/outputs): Name the files you want from a session, and download them with links that keep working after it ends. - [Webhooks](https://latentstack.dev/docs/agents/webhooks): Be told when something happens in a session, without holding the event stream open. - [Schedules](https://latentstack.dev/docs/agents/schedules): Start a session at set times, such as every weekday at 9:30, and get its results without being there. - [TypeScript SDK](https://latentstack.dev/docs/agents/sdk-typescript): @latentcode/sandbox-agents 0.1.4: a typed client for hosted agent sessions. It has no runtime dependencies and runs anywhere fetch does. - [Python SDK](https://latentstack.dev/docs/agents/sdk-python): latentcode_sandbox_agents 0.1.4: the same client as the TypeScript one, in sync and asyncio variants. Python 3.10+, one dependency (httpx). - [MCP server](https://latentstack.dev/docs/agents/mcp): Use hosted agents from Claude Code, Codex, Cursor, VS Code or any other MCP client. Ask your assistant to hand a task to an agent, and it starts one, follows it, and brings back the result. - [Errors](https://latentstack.dev/docs/agents/errors): Every failed call raises one error type with a stable name you can branch on. - [Examples](https://latentstack.dev/docs/agents/examples): Complete programs to copy and adapt. Each reads your key from LS_API_KEY and cleans up after itself. ## Optional - [CLI command reference](https://latentstack.dev/api/command-docs/): every LatentCode slash command, one page each.