Skip to content

Quickstart

This guide will show you how to call your first Inconvo Data Agent.


  1. Create an Inconvo Account

    You can sign up for a free account here.

  2. Create your first Data Agent

    Once you’ve created an account, follow the steps in the app to:

    1. Complete your account details.
    2. Create your first Data Agent.

  3. Obtain an API key & Agent ID

    1. Navigate to the Inconvo Dashboard.
    2. Copy your Agent ID from the sidebar.
    3. Paste your Agent ID into your .env file.
    4. Create an API key.
    5. Paste your Inconvo API key into your .env file.
    .env
    INCONVO_API_KEY=***
    INCONVO_AGENT_ID=***

  4. 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
  5. 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
  6. Generate your semantic layer via coding agent

    Add the Inconvo skill to your coding agent:

    Terminal window
    npx skills add inconvoai/inconvo

    Pull your semantic model locally:

    Terminal window
    npx inconvo model pull

    Then inside your project ask your coding agent to update the semantic model. For example:

    Use the inconvo-cli to update the semantic layer
    for the inconvo data agent.

    Ensure you give your coding agent access to all of the context it needs to build the semantic layer.


  7. 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);
  8. Call your Data Agent

    Terminal window
    npx tsx ./index.ts