Skip to content

Latest commit

 

History

History
102 lines (78 loc) · 6.05 KB

File metadata and controls

102 lines (78 loc) · 6.05 KB

aMMare Implementation Guide

Welcome to the step-by-step implementation guide for the Asymmetric Multi-Model AI Routing Engine (aMMare). This directory contains detailed execution plans, file scaffolds, configurations, and validation criteria for each of the 13 roadmap phases outlined in the aMMare Architecture Document.


Directory Structure Overview

During the implementation process, you will build and organize the repository into the following structure:

aMMare-Asymmetric-Multi-Model-AI-Routing-Engine/
├── architecture/          # High-level architecture docs and assets
├── config/                # Service-specific configuration files (.yaml, .json, etc.)
│   ├── langchain/
│   ├── litellm/
│   ├── headroom/
│   └── ...
├── containers/            # Dockerfiles and container-specific definitions
│   ├── langchain/
│   ├── litellm/
│   └── ...
├── env/                   # Environment example templates (*.env.example) and local overrides (*.env)
├── implementation/        # Step-by-step implementation guide markdown files (this directory)
├── scripts/               # Operational, deployment, validation, and helper scripts
│   ├── deploy.sh          # Top-level orchestrator deployment script
│   ├── uninstall.sh       # Clean reset script
│   └── ...
├── tests/                 # Integration and unit tests
└── logs/                  # Ignored log files directory

Implementation Principles

When implementing any phase, strictly adhere to these core architectural constraints:

  1. Physical Service-Chain Gateway: Do not hardcode service URLs directly in code. Services must communicate using environment variables. The primary endpoint for model access is configured via AMMARE_MODEL_GATEWAY_URL.
  2. Idempotent Scripting: All deployment, reset, and validation scripts must be safe to run repeatedly without causing side effects or corrupting state.
  3. Externalized Configuration: All variables, keys, and paths must live in the env/ directory. Create a <service>.env.example template for every config file. The actual <service>.env files containing secrets or system-specific details must be git-ignored.
  4. Validation First: Do not progress to a new phase until the validation script for the current phase executes successfully and returns a PASS status.
  5. No Monolithic Scripts: The top-level deploy.sh script should only orchestrate component deployment scripts (e.g., scripts/deploy-local-llm.sh).

Roadmap Phases

Below is the execution path. Each phase is self-contained and must be validated before moving to the next.

Foundational Layers

Routing & Cloud Integration

Optimization & Agent Workspaces

Verification & Deployment Packaging


Global Environment Naming Conventions

All environment configurations should follow this unified naming standard:

Variable Description
AMMARE_DEPLOY_PROFILE Controls which services are deployed (minimal-local, hybrid, full)
AMMARE_BASE_DIR Absolute path to the repository root directory
AMMARE_DATA_DIR Directory containing persistent storage volumes (data/models/, data/vector-db/, etc.)
AMMARE_MODEL_GATEWAY_URL The current active logical endpoint URL for LLM access
AMMARE_GATEWAY_URL The client-facing port of ammare-langchain (e.g. http://localhost:8080)
AMMARE_LOG_LEVEL Default logging verbosity (DEBUG, INFO, WARNING, ERROR)