whatisgithub

What is meta-model-cookbook?

meta-models/meta-model-cookbook — explained in plain English

Analysis updated 2026-05-18

55PythonAudience · developerComplexity · 3/5Setup · easy

In one sentence

A cookbook of copy-paste Python and notebook examples for building AI agents on the Meta Model API, from basic API calls to full multi-agent applications.

Mindmap

mindmap
  root((meta-model-cookbook))
    What it does
      API examples
      Agent pattern recipes
      End-to-end use cases
    Tech stack
      Python
      OpenAI SDK
      Meta Model API
    Use cases
      Chat completions
      Multi-agent orchestration
      Computer use agents
    Audience
      Developers
      AI engineers

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Point an existing OpenAI SDK client at the Meta Model API to try the Muse Spark model with minimal code changes.

USE CASE 2

Learn tool calling, structured output, and prompt caching through self-contained notebook examples.

USE CASE 3

Build an agent loop that plans, calls tools, and manages context across a long-running task.

USE CASE 4

Follow the multi-agent product studio recipe to orchestrate several specialized agents on a shared task board.

What is it built with?

PythonOpenAI SDKJupyterMuse Spark

How does it compare?

meta-models/meta-model-cookbookbhartiyashesh/purelymailcalendarbiao994/docpaws
Stars555555
LanguagePythonPythonPython
Setup difficultyeasymoderatemoderate
Complexity3/54/53/5
Audiencedevelopergeneraldeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · easy Time to first run · 5min

Requires a Meta Model API account and key stored as an environment variable, the preview model is currently free.

So what is it?

This repository is a cookbook of example code for developers building agents and coding tools on top of the Meta Model API, which serves an AI model called Muse Spark. The examples come as Colab notebooks and standalone Python files, and each one is meant to be copied and run as a starting point rather than a full application. The main selling point is compatibility: the Meta Model API is designed as a drop-in replacement for the OpenAI SDK and the Anthropic SDK, and it also works with agent command-line tools like OpenCode and Claude Code. In practice this means you can point an existing OpenAI-style client at a new base URL, supply an API key, and keep the rest of your code unchanged. The default model, Muse Spark, has a context window of just over one million tokens, and a preview version is currently free to use. The recipes are organized into three sections. The first, API fundamentals, covers the basic building blocks: chat completions, streaming responses, tool and function calling, structured JSON output, prompt caching, reasoning tokens, vision input, long context handling, error handling with retries, and grounding responses in live web search. The second section, agent patterns, shows how to wire a model into an actual agent loop, including interleaved reasoning and tool use, managing context across a long-running task, validated code edits, and a copilot for triaging noisy alerts. The third section, use cases, walks through complete applications: reading data out of charts, fixing bugs from a screenshot, a hands-free assistant for smart glasses, generating slide decks, building and verifying websites and browser games with a coding agent, running model-generated code in a sandbox, orchestrating a team of four specialized agents on a shared task board, and driving a real desktop or Mac purely from screenshots. To get started, a reader needs a Meta Model API account and key, which they store as an environment variable before running any of the notebooks or scripts. License details are included in the repository's LICENSE file.

Copy-paste prompts

Prompt 1
Help me adapt the quickstart chat completions recipe from meta-model-cookbook to my own OpenAI SDK project.
Prompt 2
Walk me through the basic agent loop recipe and explain the perceive-decide-act pattern it uses.
Prompt 3
Explain how the multi-agent product studio recipe coordinates four different agent roles on a Kanban board.
Prompt 4
Show me how prompt caching works in this cookbook and how to track cached token usage.

Frequently asked questions

What is meta-model-cookbook?

A cookbook of copy-paste Python and notebook examples for building AI agents on the Meta Model API, from basic API calls to full multi-agent applications.

What language is meta-model-cookbook written in?

Mainly Python. The stack also includes Python, OpenAI SDK, Jupyter.

How hard is meta-model-cookbook to set up?

Setup difficulty is rated easy, with roughly 5min to a first successful run.

Who is meta-model-cookbook for?

Mainly developer.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.