# {{PROJECT_NAME}}

Lobu instance created with `@lobu/cli` v{{CLI_VERSION}}

## Quick Start

Lobu boots as a single Node process. By default `lobu run` starts an embedded PostgreSQL (with pgvector) and stores data under `~/.lobu/data`. Set `DATABASE_URL` in `.env` only when you want to use an external Postgres instead.

```bash
# 1. Boot Lobu (gateway + workers + memory backend in one Node process)
lobu run    # or: lobu dev / lobu start

# 2. Stop with Ctrl+C
```

Logs go to stdout — pipe to your supervisor of choice (`pm2`, `systemd`, etc.) for production.

## Upgrading to Latest Version

Pull the latest CLI to pick up gateway + worker improvements:

```bash
# The CLI ships the embedded backend it boots, so updating the CLI
# updates Lobu itself. No image pull, no compose restart.
npm i -g @lobu/cli@latest && lobu run
```

Compare your `.env` with the latest `.env.example` in the [Lobu repo](https://github.com/lobu-ai/lobu) when upgrading and add any new required variables.

## Configuration

### Environment Variables

Edit `.env` to configure:

- `DATABASE_URL` — optional external Postgres connection string (with pgvector). If unset, `lobu run` uses its embedded PostgreSQL.
- `PUBLIC_GATEWAY_URL` — Public URL for OAuth callbacks
- `WORKER_ALLOWED_DOMAINS` — Allowed domains for worker network access

### Platform Connections

If you selected a platform during `lobu init`, fill the generated platform variables in `.env` (for example `TELEGRAM_BOT_TOKEN` or `SLACK_BOT_TOKEN`) before starting Lobu. Otherwise, manage platform connections through the gateway APIs at `{PUBLIC_GATEWAY_URL}/api/v1/connections` and related auth/config endpoints.

### Worker Customization

Worker behavior is controlled by:

- Install MCP-backed services as connectors so they inherit connection auth, approval, and audit behavior.
- `defineAgent({ tools: { allowed, denied, preApproved, strict } })` — configure tool visibility and approval bypasses.
- `defineAgent({ nixPackages })` — pulls binaries onto the worker's `PATH` via `nix-shell`. The worker uses [just-bash](https://github.com/nicholasgasior/just-bash) to wrap shell commands; interpreters and package managers are excluded from the allowlist by default. Set `LOBU_ALLOW_UNSANDBOXED_EXEC=1` per-agent to opt back in if you genuinely need them.

## Learn More

- [Lobu Documentation](https://github.com/lobu-ai/lobu)
- [CLI Reference](https://github.com/lobu-ai/lobu/tree/main/packages/cli)
- [Examples](https://github.com/lobu-ai/lobu/tree/main/examples)

## Support

- [GitHub Issues](https://github.com/lobu-ai/lobu/issues)
