How azure-samples/azure-ai-agents-javascript works
Project type and purpose
• This is a Node.js/TypeScript demo CLI application (“Azure AI Agent Service Demo”) that walks users through different Azure AI Agent tooling scenarios (simple calculation, functioncall tools, code interpreter, RAG with Azure AI Search, Bing Grounding, usage stats).
• Its goal is to show off various Azure AI Foundry agent capabilities in a modular, extensible way.
File structure
• Top-level:
• src/ – application source
• src/config/ – environment & prompt configurations
• src/services/ – three core services: agentService, threadService, toolService
• src/utils/ – shared helpers (console output, formatting)
• src/index.ts – CLI entrypoint
• files/ – sample documents for RAG
• examples/ – example scripts showing usage
• package.json, tsconfig.json – build/config
• Patterns:
• Layered/modular (Config → Services → Utils)
• “Service-oriented” modules wrap specific functionality (agent orchestration, thread management, external tooling)
• External-service integration (Azure AI Foundry, Azure Search, Bing)
README for additional insights
• Describes demo features and required Azure setup (AI Foundry project, optional AI Search and Bing Grounding connections).
• Indicates this is a CLI demo: npm start and selecting an agent scenario.