Skip to main content
The Termux Multi-Agent system provisions and orchestrates autonomous agents inside Termux on Android. It reads tasks from a central task registry, dispatches them through environment variables, and provides a live dashboard for monitoring agent state. The system also includes a CedarScript MCP server for external tool integration.

Core components

The multi-agent system lives in the termux-multi-agent/ directory and contains the following modules:
  • run.py — Main orchestration loop that initializes the database and starts the agent scheduler
  • provision_agent.py — Provisions a new agent with a unique identity, workspace, and environment
  • dashboard.py — Live terminal dashboard showing active agents, task queue, and completion status
  • patch_files.py — Applies file patches generated by agents during task execution
  • cedar-mcp-server.js — CedarScript MCP server that exposes agent capabilities to external clients

Task management

Agents receive tasks through environment variables rather than interactive prompts. The orchestrator reads the master task list from ~/workspace/llm_map/master_tasks.json and binds each task to an agent via the following variables:

Running an autonomous agent

Follow these steps to provision an agent and run it against a task from the master registry.
1

Initialize the database

From the termux-multi-agent/ directory, run the initialization script. This creates the SQLite database that tracks agents, tasks, and outcomes.
Run this once. The database persists across restarts and holds agent state.
2

Review the task registry

Inspect ~/workspace/llm_map/master_tasks.json to find the task you want to dispatch. Each entry contains a task_id, goal, target, and optional constraints.
3

Provision an agent

Use provision_agent.py to create a new agent. The script assigns a workspace under termux-multi-agent/workspaces/ and writes the environment file.
4

Set environment variables

Export the task variables so the agent can read them at startup. You can also write them to the agent’s .env file.
5

Start the agent

Launch the agent run loop. The agent reads its environment, loads the target file, performs the refactor, and writes results to TASK_WORKSPACE.
6

Monitor with the dashboard

In a separate Termux session, open the live dashboard to watch progress.

CedarScript MCP server

The CedarScript MCP server (cedar-mcp-server.js) exposes agent operations to external clients through the Model Context Protocol. Start it when you need to integrate the multi-agent system with an IDE or another orchestrator.
The MCP server requires Node.js to be installed in Termux via pkg install nodejs.

Next steps

Autonomous Tasks Guide

Learn advanced patterns for dispatching and chaining agent tasks.

First Session Guide

Walk through a complete ArchWiz session with agent integration.