Quickstart
This guide will show you how to call your first Inconvo Data Agent.
-
Create an Inconvo Account
You can sign up for a free account here.
-
Create your first Data Agent
Once you’ve created an account, follow the steps in the app to:
- Complete your account details.
- Create your first Data Agent.
-
Obtain an API key & Agent ID
- Navigate to the Inconvo Dashboard.
- Copy your Agent ID from the sidebar.
- Paste your Agent ID into your
.envfile. - Create an API key.
- Paste your Inconvo API key into your
.envfile.
.env INCONVO_API_KEY=***INCONVO_AGENT_ID=***
-
Connect your database
In the app, fill out the database connection form with:
- Host: IP address or domain
- Port: e.g.
5432 - Username: database user
- Password: database user password
- Database Name: database to connect
-
Install Inconvo SDK
Install the Inconvo SDK to your project by running the following command in your terminal.
Terminal window npm i @inconvoai/node dotenv -
Generate your semantic layer via coding agent
Add the Inconvo skill to your coding agent:
Terminal window npx skills add inconvoai/inconvoPull your semantic model locally:
Terminal window npx inconvo model pullThen inside your project ask your coding agent to update the semantic model. For example:
Use the inconvo-cli to update the semantic layerfor the inconvo data agent.Ensure you give your coding agent access to all of the context it needs to build the semantic layer.
-
Write code to call the Data Agent
We’ll write the minimal code for starting a conversation with the Data Agent and sending a message to elicit a response.
index.ts import "dotenv/config";import { randomUUID } from "node:crypto";import Inconvo from "@inconvoai/node";const inconvo = new Inconvo({apiKey: process.env.INCONVO_API_KEY,});async function main() {const agentConvo = await inconvo.agents.conversations.create(process.env.INCONVO_AGENT_ID!,{userIdentifier: randomUUID().toString(),userContext: {organisationId: 1,}, // NOTE: This is userContext for DemoAgent - change as needed},);const agentResponse = await inconvo.agents.conversations.response.create(agentConvo.id!,{agentId: process.env.INCONVO_AGENT_ID!,message: "Hello agent!",stream: false,},);console.log(agentResponse);}main().catch(console.error); -
Call your Data Agent
Terminal window npx tsx ./index.ts