MCP.so
Sign In

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.

Comments

More Agent Frameworks MCP clients