04 / 05Advanced
Test your setup
With the project set up, you can now confirm that every part runs as expected. Work through the steps below.
Start the Chromia node
Launch the Chromia node with this command:
chr node startOptional: To begin from an empty database instead, use:
chr node start --wipeThis returns the database to its original state, which is handy while you develop.
Start the user interface (Optional)
Open a second terminal and launch the user interface so you can reach the chat agent from a browser:
npm run uiIf you chose Bun earlier, run this instead:
bun run uiThe UI is served at:
http://localhost:1234
Start the AI agent
Open one more terminal and launch the AI agent:
npm run devIf you chose Bun earlier, run this instead:
bun run devOnce the agent is running, it prints a URL in the terminal that looks like this:
http://localhost:1234/?sessionId=<session_id>Substitute <session_id> with the session ID shown in your terminal output. Each running instance of the chat agent gets its own session ID.
Interact with the chat agent
Load the URL in a browser to reach the chat agent. Send a few messages and check the replies to confirm the setup works.
Troubleshooting tips
-
Session ID conflicts:
The session ID is saved to the.envfile automatically. Restarting the Chromia node can leave that saved ID invalid. To resolve this, remove the line withSESSION_IDfrom the.envfile. The AI agent creates a fresh session ID on its next run. -
Chat agent doesn't respond:
Check that:- The Chromia node is up and running.
- Your
.envfile is set up properly and contains a valid API key. - Dependencies were installed successfully (
npm install, orbun installif you use Bun).
-
Checking logs:
If the problem continues, read the console output in each terminal. The detailed error messages there help you pinpoint the cause.