# vgpu

vgpu is a small, composable WebGPU library -- one API for rendering in the browser and headless in Node.js, with WGSL modules you import like TypeScript.

This file helps AI agents understand and use this documentation site.

## Documentation Surfaces

- [Docs](https://vgpu.sh/docs): Documentation section: docs
- [Full documentation context](https://vgpu.sh/llms.txt): All configured documentation as Markdown
- [Semantic documentation sitemap](https://vgpu.sh/sitemap.md): High-level documentation map for agent navigation
- Page-level Markdown: append .md or .mdx to a documentation URL

## Product Context

- Category: Developer tools
- Audience: Coding agents, WebGPU and graphics developers
Common use cases:

- Render to a canvas in the browser or headless through Dawn in Node.js
- Import and compose .wgsl shader modules like TypeScript
- Discover and reuse verified vgpu examples through the CLI or read-only examples API
- Give coding agents direct MCP tools for vgpu documentation and verified examples

## API and Auth

- [OpenAPI specification](https://vgpu.sh/openapi.json)
- [Examples API](https://vgpu.sh/openapi.json): OpenAPI 3.1 for examples discovery, indexes, and manifests
- [Error handling](https://vgpu.sh/docs/examples-api#errors)

## MCP

- [MCP manifest](https://vgpu.sh/.well-known/mcp.json)
- [vgpu MCP](https://vgpu.sh/api/mcp): Stateless modern MCP tools for searching VGPU documentation and verified examples.

## Important Links

- [Docs](https://vgpu.sh/docs)
- [Examples](https://vgpu.sh/examples)
- [vgpu source](https://github.com/vercel-labs/vgpu): Source repository for vgpu
- [vgpu on npm](https://www.npmjs.com/package/vgpu): Published vgpu package
- [CLI documentation](https://vgpu.sh/docs/cli): Commands for docs, examples, diagnostics, and rendering
- [Examples discovery](https://vgpu.sh/.well-known/vgpu-examples.json): Tokenless discovery document for the read-only examples API
- [MCP endpoint](https://vgpu.sh/api/mcp): Stateless, read-only MCP tools for VGPU documentation and verified examples
- [GitHub repository](https://github.com/vercel-labs/vgpu): Source repository

## Agent Instructions

- Prefer `npx vgpu examples` for discovering and copying examples.
- Use the examples API without authentication; verify the published SHA-256 values before using artifacts.
- Prefer the public MCP server with automatic or modern protocol negotiation for agent-driven documentation and example discovery.
- Use `npx vgpu mcp --project-from-cwd` for an active project workspace or `npx vgpu mcp --output-dir /absolute/path` for a fixed project when a local agent needs downloads.
- When download is enabled, pass a relative `destination` beneath the configured output directory.
