Beam 1.0 is a chat-template and system specification for an AI assistant named Beam, encoded as a Jinja template that defines identity, runtime knobs, tool conventions, and a wire format for tool calls. It prescribes configurable kwargs (model_identity, reasoning_effort, builtin_tools, allow_missing_thinking), maps human-readable reasoning labels to numeric effort budgets (minimal=8 ... max=512), and enforces rules for builtin tools (only specific search/browse definitions allowed, a special-case bash). It defines how OpenAI roles map into blocks, how consecutive system/developer messages join, and a compact tool wire protocol (XML-like calls with analysis/results semantics and function.arguments as dicts).
The template's substantive logic is a suite of macros to convert JSON Schema into TypeScript types and to render tool declarations and call bodies. Key macros include json_schema_to_typescript, render_nullable_type, render_default, and render_tool_declaration; they handle enums, oneOf variants, objects (with ordered properties, required flags, descriptions, examples, defaults), arrays, and primitive type mapping (integer→number). Tool declarations output either a simple string header for pure-string parameters or a TypeScript function type for structured parameters; render_json_value and render_parameter_value control JSON encoding. Overall, the template automates generation of typed tool interfaces and prompt wiring for reliable tool calls and developer-facing documentation.
Summary generated by AI from the linked article. hn.today is not affiliated with Hacker News or Y Combinator.