Skip to main content

A pluggable agent toolkit (server + TUI + web UI)

Project description

Lattis

Lattis is a pluggable agent toolkit built on pydantic-ai: a FastAPI server with a Textual TUI and a bundled web UI. Agents are loaded as plugins, and each thread can select a different agent.

What you get

  • Server + clients: FastAPI API, Textual TUI, and a web UI (served by the same server).
  • Pluggable agents: built-ins, third-party entry points, or local module:attribute specs.
  • Per-thread agent selection: pick an agent per thread (TUI + web UI + API).
  • Persistent state: thread history in SQLite, plus a workspace directory for agents that write files/tools.

Requirements

  • uv
  • Python 3.14+ (uv can install it automatically)
  • An API key for at least one model provider (Gemini, Anthropic, OpenAI, etc.)

Quick start

uv sync
uv run lattis

Run the server (API + web UI):

uv run lattis server

Then open http://localhost:8000.

CLI

lattis                 # Run the TUI (default)
lattis tui             # Run the TUI explicitly
lattis server          # Run the API server (and web UI, if built)

lattis tui

--server <url>          Connect to a specific server URL
--local                 Force local mode (skip server auto-discovery)
--agent <id|name>       Default agent for local/in-process mode
--agents <specs>        Extra plugins (comma-separated `module:attr` specs) for local/in-process mode

By default, the TUI auto-discovers a server on http://127.0.0.1:8000 and connects if it matches the current project; otherwise it runs in local (in-process) mode.

lattis server

--host <host>           Host interface to bind (default: 127.0.0.1)
--port <port>           Port to bind (default: 8000)
--reload                Enable auto-reload
--workspace             Workspace mode: local | central
--agent <id|name>       Default agent id or name
--agents <specs>        Extra plugins (comma-separated `module:attr` specs)

Agents

Built-in agents:

  • binsmith — a script-building developer agent that can write reusable, composable tools
  • poetry — a simple example agent

Select an agent per thread

  • TUI: use /agent, /agent list, /agent set <id|number>, /agent default
  • Web UI: use the sidebar agent selector
  • API: PATCH /sessions/{session_id}/threads/{thread_id}/state with {"agent": "<id-or-name>"} (or null to reset)

Client integration

See docs/client-integration.md for the thin-client API flow (bootstrap, thread state, model options, streaming).

Add your own agent plugins

Lattis discovers agents automatically from:

  1. lattis.agents.builtins (included with Lattis)
  2. Python entry points in the group lattis.agents
  3. Extra module:attribute specs via AGENT_PLUGINS / --agents

Entry point example (pyproject.toml in your plugin package):

[project.entry-points."lattis.agents"]
my-agent = "my_package.my_agent:plugin"

Your plugin can be:

  • an AgentPlugin, or
  • a pydantic_ai.Agent, or
  • a callable that returns an Agent (optionally taking model).

Storage

Workspace modes:

  • local (default): per-project .lattis/ under the current directory
  • central: ~/.lattis/

Typical layout:

.lattis/
  lattis.db
  session_id
  workspace/

Configuration

Variable Default Description
AGENT_DEFAULT binsmith Default agent id/name (server + local mode)
AGENT_PLUGINS (unset) Extra plugins (module:attr, comma-separated)
LATTIS_WORKSPACE_MODE local local (per-project) or central (~/.lattis)
LATTIS_SERVER_URL (unset) Server URL for clients that connect over HTTP
LATTIS_PROJECT_ROOT (cwd) Project root used for local storage mode
LATTIS_DATA_DIR (derived) Override the data directory
LATTIS_WORKSPACE_DIR (derived) Override the workspace directory
LATTIS_DB_PATH (derived) Override the SQLite DB path
LATTIS_SESSION_FILE (derived) Override the session id file path
LATTIS_SESSION_ID (unset) Force a specific session id

Web UI development

The server serves the web UI from lattis/web/static when it exists.

cd frontend
npm install
npm run build

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

lattis-0.4.0-py3-none-any.whl (219.0 kB view details)

Uploaded Python 3

File details

Details for the file lattis-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: lattis-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 219.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.21 {"installer":{"name":"uv","version":"0.9.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for lattis-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 555452f8afc060a96360abb947f69779810127e4903f1eb1e2b5ff627e42e945
MD5 72db4e68da92db1872ac2cff53faead8
BLAKE2b-256 dadf679ab472d2c24a9ce96cbd4b170ddc9382278d6198db3a0b600eb3589195

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page