AgentX docs

Task Commands

Complete reference for Taskfile automation commands.

Installation & Setup

Install All Dependencies

task install

Runs uv sync and bun install to install all dependencies.

Initialize Databases

task db:init

Creates data directories for Neo4j, PostgreSQL, and Redis.

Development

Start Development Environment

task dev

Starts all services:

  • Docker containers (Neo4j, Postgres, Redis)
  • Django API on port 12319
  • Tauri development window

task dev runs a dev:kill preflight first, so a leftover server from a previous run won’t collide with the new one.

Reap Straggler Dev Processes

task dev:kill   # alias: task dev:reap

uvicorn --reload (and the uv run wrapper) can swallow SIGTERM, so a crashed or orphaned dev supervisor sometimes leaves the API bound to port 12319 — plus the portless memory worker — still running. This reaps the uvicorn reload tree and the consolidation worker by command signature, then frees ports 12319/1420/1421 as a backstop. It runs automatically before task dev; run it by hand if you ever hit “address already in use”.

Start Services Only

task runners

Starts Docker containers without API or client.

Stop All Services

task teardown

Stops and removes Docker containers.

Environment Check

task check

Verifies the development environment is ready (prerequisites, directories, dependencies).

API Commands

Run Django Server

task api:runserver

Starts Django development server on http://127.0.0.1:12319.

Django Shell

task api:shell

Opens Django interactive shell.

Database Migrations

Create migration files:

task api:makemigrations

Apply migrations:

task api:migrate

Client Commands

Start Tauri Dev Mode

task client:dev

Launches Tauri window with hot reload.

Build Client

task client:build

Builds production client bundle.

Preview Production Build

task client:preview

Serves the production web build locally (no Tauri packaging).

Mobile (Android)

task client:android:init    # Bootstrap the Tauri Android project (first time)
task client:dev:android     # Run on a connected device with hot reload
task client:build:android   # Build a debug-signed APK

Database Management

PostgreSQL

Open PostgreSQL shell:

task db:shell:postgres

Create backup:

task db:backup

Backups saved to ./backups/postgres_YYYYMMDD_HHMMSS.sql

Restore from backup:

task db:restore BACKUP_FILE=backups/postgres_20231127_120000.sql

Redis

Open Redis CLI:

task db:shell:redis

Neo4j

Neo4j Browser: http://localhost:7474

Clean All Data

task db:clean

You will be prompted for confirmation.

Export / Import Memory

Round-trippable, ID-stable snapshots of the agent memory graph (conversations, facts, entities, strategies, goals + the PostgreSQL audit mirror). Exports are text-only — embeddings are regenerated on import, so files stay small and git-diffable.

# Export every channel to data/memory_exports/<ts>_all.json
task memory:export

# Export one channel
task memory:export -- --channel _global

# Import (idempotent MERGE-on-id; embeddings recomputed from text)
task memory:import -- --input data/memory_exports/<file>.json

# Replace a channel exactly (wipe that channel for the user, then import)
task memory:import -- --input <file>.json --mode replace --channel _global

--mode merge (default) upserts and leaves other data untouched; --mode replace wipes the target channel first. Pass --dry-run to parse + summarize without writing.

Testing

Run All Tests

task test

Runs Django test suite.

Quick Tests (no model loading)

task test:quick

Runs the subset of tests that don’t load translation/embedding models.

Run Specific Test

uv run python api/manage.py test agentx_ai.tests.TranslationKitTest

Run Single Test Method

uv run python api/manage.py test agentx_ai.tests.TranslationKitTest.test_translate_to_french

Client Tests (Vitest)

task test:client

Documentation

The docs site is an Astro project under docs-site/.

Install Docs Dependencies

task docs:install

Serve Documentation Locally

task docs:serve   # alias: task docs:dev

Serves the Astro docs site with HMR at http://localhost:4321.

Build Documentation

task docs:build

Builds the static site to docs-site/dist/. Use task docs:preview to preview the build.

Deploy Documentation

task docs:deploy

Deploys the docs site to Vercel (requires the Vercel CLI + login).

Lint the OpenAPI spec

task api:spec:lint

Validates the root OpenApi.yaml (the machine-readable mirror of the API reference) with Redocly.

Utility Commands

Default Task

task

Runs sanity check and prompts to start development environment.

List All Tasks

task --list-all

Shows every available task with descriptions (task --list shows only the documented top-level ones).

Task Help

task --help

Displays Taskfile help information.

Task Dependencies

Some tasks automatically run prerequisites:

  • task dev → starts Docker services, then runs the API and client concurrently
  • task setup → runs task install, task db:init, and task check
  • task db:full-init → creates directories, starts containers, then initializes schemas

Environment-Specific Tasks

Development

# Quick iteration cycle
task dev              # Start everything
# Make changes...
task test             # Verify changes
task teardown         # Stop when done

Testing

# Run specific tests during development
uv run python api/manage.py test agentx_ai --keepdb

Production Build

task client:build     # Build optimized client
task api:migrate      # Ensure migrations are applied

Custom Task Variables

Some tasks accept variables:

Postgres Restore

task db:restore BACKUP_FILE=path/to/backup.sql

Debugging Tasks

Verbose Output

task --verbose dev

Dry Run

task --dry dev

Shows what would be executed without running commands.

Tips & Tricks

Run Multiple Commands

task install && task db:init && task dev

Background Execution

task runners &  # Start services in background

Watch Mode

# API auto-reloads on file changes
task api:runserver

# Client has HMR enabled
task client:dev

Quick Database Reset

task teardown && task db:clean && task db:init && task runners

More Task Groups

Run task --list-all for the full set (120+ tasks). Other groups worth knowing:

GroupExamplesPurpose
mcp:*mcp:servers, mcp:tools, mcp:resources, mcp:healthInspect MCP servers/tools (API must be running)
auth:*auth:setup, auth:setup:force, auth:checkManage the root password (Phase 17 auth)
cluster:*cluster:new, cluster:up, cluster:migrate, cluster:down, cluster:status, cluster:listProduction deployment unit — single or multi-instance (CLUSTER=name)
models:*models:download, models:cache, models:clear, warmup:embeddingsHuggingFace model management
check:*check:static, check:types, check:buildStatic analysis (lint + types + build)
lint:* / format:*lint:python, lint:client, format:python, format:clientLint and format
logs:* / debug:*logs:api, logs:docker, logs:keys:status, logs:seal, logs:rotate-keys, logs:rotate-keys:deep, debug:env, debug:portsLogging, diagnostics, and encrypted-archive key management
release:*release:build, release:check, versions:syncBuild and release

Next Steps