Welcome to Ajapopaja Build, the advanced, automated task pipeline manager designed for Coding AI Agents (like Gemini CLI or Claude).
The project is structured as a monorepo with a Python backend and a TypeScript/Vite frontend:
backend/: Auvworkspace containing:core: Shared Beanie/Pydantic models and database logic.api: FastAPI management server.ajapopaja_mcp: MCP server for AI agent interactions.
frontend/: A Vite-based Single Page Application (SPA) with Tailwind CSS v4.design/: Architectural and project setup documentation.
Ajapopaja Build follows a decoupled, message-driven architecture to facilitate autonomous agent interaction with a human-supervised management layer.
- Task Creation: Users or systems create tasks in a Pipeline.
- Scheduling: Tasks are prioritized and moved to the
scheduledstate. - Agent Interaction (MCP): An AI agent connects via the Model Context Protocol (MCP) server. It fetches the next task, optionally submits a design doc, and implements the change.
- Human Review: If a design doc is submitted, the task enters a
PROPOSEDstate. A human reviews it in the SPA and either accepts (scheduling it for implementation) or rejects it. - Implementation & Validation: The agent implements the approved design, runs tests, and marks the task as
implementedwith a commit hash.
- Python 3.11+
- Node.js 18+
- uv: Modern Python package manager.
- MongoDB: A running instance (local or Atlas).
- Ollama: Required for the built-in AI Assistant.
-
Clone the repository:
git clone <repo-url> cd ajapopaja-build
-
Initialize Backend (Python/uv):
cd backend uv sync -
Initialize Frontend (Node/npm):
cd frontend npm install
Set the following environment variables (or use a .env file in the root):
MONGODB_URI: Connection string (default:mongodb://localhost:27017)DATABASE_NAME: Database name (default:ajapopaja_build)WORKSPACES_ROOT: Root directory for all pipeline workspaces.OLLAMA_HOST: The URL of your Ollama server (default:http://localhost:11434).OLLAMA_MODEL: The LLM model name to use for the AI Assistant (default:gpt-oss:20b).OLLAMA_API_KEY: Optional API key for cloud-hosted or proxied Ollama servers.
Run these commands from the project root. To stop a server, use Ctrl+C.
| Component | Command | URL/Access |
|---|---|---|
| FastAPI Server | cd backend && uv run --package api uvicorn api.main:app --reload |
http://localhost:8000 |
| API Docs (Swagger) | (Run FastAPI first) | http://localhost:8000/docs |
| MCP Server | Integrated in API (or run separately for local dev) | http://localhost:8000/mcp |
| SPA Frontend | cd frontend && npm run dev |
http://localhost:5173 |
The integrated AI assistant supports two modes of operation:
Requires Ollama to be running on your local machine.
- Install Ollama: https://ollama.com/download
- Pull the required model:
ollama pull gpt-oss:20b
Connects directly to https://ollama.com. This is automatically enabled when OLLAMA_API_KEY is set.
- Get an API Key: Create one at ollama.com/settings/keys.
- Configure Environment:
Note: In this mode, the application defaults to the
export OLLAMA_API_KEY=your_api_key_heregpt-oss:120bcloud model andhttps://ollama.comhost.
Once the system is running, follow this end-to-end workflow to start managing autonomous agent tasks.
To allow Gemini CLI (or any MCP-compatible agent) to communicate with Ajapopaja Build, add the local MCP server to your configuration:
{
"mcpServers": {
"ajapopaja": {
"httpUrl": "http://localhost:8000/mcp"
}
}
}- Access the Dashboard: Open http://localhost:5173 in your browser.
- Create a Pipeline: Click "New Pipeline". Provide a name and a local workspace path (relative to your
WORKSPACES_ROOT). - Define a Task: Within the pipeline, create a new task.
- Spec: Provide a clear, technical description of what needs to be done.
- Design Review: Enable "Want Design Doc" if you want to approve the agent's plan before it starts coding.
- Prioritize & Schedule: Set the task order and click "Schedule". The task is now ready for an agent to pick up.
Invoke Gemini CLI and direct it to your pipeline using its ID (found in the browser URL). Use a prompt like:
"Check for the next task using the ajapopaja mcp server for pipeline [PIPELINE_ID]. Implement the task, including tests, and continue until no more tasks are scheduled."
If you requested a design document:
- The agent will submit a plan and move the task to the Proposed state.
- Review the Markdown design document in the SPA dashboard.
- Click Accept to authorize implementation, or Reject to send it back for revisions.
- Once accepted, the agent will automatically pick up the implementation on its next check.
You can build a production-ready Docker image that contains both the backend and the frontend.
Use the provided build script to compile the frontend and package the backend:
./docker-build.sh 0.1.0After building the image, you need to create the initial user in your database:
docker run --rm \
--add-host=host.docker.internal:host-gateway \
-e MONGODB_URI=mongodb://host.docker.internal:27017/ \
ajapopaja-build:0.1.0 \
uv run --package api python api/src/api/seed_user.pyA deployment script is provided to build the image, save it to /data/ajapopaja/docker, and install it as a Linux system service.
- Run the deployment script:
./deploy-local.sh - Manage the service:
sudo systemctl start ajapopaja-build - Configure environment: Edit
/etc/ajapopaja-build.envthen restart the service.
Run all backend tests from the backend/ directory:
cd backend
uv run pytestRun frontend tests or linting from the frontend/ directory:
cd frontend
CI=true npm run test- State Machine Lifecycle: Tasks follow a strict, reliable path:
createdβscheduled->inprogressβimplemented(orfailed/discarded). - Human-in-the-loop Design Review: Agents can be required to submit a Design Document.
- Execution Ordering: Tasks are prioritized by
orderandscheduled_attimestamps.
- Multi-Column Dashboard: A three-column layout separating Preparation, Active Execution, and History.
- Live Updates: Integrated WebSockets ensure the UI reacts instantly to agent progress.
- Built-in AI Assistant: An Ollama-powered assistant that can perform project-wide searches, read files, and manage tasks.
- Rooted Relative Paths: All pipeline workspaces are confined to a single directory tree defined by
WORKSPACES_ROOT. - Path Traversal Protection: Enforced boundaries for all file operations.
- Recommended CWD: Always start in the root directory.
- Shared Core: Always update models in
backend/core/src/core/models/models.pyfirst. - Verification: Always run
uv run pytestafter backend changes.
To prevent unintentional pushes by AI agents, this repository is protected by a pre-push git hook. All push operations are blocked by default.
To push changes to GitHub manually, you must explicitly set the ALLOW_PUSH environment variable:
ALLOW_PUSH=true git pushThis project is licensed under the Apache License 2.0. See the LICENSE file for details.
We maintain strict dependency license policies to ensure legal safety.
- Audit Tool (JS):
npm run license-check - Audit Tool (Python): See LICENSE_COMPLIANCE.md
