# Test your setup · Build a chat agent on Chromia · Learn Chromia

> With the project set up, you can now confirm that every part runs as expected. Work through the steps below.

Source: https://chromia.com/learn/chat-agent-course/test-your-setup/

Build a chat agent on ChromiaLesson 4 of 5

1. [01Build a chat agent on Chromia](https://chromia.com/learn/chat-agent-course/introduction/)
2. [02Set up your project](https://chromia.com/learn/chat-agent-course/setup/)
3. [03Configure your API key](https://chromia.com/learn/chat-agent-course/configure-api-key/)
4. [04Test your setup](https://chromia.com/learn/chat-agent-course/test-your-setup/)
5. [05Explore and extend](https://chromia.com/learn/chat-agent-course/explore-and-extend/)

[Learn](https://chromia.com/learn/)[Build a chat agent on Chromia](https://chromia.com/learn/chat-agent-course/)

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

```nolines
chr node start
```

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

shell

```nolines
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

```nolines
npm run ui
```

If you chose Bun earlier, run this instead:

shell

```nolines
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

```nolines
npm run dev
```

If you chose Bun earlier, run this instead:

shell

```nolines
bun run dev
```

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

http

```nolines
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.

[← Previous**Configure your API key**](https://chromia.com/learn/chat-agent-course/configure-api-key/)[Next →**Explore and extend**](https://chromia.com/learn/chat-agent-course/explore-and-extend/)

On this page

* [Start the Chromia node](#start-the-chromia-node)
* [Start the user interface (Optional)](#start-the-user-interface-optional)
* [Start the AI agent](#start-the-ai-agent)
* [Interact with the chat agent](#interact-with-the-chat-agent)
* [Troubleshooting tips](#troubleshooting-tips)
