Initial Hydra Setup
Learn how to set up and configure Hydra AI for building a CRM chat assistant.
In this quickstart, we'll build an AI-powered CRM assistant that helps users manage customer notes and emails. We'll start by setting up the core Hydra configuration.
1. Adding the Context Provider
Make sure to set your NEXT_PUBLIC_HYDRA_API_KEY
in your environment
variables before initializing the application.
Next, wrap your application with the HydraProvider
to make Hydra's functionality available throughout your app.
What's happening here:
- Wrap your application with the
HydraProvider
to make Hydra's functionality available throughout your app.
Implementing the App Wrapper
2. Configure Hydra
Definitions:
- Hydra Config: The configuration for the Hydra AI SDK
- Personality: The personality of the AI assistant
- Tool Registry: A registry of tools (sometimes called function calls) that the AI can use to interact with the world
- Component Registry: A registry of UI components that the AI can use to interact with the user
The personality configuration defines how our CRM assistant will interact with users.
What's happening here:
- Define personality configuration
- Define tool registry
- Define component registry
- Initialize Hydra with all the necessary configuration
We will add tools, and components latter in this quickstart.
What you have now?
- Defined the function and personality of your AI assistant
- Created empty registries for tools and components
- Initialized Hydra with the necessary configuration
- You know have access to the powerful context hooks to create a chat interface
In the next section, we'll use the context hooks to create a chat interface.