- By installing the app via the Snowsight UI
- Via the Contextual REST API
Installation
Get started by installing Contextual AI from the Snowflake Marketplace and activating it in Snowsight.Activating the Contextual AI app in Snowflake
- Log in to Snowflake and search for Contextual AI from the homepage.
You can also go to the Snowflake Marketplace and search for Contextual AI there.
- Select Contextual AI Platform from the search results.
- Click the Start trial button on the installation page.
- Click Configure after the app finishes installing.
- Click the Grant button to give
CREATE COMPUTE POOLandBIND SERVICE ENDPOINTprivileges to the Contextual AI app. - Click Activate in the Snowsight UI to begin using the Contextual AI app in your Snowflake environment.
Note: This step may take up to 1 hour to process. You’ll get an email from Snowflake when installation is complete and the app is ready to use.

Contextual AI Agent Setup
- Go to Catalog -> Apps to verify that the Contextual AI app has finished installing. The status of the app should display Installed.

- Click on Contextual AI Platform to view its app catalog page.
- Click Launch App to run the Contextual AI app and log in with your Snowflake credentials.
Note: The first user accessing the app is automatically designated as the Admin User, so we recommend having your team’s administrator be the one to load it first.
- Click the + New Agent button on the top right of the Agents page. You will see the Contextual AI dashboard and the place where you’ll create your first AI Agent and its new datastore.
- On the Create Agent page, give your agent a unique Agent Name and Description.
- Make sure the Create a new datastore radio button is selected. This will tell Contextual AI to create an accompanying datastore with the same name as your agent.
- Click the Create button at the bottom of the page to save your configuration and create your agent.

Adding Knowledge to Your Agent’s Datastore
You now need to add knowledge to your agent’s datastore to make it grounded in real world knowledge for responding to your prompts.- Click Datastores on the left-hand side and locate your agent’s newly created datastore.
- Click the Documents button on the right-hand side of your agent’s datastore.
- Select the Ingest tab to upload a document (for example, a Microsoft Word or PDF file).
- Drag and drop or select a file to upload and click the Start Uploading button. The system will automatically begin processing it in the background. This process extracts information from your documents and prepares them for future retrieval by your agents.

- Wait until your document has been uploaded and processed. Contextual AI will indicate that your document is done with the Processed status indicator.
- Click the Agents button on the left-hand side followed by your agent’s tile to start interacting with your agent.
- Your agent can now access and reference the knowledge from your uploaded documents during conversations. Try asking your agent a question in the prompt window.

Using the Contextual AI REST API
Contextual AI provides a REST API for programmatic interaction with your agents and datastore. After you have created and configured an agent and its datastore through the UI, you can integrate it into your applications and workflows using API endpoints. API Access in the Contextual AI Native App requires obtaining the API endpoint of your instance, which can be found by running this Snowflake query in a Snowflake worksheet or via the Snowflake CLI:xxxxx-xxxxx-xxxxx.snowflakecomputing.app. This URL value is the backend API endpoint for your application.
To create the full API endpoint, you will need to prepend https:// to the backend API endpoint from your application and then append /v1 at the end.
An example of how to do this in Python:
Note: We recommend using the Contextual AI Python SDK to interact with the API. An example script of our Python SDK and Snowflake Native App can be found here.