GitHubスター
1
ユーザー評価
未評価
お気に入り
0
閲覧数
9
フォーク
1
イシュー
0
lumen
lumen
is an AI-powered assistant designed to help you quickly query AWS documentation and get the answers you need. It uses Retrieval Augmented Generation (RAG), AWS Model Context Protocol (MCP) servers and Amazon's Nova Large Language Models (LLMs).
Prerequisites
- An AWS Account
- Docker installed and running
uv
installedgit
installed
AWS Setup
To run lumen
, you will need an AWS Account. If you don't have one, you can find how-to steps here.
[!NOTE]
If you plan to use a different region from N. Virginia (us-east-1), don't forget to change the selected region in the AWS Console, update the region part (e.g., us-east-1) in all resource ARNs within the IAM policy JSON, and the .env file. Double-check if the foundation models mentioned below are available in the selected region.
Bedrock Model Access
You need Access granted status for the following models:
- Titan Text Embeddings V2
- Nova Pro
- Nova Lite
- Nova Micro
More info on how to modify Bedrock model access can be found here.
Create new IAM Policy:
This IAM policy will be attached to a new IAM User, which lumen
will use to make calls to AWS Bedrock foundation models.
- Open the IAM Console
- Click Policies on the left sidebar
- Select Create policy
- Switch the view from Visual to JSON
- Paste the JSON from below and create the policy
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "AllowInvokeBedrockModels",
"Effect": "Allow",
"Action": "bedrock:InvokeModel",
"Resource": [
"arn:aws:bedrock:us-east-1::foundation-model/amazon.nova-micro-v1:0",
"arn:aws:bedrock:us-east-1::foundation-model/amazon.nova-lite-v1:0",
"arn:aws:bedrock:us-east-1::foundation-model/amazon.nova-pro-v1:0",
"arn:aws:bedrock:us-east-1::foundation-model/amazon.titan-embed-text-v2:0"
]
}
]
}
IAM User setup
At this point, you should have access to the four foundation models and an IAM policy ready.
- Open the IAM Console
- Click on Users on the left sidebar
- Select Create user
- No need to check Provide user access to the AWS Management Console
- Attach the policy you created in the previous step
- Create the user and go to the new user's overview page
- Open the Security credentials tab
- Create and save the access key
.env file
Now you have your Access key
and Secret access key
.
Rename the .env.template
file to .env
and update the following variables:
- AWS_ACCESS_KEY_ID=your_access_key
- AWS_SECRET_ACCESS_KEY=your_secret_key
- AWS_REGION=your_chosen_region (e.g., us-east-1)
Quick Start
Install uv
. Then, follow these steps:
Clone the repository:
git clone https://github.com/kaumnen/lumen cd lumen
Install dependencies using uv:
uv sync --frozen --refresh
Run Qdrant:
The docker run command for Qdrant mounts a volume for data persistence, meaning you will lose the vectors only if you explicitly delete them.docker run -p 6333:6333 -p 6334:6334 \ -v "$(pwd)/qdrant_storage:/qdrant/storage:z" \ qdrant/qdrant
Run lumen:
From the root directory of the project, execute the following command:uv run streamlit run app.py
You can access the lumen
app by navigating to the local URL provided in your terminal (usually http://localhost:8501
) in your browser.