Build a Workspace
Workspaces are the unit of specialization in Bahulam. A workspace binds a set of tools, a system prompt, a model, and a sandbox to a specific problem domain: coding, chat, Power BI, IoT, DevOps, or anything a community author wants to build.
This guide is for developers building workspaces — not end users of the Bahulam CLI. If you’re an end user, start at Getting Started.
What Is a Workspace?
A workspace is four things bundled together:
- A prompt — the system prompt that shapes the agent’s persona.
- A tool binding list — which tools the agent can call.
- A sandbox declaration — resource limits, network egress, connections.
- A UI layout config (optional) — how the CDE renders the workspace.
The prompt is open. The tool binding list is open. The sandbox that runs your tool code and the connections your tools use live inside Bahulam. That last part is the moat: your workspace runs in Bahulam because Bahulam holds the sandbox + the connection, not because your code is secret.
Two Tiers
| Tier | Who authors | Where in the repo | Support |
|---|---|---|---|
| Verified | Bahulam | configs/workspaces/<id>/ | Full — we operate the tools |
| Community | Any contributor | configs/workspaces/community/<handle>/<name>/ | Best-effort; validated at admission, sandboxed at runtime |
Verified examples: kepler-code, bahulam-chat, bahulam-powerbi.
Community example ships in the codebase:
configs/workspaces/community/example/hello-world/ — copy-paste starting
point.
Tool Categories
Every tool a workspace binds falls into one of three execution strategies. Your workspace can mix and match:
| Strategy | Where it runs | Example | You author? |
|---|---|---|---|
| Central | In-process on Bahulam FastAPI | web_search, web_fetch | No — Bahulam ships |
| Sandbox | Per-workspace MicroVM | Your custom_tools/*.py | Yes |
| Django MCP | Django + context-forge | bahulam.powerbi.add_measure | No — Bahulam ships |
You write Sandbox tools. You bind Central and Django MCP tools by
name in your workspace.yaml.
The Tool-Binding Moat
Every tool has a name. When your workspace binds a tool, Bahulam looks it up in a registry. Two things this enforces:
- Bahulam-owned tool names (
bahulam.powerbi.*,bahulam.tunnel.*, etc.) only exist inside Bahulam’s runtime. Fork your workspace to another host and those bindings fail to resolve — the tool doesn’t exist there. - Community-owned tool names (
bahulam.community.<handle>.*) are registered by importing yourcustom_tools/*.py. They exist wherever your code runs — but the connection broker (OAuth to Power BI, Slack, IoT tunnels) still gates their actual utility. Bahulam holds the connection.
Community namespace rule: all tools your workspace ships must use
bahulam.community.<your-handle>.<verb>. The admission validator rejects
any bahulam.<verified-category>.* shadowing.
30-Second Anatomy
The reference workspace:
configs/workspaces/community/example/hello-world/
├── workspace.yaml # binds tools, prompt, sandbox limits
├── tools/
│ ├── __init__.py
│ └── hello_tool.py # one SandboxTool subclass
└── README.md # contributor guideworkspace.yaml (excerpt):
apiVersion: agent.framework/v1
kind: SingleAgent
metadata:
name: Hello_World_Community
author: example
version: 0.1.0
imports:
- app.agent.tools.web # registers web_search + web_fetch
custom_tools:
path: tools/
network:
egress: [] # no outbound HTTP
limits:
cpu: "0.5"
memory_mb: 256
wall_seconds: 15
tools:
- name: bahulam.community.example.hello_greet
- name: web_searchtools/hello_tool.py:
from app.agent.tools.base import SandboxTool
class HelloGreetTool(SandboxTool):
name = "bahulam.community.example.hello_greet"
description = "Greet a person by name."
workspace_id = "community/example/hello-world"
custom_tool_path = "tools/hello_tool.py"
parameters = {
"type": "object",
"properties": {"person": {"type": "string"}},
"required": ["person"],
}
def _inside_sandbox(self, person: str) -> dict:
return {"greeting": f"Hello, {person}!"}
HelloGreetTool.register()That’s a working workspace. Everything else in this guide is elaborations on those two files.
Where to Next
- Workspace Manifest — the full YAML schema.
- Custom Tools — how
SandboxToolsubclasses work. - Sandbox Runtime — resource limits, network egress, what happens at dispatch.
- Connections & Auth —
connections_requiredand the OAuth broker. - Local Testing — smoke your workspace before shipping.
- Publishing — pushing to the community hub.