CodeBuild a WorkspaceOverview

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:

  1. A prompt — the system prompt that shapes the agent’s persona.
  2. A tool binding list — which tools the agent can call.
  3. A sandbox declaration — resource limits, network egress, connections.
  4. 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

TierWho authorsWhere in the repoSupport
VerifiedBahulamconfigs/workspaces/<id>/Full — we operate the tools
CommunityAny contributorconfigs/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:

StrategyWhere it runsExampleYou author?
CentralIn-process on Bahulam FastAPIweb_search, web_fetchNo — Bahulam ships
SandboxPer-workspace MicroVMYour custom_tools/*.pyYes
Django MCPDjango + context-forgebahulam.powerbi.add_measureNo — 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:

  1. 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.
  2. Community-owned tool names (bahulam.community.<handle>.*) are registered by importing your custom_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 guide

workspace.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_search

tools/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