Chromia
Start Building

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:

shell
chr node start

Optional: To begin from an empty database instead, use:

shell
chr node start --wipe

This 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:

shell
npm run ui

If you chose Bun earlier, run this instead:

shell
bun run ui

The UI is served at:

http://localhost:1234

Start the AI agent

Open one more terminal and launch the AI agent:

shell
npm run dev

If you chose Bun earlier, run this instead:

shell
bun run dev

Once the agent is running, it prints a URL in the terminal that looks like this:

http
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 .env file automatically. Restarting the Chromia node can leave that saved ID invalid. To resolve this, remove the line with SESSION_ID from the .env file. 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 .env file is set up properly and contains a valid API key.
    • Dependencies were installed successfully (npm install, or bun install if 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.

Written for this site from Chromia’s public course. Code samples are the course’s own.