BayLeaf AI Playground
An experimental Generative AI Playground for UC Santa Cruz
About the AI Playground
BayLeaf Chat and BayLeaf API form an experimental Generative AI Playground designed to serve the entire UC Santa Cruz campus community (students, faculty, and staff). The system is operated by Adam Smith (faculty from the Department of Computational Media), as a living prototype of a possible future university-managed service.
For concrete recipes (chasing down a half-heard funding lead, rescuing a misconfigured Canvas assignment, drafting a workflow doc from scattered emails), see the use cases page.
Responsible Design
BayLeaf is designed as a form of harm reduction with respect to widely acknowledged problems with commercial AI offerings: runaway energy consumption, extractive data practices, closed ecosystems that concentrate power outside of universities, and tools that prioritize engagement over learning and rigor.
- Energy: Smaller models, smaller footprints. AI's growing energy and resource footprint is a legitimate concern. The flagship models from mainstream providers can have trillions of parameters, and training compute, energy, and cost all scale with parameter count. The agents in BayLeaf Chat are always backed by mid-sized, sub-trillion-parameter models (tens to hundreds of billions of parameters), consuming proportionally less energy and other resources. Our API recommends a model of the same kind by default, while letting developers opt into larger proprietary models when a task warrants it.
- Reciprocity: Built on open-weight models. Large-scale AI is often criticized for concentrating power in a few corporations behind closed APIs. BayLeaf Chat agents are always backed by open-weight models: models that are contributed back to the public web, available for anyone to download, audit, or build on. This is a form of structural reciprocity with the open ecosystem that makes this technology possible. The API holds to the same value by offering an open-weight model as its default recommendation, while giving developers the option to call proprietary models for specific needs.
- Privacy: Providers never retain your data, and our API never stores it. Many commercial AI services retain copies of user conversations, sometimes for 30 days or longer, creating exposure that users cannot control. BayLeaf leverages zero-data-retention (ZDR) inference services so that no LLM provider stores a copy of your data; they keep only request metadata. We apply that standard to ourselves: the BayLeaf API retains no copy of your prompts or completions and has no standing operator access to your request content as it passes through, an approach inspired by zero-operator-access designs. Chat is different by necessity: so you can carry conversations between devices, the chat interface keeps one copy of your messages in an encrypted database accessible only by the system administrator.
- Pedagogy: Support and resistance, not just answers. Commercial AI assistants are optimized to be maximally helpful, which in practice means maximally doing-it-for-you: students mistake speed for understanding, and the skills education is supposed to build quietly atrophy. BayLeaf's models use system prompts and agent skills written by educators for their students and peers, designed to scaffold learning rather than shortcut it. Faculty control means the tool can be co-designed with students, not imposed by a product team.
- Inquiry: Grounded in sources of truth. General-purpose chatbots reward fluent output over rigorous inquiry: they generate plausible answers without grounding them in the user's actual data, documents, or methods, producing false confidence where skepticism is needed. BayLeaf connects models to grounded tools (web search, Google Workspace, code execution) so that AI-assisted inquiry can be anchored in evidence the user can verify. The system itself is counterfoil research: a working experiment in AI infrastructure that doesn't teach dependence on commercial platforms.
BayLeaf relies on a small set of subprocessors (OpenRouter, DigitalOcean, Cloudflare, Daytona, Tavily, CILogon): see the privacy notice for the full list, what each one does, and the retention policies that govern your data.
Chat Service
Our Chat service provides three models to all users:
- Basic is a general-purpose assistant (which underlying model varies as better ones become available). Its system prompt is written for the campus community, orienting the model as a concise assistant with self-knowledge of BayLeaf and the Chat interface.
- Deep Research pairs the same model with web search and web page retrieval toolkits, enabling interactive research sessions. It states its intent before each web lookup and summarizes what it finds, so users can follow the research path for themselves.
- Help is a help desk for BayLeaf itself. It can answer questions about the service, list a user's groups and available models, inspect model configurations, and grant access to specialized groups. Users who receive invite codes from instructors or program coordinators redeem them here.
Beyond the public models, specialized models and toolkits are available to members of specific access groups (e.g. course sections, departments, or programs).
The Code Sandbox toolkit gives models access to a persistent, sandboxed Linux environment, making it possible to run command-line tools directly from the browser. This enables tasks like file processing, scripting, and interacting with external services through CLI tools without leaving the chat interface.
Most chat models are subject to a rate limit mechanism that ensures fair and cost-efficient access for all.
Tip: Chat message replies from models are limited in length based on the number of turns in the conversation so far. Users should prefer many short conversations on distinct topics rather than one long one that meanders through unrelated topics.
API Service
Our API service provides key-less access to users connecting from the campus network (e.g. 169.233.x.x), and it allows authenticated users to grant themselves an API key for off-campus access.
This API injects a short system prompt prefix to all proxied requests to lightly customize downstream agents for use with the Playground.
To allow for experimentation, API requests are not closely rate limited, but individual keys are subject to a reasonable total daily spending limit.
The API recommends an open-weight model as the default for new users; the dashboard's sample request is pre-filled with it. Developers may freely call any model in the catalog, including larger proprietary ones, when a task calls for it. For the full list of models and per-token prices, visit OpenRouter's model directory.
Code Sandbox
The API also provides sandboxed Linux environments (backed by
Daytona) for code execution and file
management. Keyed users get a persistent sandbox that retains files
across sessions, while campus-pass users get ephemeral sandboxes
that are created and destroyed per request. The same sk-bayleaf- API key
authenticates both LLM inference and sandbox access.
Web Search & Fetch
The API provides web search and page content extraction
as first-class endpoints, both backed by Tavily.
Agents can search the web for information and fetch clean, extracted content from one
or many URLs in a single call, all authenticated with the same sk-bayleaf-
API key used for LLM inference and sandbox access.
Tool Integrations
The API dashboard distributes setup instructions and credentials for CLI tools that extend what coding agents can do on behalf of authenticated users:
- Google Workspace CLI (gws): Access Drive, Gmail, Calendar, Sheets, and Docs. BayLeaf distributes the OAuth client configuration so users don't need their own GCP project.
- Canvas LMS CLI (canvaslms): Manage courses, assignments, grades, and announcements. Users authenticate with their own Canvas access token.
Adoption
BayLeaf is in active use across UCSC courses. A representative sample:
- CMPM 120-01: Game Development Experience. Spring 2026 (~30 students). Brace3, a generalized course agent customizable by instructors directly on Canvas.
- CMPM 120-02: Game Development Experience. Spring 2026 (~75 students). Using the BayLeaf API in OpenCode terminal coding agent harness.
- CSE 185E: Technical Writing for CS&E. Spring 2026 (~120 students). Pre-draft brainstorming and drafting feedback.
- CMPM 171: Game Design Studio. Winter 2026 (~160 students). Gambit, an agent for rapid game prototyping.
- CSE 185E: Technical Writing for CS&E. Winter 2026 (~50 students). Drafting feedback alongside other LLMs.
- CMPM 121: Game Development Patterns. Fall 2025 (~120 students). Brace2, the first course-specific agent built on BayLeaf.
- CMPM 121: Game Development Patterns. Fall 2024 (~170 students). The original Brace assistant, a precursor to BayLeaf.
Course-specific agents (Brace, Brace2, Brace3, Gambit) are built atop BayLeaf Chat with custom system prompts and toolkits. Other courses use BayLeaf's general-purpose Basic model directly.
For more granular examples of what individual users (faculty, students, and staff) actually do with BayLeaf, see the use cases page.
Ad-hoc faculty use
Beyond enrolled courses, faculty across campus use BayLeaf for one-off course-management tasks: running scripts in the Chat Code Sandbox or driving agentic CLI tools through the BayLeaf API to manipulate Canvas. Reported uses include:
- Auditing multiple-choice quiz options to ensure each wrong answer has useful feedback.
- Building custom interfaces for processing free-form feedback surveys.
- Generating student project group rosters from enrollment and preference data.
In the News
- UCSC's Newly Established AI Council Is at a Crossroads (City on a Hill Press, March 2026.) Student journalism covering UCSC's AI Council and the campus debate over vendor deals vs. faculty-built tools. BayLeaf is cited as an example of the latter approach.
- Secure AI Tools Now Available to Staff (UCSC News, February 2026.) Official campus announcement of Google Gemini Chat and NotebookLM for staff, developed in consultation with the AI Council. BayLeaf predates and complements this rollout.
Related Projects
- Lathe: The open-source toolkit powering the Code Sandbox feature above. Reusable by any Open WebUI deployment. Includes support for tools like canvaslms (a Python/CLI Canvas LMS client) for agentic course management from the browser.
- GWS Toolkit: Deep integration with Google Workspace (Drive, Gmail, Calendar, Sheets, Docs) packaged as a reusable Open WebUI toolkit. Per-chat, per-service user consent. Built for BayLeaf Chat; drop-in for any Open WebUI deployment with Google Workspace.
Beyond UCSC
BayLeaf is open source, built in a municipalist spirit: it serves one campus, not the entire higher education sector. The architecture is not UCSC-specific, but it is intentionally local: designed to be copied and remixed to fit the needs of other campuses, not scaled into a platform that governs them. This is the prefigurative counterpower move: build small, autonomous systems that embody the values you want to see, rather than waiting for centralised infrastructure to be reformed from within.
A 2026 Inside Higher Ed survey of campus CTOs found that half question whether their AI investments are paying off, while 41% cite "falling behind peer institutions" as a top worry through 2030. That combination, doubt about value paired with fear of missing out, is the imitation trap BayLeaf is built to refuse. A campus-owned service can be small, problem-led, and accountable to its own community rather than benchmarked against whatever neighboring institutions just bought.
If you're evaluating AI tools for your campus, read the case for universities owning their own AI infrastructure, or explore the source.
GenAI Disclosure
Nearly 100% of the code, documentation, and other project data in the BayLeaf repository was created using generative AI in agentic coding tools. This is an intentional choice: it demonstrates that sufficient capacity exists within the university to build and operate a service like this, without ceding control or responsibility to external parties. If you are a critic, ally, or other human who wants a direct human connection, please contact Adam Smith directly.