GenAIScript: Automatable GenAI Scripting with TypeScript/JavaScript

This repository profile is provided by osrepos.com, an open source repository discovery platform.

GenAIScript: Automatable GenAI Scripting with TypeScript/JavaScript

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

Analyzed by OSRepos on March 25, 2026

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.

Coven: Local-First Runtime for AI Coding Agent Sessions

Coven: Local-First Runtime for AI Coding Agent Sessions

September 18, 2026

Coven is a powerful local-first runtime designed for managing project-scoped AI coding agent sessions. It provides durable state, robust authority boundaries, and seamless interoperability with multiple coding harnesses like Codex, Claude Code, and GitHub Copilot CLI. This tool enables developers to safely launch, observe, and coordinate AI agent work directly within their local project environments.

RustAI AgentsDeveloper Tools
oh-my-hermes: Enhance Hermes Agent with Advanced AI Workflow and Memory

oh-my-hermes: Enhance Hermes Agent with Advanced AI Workflow and Memory

September 17, 2026

oh-my-hermes is an all-in-one plugin designed to significantly enhance the Hermes Agent. It provides advanced coding intelligence, a robust long-term memory system, and optimized workflow packages, transforming standard Hermes requests into structured, actionable tasks with clear operational layers.

AI AgentHermes AgentAI Tools
Awesome Harness Engineering: Building Reliable AI Agent Systems

Awesome Harness Engineering: Building Reliable AI Agent Systems

September 7, 2026

Awesome Harness Engineering is a comprehensive curated list dedicated to the discipline of designing robust AI agent harnesses. It offers a wealth of resources, patterns, and templates essential for building reliable AI agent systems. Developers can explore tools, best practices, and foundational concepts across various critical areas of agent development.

agent-harnessai-agentsawesome-list
Magic Context: Unbounded, Self-Managing Memory for AI Coding Agents

Magic Context: Unbounded, Self-Managing Memory for AI Coding Agents

September 2, 2026

Magic Context is a powerful GitHub repository that provides unbounded, self-managing memory for AI coding agents. Acting as the 'hippocampus' for agents, it ensures continuous learning and recall across sessions without disruptive context compaction. This tool, part of CortexKit, allows agents to build lasting project knowledge and maintain context efficiently.

AI AgentsAgent MemoryContext Management

Source repository

Open the original repository on GitHub.

22 counted GitHub visits

View on GitHub
OS
OSRepos

Analysis and discovery of open source repositories. Find interesting projects and follow their updates.

Monitor your website with YourWebsiteScore

OSRepos shares public repositories for knowledge and discovery only. Any installation, execution, configuration, or use of third-party repository code is at your own risk. Always review source code, dependencies, licenses, and security implications before running anything.

© 2025 OSRepos. Built with Nuxt 3 and lots of ❤️