Skip to main content

nanoinfra Documentation

What nanoinfra Is​

nanoinfra is a self-hosted AI agent for infrastructure work. It keeps an inventory of your servers, the credentials to reach them, and the tools to act on them. The tools are execution over SSH, Ansible, AWS SSM, or an HTTP endpoint you configure. It also keeps saved topology diagrams it can read and edit. You reach it from a terminal, a browser, or sixteen chat apps.

That focus is the point. nanoinfra is not a general-purpose assistant that happens to have a shell tool. An agent that can reach production needs layers between it and your hosts, and it has them today —

  • Deny by default. Every channel needs an explicit sender allowlist. An empty list denies everyone, and direct messages additionally require pairing approval. See Configuration.
  • A kernel-level sandbox. On Linux, shell commands can run inside bubblewrap, where the process sees the workspace and nothing else. Bubblewrap masks your config and API keys. See Configuration.
  • Credentials that do not come back out. Secrets are encrypted at rest and no API or agent tool returns a plaintext value. Provider keys can stay as ${VAR} references so they exist only in memory. See Secrets and Servers.
  • Tools that declare their blast radius. Every tool marks whether it only reads, and mutating operations take a dry run first.
  • A gate on every mutating and remote action. Each tool carries a capability class. Each action resolves a scope of one host, a host group, or all hosts. An unattended context refuses remote execution by default. See Capability Gates.
  • An automation that tells you what it needs before it runs. Creating a scheduled automation rehearses it once with every gated action previewed. Nothing executes. You learn whether an unattended run would be permitted and which standing grant it would need, instead of finding out from a refusal at 03:00. See Commissioning.
  • A human approval on a second path. An unusual remote action suspends and waits. The approval must arrive on an authenticated path other than the path of the request. It covers the exact command and host list the executor rendered. See The Approval Path.
  • A privilege split with a sandbox on each helper. Remote execution, web access, and stdio MCP servers each run in their own process. Each one gets a Unix socket, an account, and a Landlock policy of its own. See The Process Split.

Use these docs to get a working agent first, then open a task guide only when you need the next capability. Source-level design and extension details are kept in the contributor section. These docs follow the current source tree and can be newer than the latest published package.

Start Here​

Your situationRead thisYou are done when...
You are comfortable running commandsInstall and Quick Startnanoinfra status is healthy and the WebUI or CLI can get one reply
Something already failedTroubleshootingYou have isolated the problem to install, config, model, gateway, channel, or tool access

The recommended first-run path is:

  1. Install nanoinfra.
  2. Let the installer open nanoinfra webui on a fresh local desktop.
  3. Configure a provider and model in Settings → Models.
  4. Send Hello! before configuring anything else.

Most people do not need to edit JSON for the first run. The WebUI handles the initial provider, model, and local browser settings. SSH, headless, existing-config, and older-release installs retain nanoinfra onboard --wizard as a terminal fallback. After the WebUI opens, use Settings for models and built-in capabilities, Settings → Channels for chat apps, and Apps for CLI App or MCP integrations.

Add One Capability​

Pick the row that matches what you want to accomplish next:

GoalGuide
Learn the browser workbenchWebUI
Connect Telegram, Discord, Slack, Signal, Email, or another chat appChannels
Choose a hosted, OAuth, company, or local modelProvider Cookbook
Add model fallbacksConfigure Model Fallback
Enable web searchConfigure Web Search
Add an MCP tool serverConfigure MCP Tools
Generate imagesImage Generation
Store credentials and let the agent connect to a server (SSH, Ansible, SSM, API)Secrets and Servers
Schedule work or create a local triggerAutomations
Learn what permission an automation needs before it runs unattendedCommissioning
Understand and manage long-term memoryMemory
Let the agent search your own runbooks, with citationsKnowledge
Store a topology the agent can read and editInfra Diagrams
Run nanoinfra continuouslyDeployment
Run separate bots or workspacesMultiple Instances
Call nanoinfra from PythonPython SDK
Expose an OpenAI-compatible endpointOpenAI-Compatible API

For shorter, outcome-focused walkthroughs, browse the task guide index.

Operate nanoinfra​

NeedRead
Commands and flagsCLI Reference
In-chat slash commandsIn-Chat Commands
Config, workspace, gateway, sessions, tools, and memory in plain languageConcepts
Policy for remote execution, approvals, and the audit logCapability Gates
Provider/model matching and selectionProviders and Models
Setup and runtime diagnosisTroubleshooting
Put your own SSO in front of the gatewayIdentity and SSO
Serve more than one customer from one hostMulti-Tenancy
See what changed in the version you runChangelog
Read the long-form 0.x historyRelease Archive

Reference​

Use reference pages to look up an exact option after you know what you are trying to configure:

AreaReference
How config is loaded, secrets, environment variables, channels, deployment-wide settingsConfiguration
Every provider, model preset, fallback and transcription fieldProvider and Model Configuration
Named agents, tool groups, web tools, MCP, knowledge, connectorsAgent and Tool Configuration
Capability gates, approvers, standing grants, pairingSecurity Configuration
Provider and model behaviorProviders and Models
Channel prerequisites and manual JSONChannels
WebSocket authentication and wire protocolWebSocket
Python SDK classes, events, sessions, and hooksPython SDK
OpenAI-compatible HTTP routes and payloadsOpenAI-Compatible API
Runtime self-inspection and tuningMy Tool

Configuration examples are usually snippets to merge into ~/.nanoinfra/config.json, not complete replacement files. The docs use camelCase because nanoinfra writes config that way. Keep real API keys, bot tokens, and passwords out of issues and public logs.

Extend or Contribute​

These pages explain implementation and extension points. You do not need them to install or operate nanoinfra.

GoalRead
Understand source ownership and runtime flowArchitecture
Set up a development environmentDevelopment and CONTRIBUTING.md
Add a channel packageChannel Package Guide
Build the WebUI sourceWebUI Development

If a command or screen no longer matches these docs, please open an issue. Include your nanoinfra version, operating system, and the page that needs correction.