- ⚡ Quick Start
- 🐳 Docker
- 👨💻 Developers
- 🌱 Env Variables
- 📖 Documentation
- 🌐 Self Host
- ☁️ Flowise Cloud
- 🙋 Support
- 🙌 Contributing
- 📄 License
There are two main ways to get started with TheAnswer: local development setup and deployment on Render.
-
Clone the repository:
# Recommended: Clone with submodules included git clone --recursive https://github.com/the-answerai/theanswer.git cd theanswer
Alternative: If you already cloned without submodules:
git clone https://github.com/the-answerai/theanswer.git cd theanswer git submodule update --init -
Set up environment variables:
- Create a
.envfile in the root directory - If
.env.examplefiles are not available, contact The AnswerAI team for required environment variables - Use
API_HOSTto specify your API server host. All API requests automatically include the/api/v1prefix. API_BASE_URLis deprecated and should not be used.- Note: For local development, you'll need Auth0 development team access (Member role or above)
- Create a
-
Verify submodules are initialized:
git submodule status
You should see output like:
+050ca236891420946884c68ff8d74cbeb0cbe7ef packages/embed (aai-embed@3.0.3-23-g050ca23)If submodules are not initialized (empty directories or missing files), or if you need to update to the correct version, run:
# This will initialize, update, and force reset submodules to the correct commits pnpm submodule:initFor a complete reset (if you're having persistent issues):
# Remove and reinitialize all submodules pnpm submodule:resetNote: This repository uses git submodules. The
packages/embedsubmodule contains the chat embed functionality. See CONTRIBUTING.md for detailed submodule management instructions. -
Install dependencies:
pnpm install
-
Install Docker Desktop:
- Download and install Docker Desktop
- Ensure Docker is running before proceeding
-
Set up database and redis locally:
pnpm dev-docker
-
Optional: Install database tool
- Install DBeaver for database management
- Connect to PostgreSQL: localhost, example_user, example_password
-
Build and migrate the initial database:
pnpm build && pnpm db:migrate -
Run the application:
pnpm start
-
Access TheAnswer:
- After the build completes and the app starts, you should see logs stating that the server started on 'http://localhost:3000'
- Open http://localhost:3000 in your browser
- Verify you can login and access the application
-
For development:
- After initial setup, you can fast reload to test your changes using:
pnpm dev
For a quick and easy setup, we recommend deploying TheAnswer on Render:
-
Click the "Deploy to Render" button below:
-
Follow the prompts on Render to complete the deployment process.
-
Once deployed, you'll receive a URL to access your TheAnswer instance.
For detailed instructions on both local development and Render deployment, please refer to our documentation.
Note: The standalone TheAnswer CLI tool is currently under development. Stay tuned for updates on its release and installation process.
Note: The TheAnswer package is currently under development and not yet published to npm. Stay tuned for updates on when it will be available as a standalone CLI tool.
- Clone the Flowise project
- Go to
dockerfolder at the root of the project - Copy
.env.examplefile, paste it into the same location, and rename to.envfile docker compose up -d- Open http://localhost:3000
- You can bring the containers down by
docker compose stop
-
Build the image locally:
docker build --no-cache -t flowise . -
Run image:
docker run -d --name flowise -p 3000:3000 flowise
-
Stop image:
docker stop flowise
TheAnswer is built on top of Flowise and extends its functionality. The project structure is as follows:
All packages inside packages/* are from the original Flowise project:
server: Node backend to serve API logicsui: React frontend for Flowisecomponents: Third-party nodes integrationsembed: Embedding functionalityembed-react: React components for embeddingflowise-configs: Configuration files for Flowiseapi-documentation: Auto-generated swagger-ui API docs from express
TheAnswer adds additional functionality through the packages-answers/* directory:
db: Database interactionseslint-config-custom: Custom ESLint configurationexperimental-prisma-webpack-plugin: Experimental Prisma plugin for Webpacktsconfig: TypeScript configurationtypes: Shared type definitionsui: TheAnswer-specific UI componentsutils: Utility functions
This structure allows TheAnswer to build upon Flowise's core functionality while adding its own features and customizations. The TheAnswer-specific packages extend and enhance the capabilities of the original Flowise project, providing additional tools for AI-powered productivity and workflow management.
- Install PNPM
npm i -g pnpm
-
Clone the repository:
git clone https://github.com/the-answerai/theanswer.git
-
Go into repository folder:
cd theanswer -
Install all dependencies of all modules:
pnpm install
-
Build all the code:
pnpm build
Exit code 134 (JavaScript heap out of memory)
If you get this error when running the above `build` script, try increasing the Node.js heap size and run the script again:# macOS / Linux / Git Bash export NODE_OPTIONS="--max-old-space-size=4096" # Windows PowerShell $env:NODE_OPTIONS="--max-old-space-size=4096" # Windows CMD set NODE_OPTIONS=--max-old-space-size=4096
Then run:
pnpm build
-
Start the app:
pnpm start
You can now access the app on http://localhost:3000
-
For development build:
-
Create
.envfile and specify theVITE_PORT(refer to.env.example) inpackages/ui -
Create
.envfile and specify thePORT(refer to.env.example) inpackages/server -
Run:
pnpm dev
Any code changes will reload the app automatically on http://localhost:3000
-
Flowise supports different environment variables to configure your instance. You can specify the following variables in the .env file inside packages/server folder. Read more
You can view the Flowise Docs here
Deploy AnswerAgent self-hosted in your existing infrastructure. We support various deployments
For AWS deployments, AnswerAgent supports using AWS Secrets Manager to securely store the Flowise encryption key instead of environment variables.
-
Create the encryption key secret:
aws secretsmanager create-secret \ --name FlowiseEncryptionKey \ --secret-string 'your-secure-encryption-key-here' -
Update an existing secret:
aws secretsmanager put-secret-value \ --secret-id FlowiseEncryptionKey \ --secret-string 'your-new-encryption-key-here' -
Add to your environment variables:
# Flowise Encryption Key Override - AWS Secrets Manager SECRETKEY_STORAGE_TYPE="aws" SECRETKEY_AWS_REGION="us-east-1" SECRETKEY_AWS_NAME="FlowiseEncryptionKey"
- Enhanced Security: Keys are encrypted at rest and in transit
- Key Rotation: Easy rotation without application restarts
- Audit Trail: Full access logging and monitoring
- IAM Integration: Fine-grained access control
For detailed AWS deployment instructions, see AWS Deployment Guide.
Get Started with Flowise Cloud.
Feel free to ask any questions, raise problems, and request new features in Discussion.
We welcome contributions to TheAnswer! Whether you're fixing bugs, improving documentation, or proposing new features, your efforts are appreciated. Here's how you can contribute:
See Contributing Guide. Reach out to us at Discord if you have any questions or issues.
Source code in this repository is made available under the Apache License Version 2.0.
TheAnswer provides a script to automatically seed default credentials (API keys, service tokens, etc) into the Flowise database from environment variables. This is useful for setting up new environments or automating credential management.
- Safe by default: Running
pnpm seed-credentialswill perform a dry-run (test mode) and show what would be seeded, but will NOT write to the database. - To actually write credentials: Use
pnpm seed-credentials:writeto perform the operation and insert/update credentials in the database. - Full documentation: See
scripts/seed-credentials/README.mdfor detailed instructions, environment variable requirements, and advanced usage.
Example:
# Test mode (safe, dry-run, default)
pnpm seed-credentials
# Production mode (actually writes credentials)
pnpm seed-credentials:writeThe script supports a wide range of credential types and includes robust safety checks. For more details, troubleshooting, and environment variable examples, refer to the seed-credentials README.
TheAnswer supports optional Lacework FortiCNAPP Agent integration for runtime security monitoring and anomaly detection in AWS Fargate deployments.
Enable Lacework:
- Add
LaceworkAccessToken=your_token_hereto yourcopilot.{environment}.envfile - Deploy with
copilot deploy --env your-environment
Disable Lacework:
- Remove or comment out
LaceworkAccessTokenfrom your environment file - Deploy with
copilot deploy --env your-environment
- Optional Integration: Controlled by presence of
LaceworkAccessToken - Graceful Fallback: Application runs normally if Lacework token is not provided
- Non-Essential Sidecar: Sidecar failure doesn't affect main application startup
- AWS Fargate Optimized: Designed for Copilot deployments
# Connect to container
copilot svc exec --env your-environment
# Check Lacework status
ps aux | grep datacollector
tail -f /var/log/lacework/datacollector.log
# Check environment variables (WARNING: Do not screenshare - contains sensitive tokens)
env | grep -i laceworkFor detailed configuration, troubleshooting, and advanced setup, see Lacework Integration Documentation.
This project uses BWS Secure for managing environment variables across different environments.
📍 1. Visit the Bitwarden Machine Accounts section within your Vault.
- If you login directly to https://vault.bitwarden.com, you will need to navigate to the Machine Accounts section, within the Secrets Manager. The Secrets Manager is located in the left sidebar, typically at the bottom of the page.
- If you don't have access, please refer to the BWS Secure documentation or contact your team administrator
🖱️ 2. Navigate to the Machine Accounts section, and follow these steps:
- Select the appropriate Client/Set of Machine Accounts from the list
- Click on the "Access Tokens" tab
- Click "+ New Access Token" button
- Give the token a meaningful name (e.g., "Your Name - Local Development")
- Click "Save" to generate the token
📋 3. Copy the displayed token (you won't be able to see it again after closing)
💾 4. Add it to your .env file in your project root:
BWS_ACCESS_TOKEN=your_token_here
- BWS_ACCESS_TOKEN: Required to load secrets from Bitwarden (scoped to your machine account).
- BWS_PROJECT_ID (optional): Restrict to one or more BWS project UUIDs. Use a single UUID, or comma-separated UUIDs to merge projects (later IDs win when the same key exists in more than one project). Omit to use
bwsconfig.json/ project selection. Fully backward compatible with single-UUID setups.
Single project:
BWS_PROJECT_ID=00000000-0000-0000-0000-000000000001
Multiple projects (optional):
BWS_PROJECT_ID=00000000-0000-0000-0000-000000000001, 11111111-1111-1111-1111-111111111111
More detail: Multi-project ID guide.
Encrypted .env.secure / .env.secure.* files in the repo root are removed when each run finishes (after your command runs; secrets are already in the process environment). Set BWS_KEEP_SECURE_FILES=true only when you need to inspect those files.
- "No projects found": Verify your token has project access permissions in Bitwarden
- "Access denied": Check that the Machine Account has read permissions for the target projects
- Token not working: Ensure no extra spaces when copying from Bitwarden
- Multiple projects / overlays: Order matters for duplicate keys—see the multi-project guide above
To update BWS Secure to the latest version, you can use the convenient script that was added to your package.json:
npm run bws-update # Or: yarn bws-update, pnpm bws-updateAlternatively, from your project root:
rm -rf scripts/bws-secure && git clone git@github.com:last-rev-llc/bws-secure.git scripts/bws-secure && rm -rf scripts/bws-secure/.git && bash scripts/bws-secure/install.sh
