TARS Multi AI Agent System
- Project Overview
- Architecture
- Project Structure
- Tech Stack
- Deployment Guide
- How It Works
- Key Features
- Collaborators
- Future Improvements
- Disclaimer
TARS Multi-Agent System is a platform for business process optimization using a multi-agent AI architecture. It consists of a Next.js front-end, a FastAPI back-end, and Terraform-managed Azure infrastructure. The system leverages Microsoft AI Foundry, A2A, and MCP for advanced AI capabilities.
This illustration highlights the business pain points (siloed data, slow manual analysis) and how TARS unifies internal and external data for actionable, real-time recommendations.
This diagram shows how the front-end (deployed on Vercel) communicates with the back-end FastAPI service running in a Docker container on an Azure VM. The back-end orchestrates agent logic, calls to Microsoft AI Foundry, and MCP (Brave Search, Firecrawl, Tavily).
The TARS system integrates with Microsoft AI Foundry, accessing the ContosoDataV2:1 dataset containing organizational documents structured in various departments including Finance, Operations, Policy, Procurement, Sales, and Strategic departments. This data provides the internal knowledge base that powers Agent 1's enterprise knowledge capabilities.
Azure VM running the TARS multi-agent backend in a Docker container, with Standard_B2s size and Linux OS in East US region, managed through pay-as-u-go subscription.
The front-end is deployed on Vercel's platform, with automated CI/CD from the main branch, providing high availability and scaling capabilities.
This architecture details the flow between SharePoint/Fabrics, the five agents (Enterprise Knowledge, Global Intelligence, Consultant, Outcome Predictor, Informant), and how outputs are structured for the front-end.
This diagram shows the A2A (Agent-to-Agent) orchestration, the role of the Strategic Analyst Agent as orchestrator, and the division between knowledge agents and action agents.
The repository is organized into three main folders:
- Framework: Next.js with TypeScript and Redux
- Deployment: Vercel
- Purpose: Provides an interactive user interface for managing agent workflows, chat interactions, and displaying optimization results.
- Key Features:
- Agent workflow visualization
- Chat interface for user queries
- Output interface for analytics, recommendations, and business flow visualizations
- Framework: FastAPI
- Purpose: Implements the agent logic, abstraction layers, and integrations with Microsoft AI Foundry, A2A, and MCP.
- Key Features:
- Multi-agent coordination through a centralized process manager
- Dockerized for deployment
- Handles API requests for optimization queries
- Tool: Terraform
- Purpose: Provisions Azure Virtual Machines to host the back-end service.
- Key Features:
- Automates infrastructure setup
- Pulls and runs Docker images for the back-end service
The back-end is a FastAPI application that:
- Coordinates multiple agents through a centralized process manager
- Implements agent logic for tasks such as retrieving internal knowledge, performing external searches, and generating recommendations
- Provides a standardized API for front-end interaction
┌─────────────────────────────────────────────────────────────────────┐
│ FastAPI Application │
│ │
│ ┌─────────────┐ ┌─────────────────┐ ┌───────────────┐ │
│ │ API Routes │───────▶ Process Manager │─────▶│ Response │ │
│ │ /optimize │ │ (Orchestrator) │ │ Formatter │ │
│ └─────────────┘ └─────────────────┘ └───────────────┘ │
│ │ │ ▲ │
│ │ ▼ │ │
│ │ ┌───────────────────────────────────────┐ │
│ │ │ Agent Pipeline │ │
│ │ │ ┌─────┐ ┌─────┐ ┌─────┐ ┌─────┐ │ │
│ │ │ │ 1 │─▶│ 3 │─▶│ 4 │─▶│ 5 │ │ │
│ │ │ └─────┘ └─────┘ └─────┘ └─────┘ │ │
│ │ │ ▲ │ │ │
│ │ │ │ ▼ │ │
│ │ │ ┌─────┐ │ │
│ │ │ │ 2 │ │ │
│ │ │ └─────┘ │ │
│ │ └───────────────────────────────────────┘ │
│ │ │
│ │ │
│ ▼ │
│ ┌─────────────┐ │
│ │ Monitoring │ │
│ │ & Logging │ │
│ └─────────────┘ │
└─────────────────────────────────────────────────────────────────────┘
The front-end is built with Next.js and TypeScript, leveraging Redux for state management. It provides a responsive and interactive interface for:
- Submitting optimization queries
- Visualizing agent workflows
- Displaying analytics and recommendations
The infrastructure is managed using Terraform, which:
- Provisions Azure Virtual Machines
- Deploys the back-end service as a Docker container
- Front-End: Next.js, TypeScript, Redux, Tailwind CSS
- Back-End: FastAPI, Azure AI Agent Service, Python, Docker
- Infrastructure: Terraform, Azure VM
- AI Platform & Infrastructure: Microsoft AI Foundry
- MCP: Brave Search, Firecrawl
Deployed on Vercel for seamless CI/CD and scalability.
- Ensure you have access to an Azure Virtual Machine.
- Install Docker on the VM.
- Obtain the public IP address of the VM.
-
SSH into the Azure VM:
ssh -i ~/.ssh/tars_azure azureuser@YOUR_VM_PUBLIC_IP -
Pull the Docker image:
docker pull haziqishere/tars-multi-agent:v3.1-amd64
-
Run the Docker container:
sudo docker run -d -p 80:80 --platform=linux/arm64/v8 haziqishere/tars-multi-agent:v3.1-amd64
-
Verify the container is running:
docker ps
-
Access the application via the VM's public IP address in a browser.
- Install Terraform on your local machine.
- Configure Azure CLI and authenticate.
-
Navigate to the
infra-tarsdirectory:cd infra-tars -
Initialize Terraform:
terraform init
-
Apply the Terraform configuration:
terraform apply
-
Confirm the resources have been provisioned successfully.
- User Interaction: Users interact with the front-end to submit queries.
- Agent Coordination: The back-end processes the query through a pipeline of agents.
- Optimization Results: The results are displayed on the front-end, including analytics, recommendations, and visualizations.
- Multi-agent coordination for complex business process optimization
- Integration with Microsoft AI Foundry, A2A, and MCP
- Scalable and modular architecture
- Haziq: MLOps Engineer
- Ilham: AI Engineer
- Enhance agent logic with more advanced AI models
- Improve front-end interactivity and visualizations
- Automate deployment pipelines for faster updates
- We ARE fetching this from the currently running server at Azure VM
- However, Agent 4 sometimes goes wrong and we're not getting emails data. So we backfill the missing email params.
- The rest of the data are real from Azure VM that communicate with Microsoft AI Foundry (which the document data is located)







