Start Building

How to Deploy VegaRAG.

VegaRAG gives you two choices: Test your exact usecase on our managed servers for free, or deploy the Open-Source engine to your own AWS account.

1

The 250k Token Trial

Don't want to mess with AWS configurations yet? You can build, configure, and stress-test your agents entirely on our hosted infrastructure. We cover the vector database and LLM compute costs up to your monthly token limit so you can prove your concept works first.

  • Includes 250,000 Amazon Bedrock tokens per month
  • 100MB of Pinecone Vector storage
  • No credit card required to start
$ vegarag init
Initializing workspace...
Loading vector embeddings... [OK]
> User: How does VegaRAG work?
> Agent: I am routing your query to Amazon Bedrock Nova Micro. The embedding returned 3 chunks from your S3 bucket.
2

Self-Host Open Source

Ready to push to production with absolute data privacy? The VegaRAG core repository contains frontend and backend Dockerfiles, allowing you to easily deploy on your own AWS infrastructure using Fargate.

Clone the Open-Source Engine

Grab the latest version of the VegaRAG monorepo directly from GitHub. It includes both the Next.js frontend and the FastAPI backend.

$git clone https://github.com/challayashwanth1998-png/vega-rag.git
$cd vega-rag

Containerize and Push to ECR

Use Docker to build your containers. Push both images securely to AWS Elastic Container Registry (ECR).

# Authenticate your terminal
aws ecr get-login-password --region us-east-1 | docker login --username AWS --password-stdin <AWS_ACCOUNT_ID>.dkr.ecr.us-east-1.amazonaws.com

# Build mapping to the x86 Linux Fargate CPUs
docker build --platform linux/amd64 -t vegarag-backend ./backend
docker tag vegarag-backend:latest <AWS_ACCOUNT_ID>.dkr.ecr.us-east-1.amazonaws.com/vegarag-backend:latest
docker push <AWS_ACCOUNT_ID>.dkr.ecr.us-east-1.amazonaws.com/vegarag-backend:latest

Provision AWS Infrastructure

Initialize the multi-tenant DynamoDB state table and the secure S3 document vault.

aws dynamodb create-table \
--table-name vegarag_table \
--attribute-definitions AttributeName=PK,AttributeType=S AttributeName=SK,AttributeType=S \
--key-schema AttributeName=PK,KeyType=HASH AttributeName=SK,KeyType=RANGE \
--billing-mode PAY_PER_REQUEST

aws s3 mb s3://vegarag-documents-<ID> --region us-east-1

Configure Parameter Store

Store your Pinecone and AWS configurations securely in the Systems Manager (SSM) Parameter Store to inject them into the ECS Tasks.

aws ssm put-parameter --name "/vegarag/prod/pinecone_api_key" --value "your-pinecone-key" --type "SecureString"
aws ssm put-parameter --name "/vegarag/prod/pinecone_index" --value "vegarag-index" --type "String"
aws ssm put-parameter --name "/vegarag/prod/s3_bucket" --value "vegarag-documents-<ID>" --type "String"

Apply IAM Security Policies

Never hardcode AWS keys in your .env file. Create an Execution Role allowing Fargate to natively call Bedrock APIs.

aws iam create-role --role-name vegaragTaskRole \
--assume-role-policy-document file://ecs-trust-policy.json

aws iam attach-role-policy --role-name vegaragTaskRole \
--policy-arn arn:aws:iam::aws:policy/AmazonBedrockFullAccess

Route with a Load Balancer

Since the React frontend is on port 3000 and FastAPI on 8000, use an Application Load Balancer to unify them on one domain.

# Map all API calls to the python backend
aws elbv2 create-rule --listener-arn <LISTENER_ARN> --priority 10 \
--conditions Field=path-pattern,Values='/api/*' \
--actions Type=forward,TargetGroupArn=<BACKEND_TG_ARN>

Launch on Fargate

Inject your containers into the cloud. AWS ECS automatically handles scaling and health checks.

aws ecs create-service \
--cluster vegarag-cluster \
--service-name vegarag-backend-svc \
--task-definition vegarag-backend-task \
--launch-type FARGATE \
--network-configuration "awsvpcConfiguration=..."