CodeBuild a WorkspaceWorkspace Manifest

Workspace Manifest

Every workspace has a workspace.yaml at its directory root. This is the canonical declaration Bahulam reads to construct the agent, bind tools, wire the sandbox, and validate at admission.


Full Schema

apiVersion: agent.framework/v1
kind: SingleAgent
 
metadata:
  name: My_Workspace              # required (community)
  author: your-handle             # required (community)
  version: 0.1.0                  # required (community)
  role: chat | coding | data-bi | iot-hardware | design | devops | custom
  description: >
    One-paragraph human-readable description.
 
# Python modules imported before agent construction so their tool
# classes register against the global registry.
imports:
  - app.agent.tools.web
  - app.tools.powerbi             # only if you're binding bahulam.powerbi.*
 
# Python files under path/ are imported at load; each registers a
# SandboxTool subclass on module execution.
custom_tools:
  path: tools/                    # relative to workspace dir
  runtime: python-3.11
  network:
    egress:                       # allowed outbound hosts
      - api.example.com
  limits:
    cpu: "0.5"                    # ≤ 2.0
    memory_mb: 512                # ≤ 2048
    wall_seconds: 30              # ≤ 300
 
# LLM gateway + model + cache config.
gateway:
  type: OpenRouterV2Gateway       # provider class name
  config:
    model: anthropic/claude-sonnet-4
    max_tokens: 8192
    temperature: 0.0
    cache:
      enabled: true
      cache_system_prompt: true
      cache_tools: true
      cache_messages: true
 
# Agent behavior.
agent:
  max_iterations: 50
  system_prompt: |
    You are ...
 
# Tool bindings — whitelist of registered tool names.
tools:
  - name: bahulam.community.<handle>.<verb>
  - name: web_search
 
# Human-in-the-loop policy per tool.
approvals:
  default: never                  # never | prompt | always
  overrides:
    - tool: bahulam.community.<handle>.destructive_action
      policy: always
 
# Sub-agents this workspace can delegate to (optional).
sub_agents:
  - id: explore
    config: sub_agents/explore.yaml
 
# Connections the workspace needs before tools can call.
connections_required:
  - kind: powerbi.workspace       # broker resolves per-kind OAuth
    scope: read
  - kind: slack.workspace
    scope: write
    optional: true
 
# Context assembly.
context:
  enabled: true
  include_base: true
  include_task: true
  include_error: true
  include_history: true
  max_context_tokens: 200000
 
# Three-tier memory config.
memory:
  type: ThreeTierMemory
  max_messages: 9999

Only metadata, agent.system_prompt, and tools are strictly required. Everything else has sensible defaults.


Section Reference

metadata

FieldRequiredDescription
namecommunity: yesDisplay name.
authorcommunity: yesMust match the community/<author>/ path segment.
versioncommunity: yesSemVer.
rolenoCategory tag used by the CDE panel picker + billing dashboard.
descriptionnoShown in the workspace list.

Verified workspaces (Bahulam-shipped) can omit name/author/version — they have historical patterns. Community workspaces must supply all three; admission validation is strict.

imports

Python module paths (dot-notation). Each is importlib.import_module’d before the framework reads your tools: list. Use this to trigger registration of platform tools your workspace binds.

Common values:

  • app.agent.tools.web — registers web_search, web_fetch.
  • app.tools.powerbi — registers all 45 bahulam.powerbi.* tools.

You do NOT need to import your own custom_tools/*.py here — Bahulam walks that path automatically.

custom_tools

FieldDefaultDescription
pathtools/Directory (relative to workspace) holding your Python.
runtimepython-3.11Informational. MicroVM picks.
network.egress[]Allowed outbound hosts. Empty = no egress.
limits.cpu0.5CPU cores. Max 2.0.
limits.memory_mb512RAM in MB. Max 2048.
limits.wall_seconds30Timeout per tool call. Max 300.

Ceilings enforced by the admission validator. Exceeding any is a fatal error.

gateway

Same shape as verified workspaces. See a reference at configs/workspaces/bahulam-powerbi/workspace.yaml. Cache invariants apply — do not disable cache_messages.

agent

FieldDefaultDescription
max_iterations50Hard cap on tool-call loop iterations.
system_prompt(required)The persona string.

tools

List of {name: "<tool-name>"} entries. Every name must resolve in the registry after imports + custom_tools have fired. Unknown names are a fatal admission error for community workspaces.

approvals

Per PRD-086 §7.7. Read by ApprovalPolicy at runtime. Called on every SandboxTool.execute() before dispatch:

  • never — allow, skip callback.
  • prompt — callback if channel supports HITL; auto-approve otherwise.
  • always — callback if channel supports HITL; deny if unattended (moat integrity for destructive tools).

sub_agents

Optional. Points at additional sub-agent YAMLs Bahulam will construct recursively through the same factory. Each sub-agent can be a specialist (explore, verify) or a domain expert. See a reference at configs/workspaces/kepler-code/{explore,plan,verify}.yaml.

connections_required

FieldDescription
kindConnection kind: powerbi.workspace, slack.workspace, github.repo, etc.
scoperead / write / free-form kind-specific.
optionalIf true, workspace loads even when the connection is missing.

At workspace load Bahulam checks which connections the user has attached and logs missing non-optional ones. Real per-kind OAuth flow (Bahulam-brokered) lives behind the scenes — see Connections & Auth.


Env Variable Interpolation

YAML values support ${VAR} or ${VAR:-default} interpolation:

gateway:
  config:
    model: ${MY_WORKSPACE_MODEL:-anthropic/claude-sonnet-4}

Useful for per-env model overrides without editing YAML. Bahulam expands these when it loads the file.