- Communication replies on Valkey pub/sub
- Persistent short memory storage uses Apache Kafka topics
- Long term memory relies on RAG, langchain, OpenSearch and Apache Kafka
If you don't have Aiven account yet, register here to get extra credits.
In Aiven console Go to User Information menu and select Tokens:
Click on Generate token, add a description for the token and press to generate. A popup with a newly generated token will appear. Copy token value.
In this project we use Terraform to set up Aiven services. If you don't have Terraform installed follow the steps from the Terraform documentation page.
The terraform files can be found in ./terraform
folder of the current project.
./terraform/terraform.tfvars-example
provides an example of tfvars file.
- Rename (or create a new file) to
./terraform/terraform.tfvars
- Populate aiven_api_token with the token that you copied from the console
- Populate project_name with the name of the Aiven project
- Navigate to
terraform
folder - Set
export PROVIDER_AIVEN_ENABLE_BETA=true
in the terminal (Terraform Valkey resource is still in beta stage) - Run
terraform init
- Run
terraform plan
- Run
terraform apply
Terraform will initiate creation of four resources:
- Aiven for Apache Kafka
- Apache Kafka topic
- Aiven for OpenSearch
- Aiven for caching (Valkey)
Once deployment is done, Terraform will also create .env
file with necessary credentials to access the services and certificates
folder with Apache Kafka certificates.
In this project we use LLM Claude available through Amazon Bedrock. To invoke the model you need first to enable access:
- In AWS console select region where Amazon Bedrock and Claude model is available (for example,
us-east-1
). - Go to Amazon Bedrock service page.
- Select Providers in the menu and then Anthropic, scroll to the Claude models.
- In this project we use Claude 3 Haiku, you can also select a different model, but that might require changes in request/response formats.
- If you see a message
This account does not currently have access to this model. Request access in Model access.
, go to Model access and enable the model.
This project assumes that AWS_SECRET_ACCESS_KEY and AWS_ACCESS_KEY_ID are accessible through the environment variables. Follow AWS documentation for more details.
Context: the credentials are used by @aws-sdk/client-bedrock-runtime
when creating a client, see Bedrock client creation in ./src/common.js
for details.
This project uses npm and NodeJS, if you don't have them installed, follow instruction at the NodeJS documentation page
Run
npm install
Run
node run