GenAIScript: Automatable GenAI Scripting with TypeScript/JavaScript
This repository profile is provided by osrepos.com, an open source repository discovery platform.

Summary
GenAIScript is an open-source project from Microsoft that enables programmatic assembly of prompts for Large Language Models (LLMs) using JavaScript and TypeScript. It allows developers to orchestrate LLMs, tools, and data directly in code, streamlining the development of GenAI applications. This framework offers seamless Visual Studio Code integration and a flexible command-line interface for efficient GenAI scripting.
Repository Information
Topics
Click on any tag to explore related repositories
Use at your own risk
OSRepos shares public repositories for knowledge and discovery only. Any installation, execution, configuration, or use of code from these repositories is the user's own responsibility. Always review the repository, source code, dependencies, licenses, and security implications before running or installing anything. OSRepos is not responsible for issues, damages, or losses resulting from third-party repositories.
Introduction
GenAIScript is a powerful open-source project from Microsoft designed to simplify and automate the process of interacting with Large Language Models (LLMs). Its core philosophy, "Prompting is Coding," allows developers to programmatically assemble prompts, orchestrate LLMs, integrate tools, and manage data using familiar JavaScript and TypeScript. This framework aims to make GenAI development more productive and manageable, offering a robust environment for building intelligent applications.
Installation
Getting started with GenAIScript is straightforward. You can quickly set up your development environment by installing the Visual Studio Code Extension or using the command-line interface.
For detailed instructions, refer to the official documentation:
Examples
Hello World Poem
This simple script demonstrates how to send a prompt to an LLM using the $ template tag.
$`Write a 'hello world' poem.`
Including Files and Structured Output
GenAIScript allows you to easily include file content in your prompts and automatically parse LLM output for structured data like JSON.
// read files
const file = await workspace.readText("data.txt")
// include the file content in the prompt in a context-friendly way
def("DATA", file)
// the task
$`Analyze DATA and extract data in JSON in data.json.`
LLM Agents
Define and use agents that combine tools and prompts for complex tasks.
defAgent(
"git",
"Query a repository using Git to accomplish tasks.",
`Your are a helpful LLM agent that can use the git tools to query the current repository.
Answer the question in QUERY.
- The current repository is the same as github repository.`,
{ model, system: ["system.github_info"], tools: ["git"] }
)
Then use it as a tool:
script({ tools: "agent_git" })
$`Do a statistical analysis of the last commits`
RAG Built-in
Leverage Retrieval Augmented Generation (RAG) with built-in vector search capabilities.
const { files } = await retrieval.vectorSearch("cats", "**/*.md")
Why Use GenAIScript
- Programmatic Prompting: Build prompts dynamically using familiar JavaScript and TypeScript, enabling complex logic and data integration.
- Fast Development Loop: Enjoy a streamlined workflow with integrated debugging, running, and testing capabilities within Visual Studio Code or via the command line.
- Extensive Integrations: Supports various LLM providers including GitHub Copilot, OpenAI, Azure OpenAI, Anthropic, and local models via Ollama or LocalAI.
- Rich Data Handling: Easily ingest and manipulate data from PDFs, DOCX, CSV, XLSX, define data schemas for validation, and generate files from LLM outputs.
- Advanced Features: Includes support for LLM tools, agents, RAG, code interpreters, containers, video processing, LLM composition, and Prompty files.
- Safety and Reliability: Features built-in Responsible AI system prompts, Azure Content Safety support, and robust testing/evaluation tools powered by promptfoo.
- Automation: Automate GenAI workflows with a powerful CLI and API, including integration into Pull Request reviews.
Links
Related repositories
Similar repositories that may be relevant next.

Loop Library: Practical Repeatable AI-Agent Workflows
June 21, 2026
The Loop Library is a GitHub repository offering reusable AI agent workflows for various domains like engineering, content, and design. It introduces the concept of "loops," which are structured, repeatable instructions that guide AI agents through multi-step tasks. This skill enables agents to learn from results, adapt, and complete complex tasks more reliably than with one-shot prompts.

agency-agents: Your Complete AI Agency of Specialized Experts
May 30, 2026
agency-agents offers a comprehensive collection of over 140 meticulously crafted AI agent personalities, designed to act as specialized experts across various domains. From frontend development to marketing and sales, each agent comes with a unique voice, proven processes, and deliverable-focused outcomes. This repository provides a ready-to-deploy AI dream team to transform your workflow and accelerate project delivery.

get-shit-done: Streamlining AI-Powered Development with Meta-Prompting and Context Engineering
May 30, 2026
get-shit-done is a robust, lightweight system designed to enhance AI-powered development, particularly with Claude Code. It tackles challenges like context degradation through advanced meta-prompting and context engineering. This tool enables developers to build high-quality software efficiently, transforming ideas into reliable code with structured workflows.

Oh-My-ClaudeCode: Teams-First Multi-Agent Orchestration for Claude Code
May 20, 2026
Oh-My-ClaudeCode is a powerful GitHub repository that provides teams-first multi-agent orchestration for Claude Code, enhancing its capabilities with zero learning curve. It enables developers to build, refactor, and verify code efficiently through intelligent automation and parallel execution. This tool aims to supercharge your Claude Code experience, making complex development tasks simpler and more cost-effective.
Source repository
Open the original repository on GitHub.