Skip to content

Azure-Samples/azure-ai-agents-javascript

Repository files navigation

Azure AI Agent Service Demo

This demo originally started out using the code from the Azure AI Agent QuickStart, but has expanded to show different agent tooling features:

  • Perform a simple calculation (no tools)
  • Make function calls using Function Calling Tools
  • Create a function using code interpreter
  • Examine a CSV file and create diagrams from it using code interpreter
  • Examine a CSV file and provide analysis using code interpreter
  • Perform RAG functionality using AI search
  • Use real-time public web data using Bing Grounding
  • Return usage stats about in/out tokens

Demo Prompts

AI Foundry Project Setup

To use the demo you'll need to create an Azure AI Foundry project by following the QuickStart.

AI Search Tooling Setup

If you'd like to use the AI Search/RAG functionality in the demo, you'll find details about the setup in the AI Search tooling document. You'll need to:

Bing Grounding Tooling Setup

If you'd like to use the Bing Grounding functionality in the demo, you'll find details about the setup in the Bing Grounding tooling document.

Running the Demo

After going through the QuickStart steps (and optionally the AI Search and Bing Grounding tooling setup), perform the following steps:

  1. Rename .env.template to .env.

  2. Assign your Azure AI Foundry endpoint, your AI Search connection ID, the AI Search index name, and the Bing Grounding connection ID from Azure AI Foundry to the appropriate env keys. You can optionally change the model deployment name.

    AI_FOUNDRY_PROJECT_ENDPOINT=https://<your-endpoint>.services.ai.azure.com/api/projects/<your-project>
    AI_SEARCH_CONNECTION_ID=/subscriptions/<subscription-id>/resourceGroups/<resource-group>/providers/Microsoft.CognitiveServices/accounts/<account-name>/projects/<project-name>/connections/<connection-name>
    AI_SEARCH_INDEX_NAME=<your-index-name>
    BING_GROUNDING_CONNECTION_ID=/subscriptions/<subscription-id>/resourceGroups/<resource-group>/providers/Microsoft.CognitiveServices/accounts/<account-name>/projects/<project-name>/connections/<connection-name>
  3. Install the project dependencies:

    npm install
  4. Start the demo:

    npm start
  5. Select an agent demo to run.

About

Build your Agents in JavaScript with Azure AI Agent Service

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Contributors 3

  •  
  •  
  •