This README guides you through setting up and running the Chat with Documentation application, which demonstrates how to scrape documentation websites and use Inworld's Knowledge nodes to provide accurate, context-aware responses.
- Node.js 18 or higher
The application consists of two main components:
-
server: Handles documentation scraping, knowledge management, and communication with Inworld's services
-
client: Provides a user interface for loading documentation and chatting with the AI
Copy server/.env-sample to server/.env and configure your settings:
cd server
cp .env-sample .env
# Edit .env and add your INWORLD_API_KEY + modify other vars if you wantInstall dependencies for both server and client:
# Install server dependencies
cd server
yarn install
# Start the server
yarn startThe server will start on port 3001.
# Install client dependencies
cd ../client
yarn install
yarn startThe client will start on port 3000 and should automatically open in your default browser.
-
Load documentation:
-
Enter a documentation URL (e.g.,
https://docs.inworld.ai/docs/introduction) -
Click "Load Documentation" and wait for the scraping to complete
-
The system will display the number of pages and knowledge records created
-
-
Start chatting:
-
Once documentation is loaded, type your questions in the chat input
-
The AI will respond based on the loaded documentation
-
If no relevant documentation is found, you'll be prompted to load a different URL
-
-
If you encounter connection issues, ensure both server and client are running. Server should be running on port 3001 and client on port 3000.
-
Check that your API key is valid and properly set in the .env file.
-
If documentation loading fails, verify the URL is accessible and contains scrapable content. Some sites may block automated scraping.
-
For sites without sitemap.xml, the crawler will attempt to discover pages by following links from the base URL.
The application implements a custom RAG pipeline using Inworld Runtime:
ProxyNode → QueryEmbedderNode → KnowledgeRetrievalNode → JinjaPromptRenderNode → RemoteLLMChatNode
This demonstrates:
- Custom node implementation for specialized RAG workflows
- Pre-computed embeddings for efficient knowledge retrieval
- Jinja templating for dynamic prompt generation
- Streaming LLM responses with conversation history
This project is licensed under the MIT License — see the LICENSE file for details.