---
title: Examples
description: Example packages to build and use.
---

[subako-function-examples](https://github.com/subako-ai/subako-function-examples) holds complete packages, each a standalone project that builds the bundle Subako takes. They are a good place to start a package of your own, and most are useful granted as they are. The [quickstart](/functions/quickstart) builds and grants anydoc.

## Rust

Written with [subako-function-sdk](/functions/rust), each starting from the Rust template.

| Example | Tools | What it does |
| --- | --- | --- |
| [anydoc](https://github.com/subako-ai/subako-function-examples/tree/main/rust/anydoc) | `convert_to_markdown` | Converts Word, PowerPoint, Excel, OpenDocument, RTF, EPUB, CSV, and text-based PDF files on the volume to Markdown. |
| [python](https://github.com/subako-ai/subako-function-examples/tree/main/rust/python) | `run_python` | Runs Python code or scripts with CPython compiled to WebAssembly, with HTTPS through `urllib.request` and charts with pygal. |
| [bashkit](https://github.com/subako-ai/subako-function-examples/tree/main/rust/bashkit) | `run_bash` | Runs bash scripts with pipes, about 145 built-in commands, the volume's files, and a limited `curl`. |
| [typst](https://github.com/subako-ai/subako-function-examples/tree/main/rust/typst) | `render_pdf` | Typesets Typst or Markdown into PDF, from a template shipped in the package's assets. |
| [quickjs](https://github.com/subako-ai/subako-function-examples/tree/main/rust/quickjs) | `run_javascript` | Runs JavaScript in QuickJS, with `fetch` and the volume's files. |
| [pptx](https://github.com/subako-ai/subako-function-examples/tree/main/rust/pptx) | `create_pptx` | Builds PowerPoint decks from JavaScript with PptxGenJS. |
| [html](https://github.com/subako-ai/subako-function-examples/tree/main/rust/html) | `render_html` | Draws HTML to PNG, so an agent can check the layout of HTML it wrote, and names elements that overflow the viewport. |
| [github](https://github.com/subako-ai/subako-function-examples/tree/main/rust/github) | `github_api`, `read_file`, … | Reads GitHub: any read-only REST path, files and directories, and whole repositories downloaded to the volume, with an optional token from a vault. |

```bash
cd rust/anydoc
cargo test
./package.sh                      # dist/<name>.tar.gz
```

## Go

Written with [subako-function-sdk-go](/functions/go), starting from the Go template.

| Example | Tools | What it does |
| --- | --- | --- |
| [xlsx](https://github.com/subako-ai/subako-function-examples/tree/main/go/xlsx) | `create_xlsx`, `read_xlsx` | Writes Excel workbooks on the volume — formulas, a frozen header row, column widths, number formats — and reads them back with formulas calculated. |

```bash
cd go/xlsx
go test ./...
bash package.sh                   # dist/xlsx.tar.gz
```

## In the SDK repositories

Each SDK's own repository has a GitHub example — a repository's stars and issues, and its owner's avatar saved to the volume and shown to the model:

- [Go](https://github.com/subako-ai/subako-function-sdk-go/tree/main/examples/github)
- [TypeScript](https://github.com/subako-ai/subako-function-sdk-typescript/tree/main/examples/github), and the [same tools on the official MCP SDK](https://github.com/subako-ai/subako-function-sdk-typescript/tree/main/examples/github-mcp)

## Granting an example

Most examples need nothing but **Allow** and, for files the agent should keep, **Give functions Data (/volume/data)**. Those that reach the network — python, bashkit, quickjs, github — need the grant's [network](/functions/granting#network) to allow the hosts they call, and github takes its token from a vault through [credentials](/functions/granting#credentials) for `https://api.github.com`. Each example's README says what it needs.
