Integrate GitHub Copilot with Astra DB Serverless

query_builder 15 min

The DataStax GitHub Copilot Extension is currently in public preview. Development is ongoing, and the features and functionality are subject to change. Astra DB Serverless, and the use of such, is subject to the DataStax Preview Terms.

With the DataStax Extension for GitHub Copilot, you can use Copilot Chat to get help with DataStax products and interact with your Astra DB organization:

  • Ask general questions about Astra DB and DataStax Langflow.

  • Create Serverless (Vector) databases

  • Ask about your databases

  • Create Langflow flows from starter templates

  • Ask about your Langflow flows

Prerequisites

Add the DataStax Copilot Extension

To enable the DataStax Copilot Extension, you must activate the integration in your Astra DB organization and add the Extension to your GitHub account. You can do this from the Astra Portal or the GitHub Marketplace.

  • Astra Portal

  • GitHub Marketplace

  1. Sign in to GitHub account where you want to enable the DataStax Copilot Extension.

  2. Sign in to the Astra Portal, and then switch to the organization where you want to use the Extension.

  3. In the navigation menu, click Integrations.

  4. In the All Integrations section, click GitHub Copilot.

    The GitHub website opens in a new tab.

    Troubleshoot integration activation

    If the integration details page opens instead of the GitHub website, then the Extension is probably already Active in your Astra DB organization. Follow the GitHub Marketplace instructions to add the Extension to your GitHub account and authorize access to your Astra DB organization.

    If nothing happens, make sure your browser doesn’t have any features enabled, such as popup blockers, that could prevent the GitHub website from opening a new tab.

    Additionally, make sure you have permission to manage integrations for your organization.

  5. Follow the prompts to add the Extension to your GitHub account and authorize access to your Astra DB organization:

    1. On the DataStax GitHub App page, Click Configure.

    2. Select the account or organization where you want to install the app.

      Because the DataStax Extension doesn’t interact with GitHub repositories, there is no reason to install the DataStax Extension in a GitHub Organization. For more information, see the GitHub documentation on Authorizing GitHub Apps.

    3. Review the permissions required by the app, and then click Install & Authorize.

    4. Select the organization that you want to access through the Extension, and then click Continue.

      The DataStax Copilot Extension can connect to only one Astra DB organization per GitHub account.

    5. Review the Astra DB permissions required to execute the Extension’s functions, and then click Complete Integration.

  6. Return to the Astra Portal, and then refresh the Integrations page. If authorization succeeded, the GitHub Copilot integration is marked Active.

  1. Sign in to the GitHub account where you want to add the DataStax Copilot Extension.

  2. Go to the DataStax Copilot Extension in the GitHub Marketplace.

  3. Click Add.

  4. Follow the prompts to add the Extension to your GitHub account and authorize access to your Astra DB organization:

    1. On the DataStax GitHub App page, Click Configure.

    2. Select the account or organization where you want to install the app.

      Because the DataStax Extension doesn’t interact with GitHub repositories, there is no reason to install the DataStax Extension in a GitHub Organization. For more information, see the GitHub documentation on Authorizing GitHub Apps.

    3. Review the permissions required by the app, and then click Install & Authorize.

    4. Select the organization that you want to access through the Extension, and then click Continue.

      The DataStax Copilot Extension can connect to only one Astra DB organization per GitHub account.

    5. Review the Astra DB permissions required to execute the Extension’s functions, and then click Complete Integration.

Use the Extension

Anywhere that you can chat with Copilot, you can use @datastax to trigger the DataStax Extension. For example:

@datastax What databases do I have?

@datastax Create a database in the GCP us-east1 region.

@datastax What is the Data API?

Ask questions and get help

The Extension has access to Astra DB and Langflow documentation on the DataStax Docs site.

You can ask questions about these products, and Copilot generates a natural-language response as well as links to relevant documentation:

@datastax What is an application token?

@datastax Where can I find my organization ID?

@datastax How do I use the Data API?

@datastax Can Astra DB automatically generate embeddings?

DataStax welcomes feedback on these responses.

To submit feedback, use the Was this helpful? form at the bottom of any documentation page. Click either Yes or No, and then enter your comments about your query and the response.

Your feedback is sent directly to the DataStax documentation team for review.

Create Serverless (Vector) databases

You can ask Copilot to create a Serverless (Vector) database:

@datastax Create a database

@datastax Create a database named dev_db_1 in the AWS us-east-1 region.

If you don’t specify a name, cloud provider, or region, Copilot will ask you to provide that information.

Copilot returns a warning if the specified region doesn’t exist or the specified region is a premium region. Premium regions are regions that require a Pay As You Go or Enterprise plan.

You can specify an initial keyspace name. If you don’t specify one, Copilot won’t ask for one, and it will use default_keyspace.

Copilot can create Serverless (Vector) databases only.

Ask about your databases

You can also ask Copilot for information about your databases, such as:

  • Database names

  • Database IDs

  • Database links

  • Database status

  • Table and collection names

@datastax What databases do I have?

@datastax What tables are in my prod_db_1 database?

@datastax What collections are in my dev_db_1 database?

Create flows in DataStax Langflow

This feature is available only for DataStax Langflow. It is not compatible with OSS Langflow.

If DataStax Langflow is not enabled for your Astra DB organization, Copilot returns an error when you ask about your Langflow flows or try to create flows.

You can ask Copilot to create a flow in DataStax Langflow from one of the starter templates:

@datastax Create a Langflow flow

@datastax Create a Langflow flow called DemoFlow3

If you don’t specify a template or name, Copilot will ask you to choose one.

Ask about your flows

You can ask Copilot for information about your Langflow flows, such as:

  • Flow names

  • Flow IDs

  • Flow endpoints

  • Descriptions

Remove connected GitHub accounts from your Astra DB organization

  1. In the Astra Portal navigation menu, click Integrations.

  2. Click GitHub Copilot.

  3. In the Connected Accounts section, review the GitHub accounts that have access to your organization through the Extension.

  4. If you notice a user who should not have access, click Remove.

    The selected GitHub account no longer has access to your organization through the DataStax Copilot Extension.

Remove the Extension from your GitHub account

  1. In your GitHub account settings, navigate to Applications.

  2. On the Installed GitHub Apps tab, find the DataStax Copilot Extension.

  3. Click Configure, and then click Uninstall.

    The app is removed from your GitHub account, and your Copilot installation can no longer access your Astra DB organizations or use any of the functions available through the Extension.

Was this helpful?

Give Feedback

How can we improve the documentation?

© 2024 DataStax | Privacy policy | Terms of use

Apache, Apache Cassandra, Cassandra, Apache Tomcat, Tomcat, Apache Lucene, Apache Solr, Apache Hadoop, Hadoop, Apache Pulsar, Pulsar, Apache Spark, Spark, Apache TinkerPop, TinkerPop, Apache Kafka and Kafka are either registered trademarks or trademarks of the Apache Software Foundation or its subsidiaries in Canada, the United States and/or other countries. Kubernetes is the registered trademark of the Linux Foundation.

General Inquiries: +1 (650) 389-6000, info@datastax.com