GenAIScript
@microsoft
About GenAIScript
Automatable GenAI Scripting
Overview
What is GenAIScript?
GenAIScript is a JavaScript toolbox for programmatically assembling prompts and orchestrating LLMs, tools, and data in code. It runs as a Visual Studio Code extension or a command-line tool and is designed for developers who want to treat prompt engineering like software engineering.
How to use GenAIScript?
Install the Visual Studio Code extension or use the command line (npx genaiscript). Write scripts using the $ template tag to create prompts and the def function to include files, data, or schemas. Connect to supported LLM providers—GitHub Copilot, GitHub Models, OpenAI, Azure OpenAI, Anthropic, and local models via Ollama—and run, debug, and test scripts directly in VS Code or from the terminal.
Key features of GenAIScript
- Stylized JavaScript/TypeScript for prompt assembly
- Fast edit, debug, run, and test loop in VS Code
- Reusable, version-controlled script files
- Built-in data schemas with Zod support
- Ingest PDF, DOCX, CSV, XLSX, and more
- File generation with diff preview and refactoring UI
- File search (grep, fuzz) within scripts
- LLM tools and agents, including MCP tools
- Vector search (RAG) built in
- Code interpreter in sandboxed environment
- Docker container execution
- Video processing (transcription, frame extraction)
- LLM composition (run prompts within prompts)
- Prompty format support
- Secret scanning for chat security
- CLI and API for automation
- Responsible AI content safety support
- Pull request reviews (GitHub Actions, Azure DevOps)
- Tests and evals powered by promptfoo
Use cases of GenAIScript
- Generate structured outputs (e.g., JSON) from file analysis
- Classify text or images with custom categories
- Automate pull request reviews with AI comments
- Run code interpretation for data analysis tasks
- Build agents that query repositories or external APIs
FAQ from GenAIScript
What is GenAIScript?
GenAIScript is an open-source JavaScript framework for programmatically building prompts, orchestrating LLMs, and integrating tools and data. It is developed by Microsoft and available on GitHub.
Which LLMs are supported?
GenAIScript supports GitHub Copilot, GitHub Models, OpenAI, Azure OpenAI, Anthropic, and local models via Ollama (e.g., Phi-3). It also supports any OpenAI-compatible endpoint.
How do I install GenAIScript?
You can install the Visual Studio Code extension from the marketplace or use the command line via npx genaiscript after installing Node.js.
Can I use GenAIScript with MCP tools?
Yes. GenAIScript has built-in support for Model Context Protocol (MCP) tools, which can be registered and used in scripts.
What file formats can GenAIScript ingest?
GenAIScript can read text from PDF, DOCX, CSV, XLSX, and plain text files. It can also parse images and audio for transcription.
Basic information
More Agent Frameworks MCP clients
🌟 MCPM - Model Context Protocol Manager
pathintegral-instituteCLI MCP package manager & registry for all platforms and all clients. Search & configure MCP servers. Advanced Router & Profile features.
Systemprompt Multimodal MCP Client
ejb503A Multi-modal MCP client for voice powered agentic workflows
MCP Tool Langgraph Integration
paulrobelloMCP Tools Langraph Integration
Hermes MCP
cloudwalkElixir Model Context Protocol (MCP) SDK
Tester Client for Model Context Protocol (MCP)
apifyModel Context Protocol (MCP) Client for Apify's Actors
Comments