docs: server quickstart, standalone template first, install starts PostgreSQL

This commit is contained in:
sam committed 2026-10-06 01:43:16 +11:00
1 parent 28bb4b4483
commit 209f2b4adb
9 files changed
+67 -44

No files matched your search

+37 -28
View File
@@ -94,41 +94,50 @@ approve the binding.
Sources default to signed delivery; an unsigned source must be explicitly
approved. Binding changes require re-approval before they can dispatch work.
## Develop locally
## Run it on a server
The repository requires Go 1.27, [Task](https://taskfile.dev/), Node.js and npm,
and Docker with a running daemon. The development stack starts PostgreSQL 18
through Docker Compose. See [AGENTS.md](AGENTS.md) for the tools the quality
gate needs.
You need Linux, PostgreSQL 18, Docker (agents run in containers) and a model:
local [Ollama](https://ollama.com) or a hosted provider API key.
```bash
task dev
```
1. **Install.** From a clone (needs Go 1.27, git and jq):
Open <http://localhost:5173> for the dashboard with Vite hot reload. `task dev`
starts the daemon, Gateway, State Store, UI service, and frontend development
server; it uses [`deployments/dev.toml`](deployments/dev.toml) as a local
configuration overlay. Set credentials and other required settings in your local
Archie configuration as needed.
```bash
git clone https://github.com/samcharles93/archie-core && cd archie-core
./install.sh
```
Useful checks:
It builds the five services into `~/.local/bin`, asks for a forge (choose
**None** if you only want event-driven automation) and a model, writes
`~/.config/archie/config.toml`, starts PostgreSQL with Docker Compose, and
installs and starts systemd user units. Use `--no-systemd` to run the
processes yourself. A prebuilt release archive works too; its
`INSTRUCTIONS.md` covers that path.
```bash
task build # build the service and agent binaries in bin/
task test # run the short Go test suite
task check # run the repository quality gate
```
2. **Check it is up.**
## Deploy
```bash
systemctl --user status archied archie-state-store archie-gateway archie-ui archie-messaging
curl -s http://127.0.0.1:8485/health/detailed
```
Start with the [deployment examples](deployments/README.md). They cover a single
GitHub forge, multiple GitHub and Gitea identities, local Ollama, and an
external NATS stack. Copy a suitable template to
`${XDG_CONFIG_HOME:-~/.config}/archie/config.toml`, then set its repository,
model, credential, and service settings for your environment. The examples
describe the required PostgreSQL connection and how to start each process. A
[systemd user service guide](deployments/systemd-user-service.md) is available,
but systemd is optional.
3. **Open the dashboard** at <http://127.0.0.1:8484>. It binds loopback by
default; tunnel to it (`ssh -L 8484:127.0.0.1:8484 server`) or see
[deployments](deployments/README.md#running-the-dashboard) to expose it
with a token.
4. **Automate your first event** with
[Your first playbook](docs/guides/first-playbook.md): send a webhook, map
its fields, bind it to a workflow and watch the task run.
To write the config by hand instead, start from
[`deployments/standalone.toml`](deployments/standalone.toml) (no forge) or
another [deployment template](deployments/README.md).
## Develop
`task dev` starts every service with Vite hot reload at
<http://localhost:5173>, using [`deployments/dev.toml`](deployments/dev.toml).
`task check` is the quality gate; [AGENTS.md](AGENTS.md) lists its tools.
## Documentation
+1 -1
View File
@@ -14,7 +14,7 @@
# serve from. Required: each fails closed without it.
# `docker compose up -d postgres` starts a matching local postgres:18 with this
# default URL.
# database_url = "postgres://archie:archie@127.0.0.1:5432/archie?sslmode=disable"
database_url = "postgres://archie:archie@127.0.0.1:5432/archie?sslmode=disable"
# skills_dir = "~/.local/share/archie/skills" # SKILL.md search path; defaults under work_dir when unset
# workflow_routing_file = "~/.local/share/archie/workflow-routing.yaml" # kind->workflow rebinding (bug/feature)
+4 -3
View File
@@ -28,9 +28,10 @@ as a host binary. Pull it from GHCR: `ghcr.io/samcharles93/archie-agent`.
1. Pick a starting configuration. The full set of annotated templates lives
in this repository's `deployments/` directory on GitHub
(<https://github.com/samcharles93/archie-core/tree/main/deployments>) —
`single-forge-github.toml`, `multi-forge-github-gitea.toml`,
`local-ollama-standalone.toml`, and `docker-nats-stack.toml` cover the
common cases. Copy whichever fits to:
`standalone.toml` (no forge, the simplest start),
`single-forge-github.toml`, `multi-forge-github-gitea.toml` and
`docker-nats-stack.toml` cover the common cases. Every one needs
PostgreSQL 18 at `database_url`. Copy whichever fits to:
```bash
mkdir -p ~/.config/archie
+6 -5
View File
@@ -10,8 +10,9 @@ This directory contains configuration templates and guides for different deploym
- **[`multi-forge-github-gitea.toml`](./multi-forge-github-gitea.toml)**:
Multi-identity deployment running GitHub and a self-hosted Gitea instance simultaneously with distinct bot accounts, tokens, and repository sets.
- **[`local-ollama-standalone.toml`](./local-ollama-standalone.toml)**:
Self-hosted deployment running local LLM models via Ollama (e.g., `llama3`, `qwen2.5`) with optional standalone (forge-disabled) operation.
- **[`standalone.toml`](./standalone.toml)**: start here. Event-driven
automation with no forge or repositories, local Ollama models, loopback
services and no tokens.
- **[`docker-nats-stack.toml`](./docker-nats-stack.toml)**:
Host-run `archied` orchestrating sandboxed `archie-agent` containers over the repository's Compose-managed NATS service. Copy to `~/.config/archie/config.toml`, start NATS with Compose, then start `archied` on the host.
@@ -42,9 +43,9 @@ archied -config ~/.config/archie/config.toml
systemctl --user start archied
```
The templates use the extracted Gateway Service by default. Start
`archie-gateway` before `archied`; it owns the conversation tables and
serves the `ChatContract` gRPC API on the configured target.
Start order does not matter: a service waits for its peers and reports them as
degraded meanwhile. Every template needs PostgreSQL 18 at `database_url`;
`docker compose up -d postgres` provides the default one.
The State Store service (`archie-state-store`) owns the task data in the
PostgreSQL database `database_url` names and serves the `StateStore` gRPC
+1 -1
View File
@@ -16,7 +16,7 @@ bot_user = "archie"
diff_cap_lines = 0
work_dir = "~/.local/share/archie/work"
state_dir = "~/.local/share/archie" # NATS store, task logs
# The State Store's PostgreSQL connection (required; Postgres-only epic).
# The State Store's PostgreSQL connection (PostgreSQL 18, required).
# `docker compose up -d postgres` provides this local default; point it at
# your own Postgres 18 server otherwise.
database_url = "postgres://archie:archie@127.0.0.1:5432/archie?sslmode=disable"
+1 -1
View File
@@ -8,7 +8,7 @@
work_dir = "~/.local/share/archie/work"
state_dir = "~/.local/share/archie" # NATS store, task logs
# The State Store's PostgreSQL connection (required; Postgres-only epic).
# The State Store's PostgreSQL connection (PostgreSQL 18, required).
# `docker compose up -d postgres` provides this local default; point it at
# your own Postgres 18 server otherwise.
database_url = "postgres://archie:archie@127.0.0.1:5432/archie?sslmode=disable"
+1 -1
View File
@@ -7,7 +7,7 @@
work_dir = "~/.local/share/archie/work"
state_dir = "~/.local/share/archie" # NATS store, task logs
# The State Store's PostgreSQL connection (required; Postgres-only epic).
# The State Store's PostgreSQL connection (PostgreSQL 18, required).
# `docker compose up -d postgres` provides this local default; point it at
# your own Postgres 18 server otherwise.
database_url = "postgres://archie:archie@127.0.0.1:5432/archie?sslmode=disable"
@@ -1,8 +1,10 @@
# ==============================================================================
# Self-Hosted Ollama + Standalone Mode Deployment Example
# Minimal event-driven deployment: no forge, no repositories
#
# Runs local open-weights models via Ollama (e.g. llama3, qwen2.5) with forge
# polling disabled (standalone execution mode).
# Events arrive as webhooks at the dashboard and run workflows. Models run
# locally through Ollama; for a hosted provider replace [providers.ollama] with
# e.g. [providers.openai] class = "openai", api_key_env = "OPENAI_API_KEY"
# and change the model names to "openai/<model>".
# ==============================================================================
# Standalone still needs a bot identity: it names the agent that chat turns and
@@ -12,7 +14,7 @@ bot_user = "archie"
work_dir = "~/.local/share/archie/work"
state_dir = "~/.local/share/archie" # NATS store, task logs
# The State Store's PostgreSQL connection (required; Postgres-only epic).
# PostgreSQL 18 connection (required).
# `docker compose up -d postgres` provides this local default; point it at
# your own Postgres 18 server otherwise.
database_url = "postgres://archie:archie@127.0.0.1:5432/archie?sslmode=disable"
+10
View File
@@ -400,6 +400,16 @@ else
echo " [SKIP] ${ARCHIE_CONFIG_DIR}/config.toml already exists (preserving user config)."
fi
# Every service fails closed without PostgreSQL. The generated database_url
# matches the Compose postgres service, so start it when Docker can.
if command -v docker &>/dev/null && [ -f "${SRC_DIR}/docker-compose.yml" ]; then
echo "==> Starting PostgreSQL 18 (docker compose up -d postgres)..."
docker compose -f "${SRC_DIR}/docker-compose.yml" up -d postgres ||
echo " [WARN] Could not start PostgreSQL. Start it before the services, or point database_url at your own PostgreSQL 18."
else
echo " [WARN] Docker not found: point database_url in ${ARCHIE_CONFIG_DIR}/config.toml at a PostgreSQL 18 server before starting the services."
fi
# 6. Seed skills, personas, memories, and onboarding tasks
echo "==> Seeding skills and templates..."