
Reflection Beam: Get Agent-Ready Before the Weights Drop
Summary
Build an effort-routing tool-loop client for Beam's OpenAI-compatible API and size the self-host bill.
Reflection AI released Beam on October 5: a 501B-parameter sparse mixture-of-experts model with 23B active parameters per token, aimed at coding and agentic work. It is the first big American open-weight model in a while, and the announcement says the weights ship under Apache 2.0 later this month. Developer chatter has been loud, mostly around one question: is this the US answer to GLM and Kimi?
Here is the catch that most summaries skip. As of the announcement, Beam is available only through a waitlisted beta API, and the weights are not downloadable yet. So the useful thing to do today is not to benchmark it. It is to get your agent code ready, so that when access or weights arrive you change one environment variable and go.
This guide builds that: an OpenAI-compatible client that picks a reasoning effort per task, runs a tool loop with a token budget, and a sizing calculator for self-hosting. You will test all of it against a local mock server, so nothing here needs a Beam key. Every number about Beam comes from Reflection's launch post or the developer documentation as reported at launch; I flag anything that was not confirmed.
What we know about Beam (and what we do not)
| Item | Reported detail | Status |
|---|---|---|
| Architecture | Sparse MoE, 501B total, 23B active, 52 layers, interleaved local/global attention | Confirmed (launch post) |
| Context | 256K in the beta API (131,072 max output inside that); 1M after midtraining | API limit per docs; 1M is a training claim |
| Modality | Text only | Confirmed |
| Reasoning | Always on. Effort levels: low, medium (default), high, xhigh, max. No none | Per developer docs |
| API | OpenAI-compatible chat completions; function calling, parallel tool calls, JSON schema output | Waitlist beta |
| Not supported | Responses API, embeddings, images, audio, files, batch, assistants | Per developer docs |
| License | Apache 2.0, weights promised for October 2026 | Not yet released |
| Pricing | Not disclosed | Unknown |
On quality, treat the vendor numbers as vendor numbers. Reflection reports SWE-bench Verified 80.9 and Terminal Bench v2.1 80.1, and claims 3 to 4 times less inference compute than GLM-5.2 on reasoning tasks. Independent commentary in the first 24 hours places Beam roughly at GLM-5.2 level, behind several newer Chinese models. The honest read: its selling points are efficiency and being an American Apache-licensed option, not topping every leaderboard.
Prerequisites
- Python 3.10+ and the official
openaipackage (tested here with 3.25.0) - Flask for the mock server (
pip install flask openai) - Optionally, a Beam beta key from the waitlist at platform.reflection.ai. Without it the mock server stands in
Step 1: Point the OpenAI SDK at Beam
Because the API is OpenAI-compatible, you reuse the standard SDK and change only base_url and the model id. The docs list the base URL as https://api.reflection.ai/openai/v1 and the model id as Beam-501B-A23B. Putting both in environment variables is the whole portability trick: the same file talks to Beam, to a vLLM server hosting the weights later, or to a mock.
import os
from openai import OpenAI
BASE_URL = os.environ.get("BEAM_BASE_URL", "https://api.reflection.ai/openai/v1")
MODEL = os.environ.get("BEAM_MODEL", "Beam-501B-A23B")
client = OpenAI(base_url=BASE_URL, api_key=os.environ.get("BEAM_API_KEY", "sk-placeholder"))
Only chat completions is documented. If your existing code uses the Responses API, you will need to port it back to chat.completions for Beam.
Step 2: Route reasoning effort per task
Beam always reasons, so effort is your cost dial. A typo fix at max burns tokens for nothing; a race-condition hunt at low gives shallow answers. The router below is deliberately simple keyword logic. Replace it with a small classifier once you have real traffic.
EFFORTS = ("low", "medium", "high", "xhigh", "max") # no "none": Beam always reasons
def pick_effort(task: str) -> str:
t = task.lower()
if any(k in t for k in ("typo", "rename", "format", "summarize")): return "low"
if any(k in t for k in ("refactor", "write test", "explain")): return "medium"
if any(k in t for k in ("race condition", "migration", "debug")): return "high"
return "medium"
The SDK accepts reasoning_effort as a keyword on chat.completions.create. I confirmed that the parameter reaches the server body in the test below. Whether Beam names the field exactly this way is from the docs summary I could access, so check it against the live docs once you have a key.
Step 3: A tool loop with a token budget
Agentic models fail expensively: a loop that keeps calling tools can eat your budget in minutes. This loop caps turns and total tokens, and appends each assistant message back into history before the tool results, which is required for the next request to be valid.
"""Beam-ready client: effort routing, tool loop, budget guard.
Works against Reflection's OpenAI-compatible endpoint (or any compatible server)."""
import json, os
from openai import OpenAI
BASE_URL = os.environ.get("BEAM_BASE_URL", "https://api.reflection.ai/openai/v1")
MODEL = os.environ.get("BEAM_MODEL", "Beam-501B-A23B")
client = OpenAI(base_url=BASE_URL, api_key=os.environ.get("BEAM_API_KEY", "sk-placeholder"))
TOOLS = [{
"type": "function",
"function": {
"name": "run_tests",
"description": "Run the project's test suite and return the output.",
"parameters": {"type": "object",
"properties": {"path": {"type": "string"}},
"required": ["path"]},
},
}]
def run_tests(path: str) -> str:
return f"3 passed, 1 failed in {path}: test_cache_expiry AssertionError"
def agent(task: str, max_turns: int = 6, token_budget: int = 20_000):
effort = pick_effort(task)
messages = [{"role": "user", "content": task}]
spent = 0
for turn in range(max_turns):
resp = client.chat.completions.create(
model=MODEL, messages=messages, tools=TOOLS,
reasoning_effort=effort, max_completion_tokens=4096,
)
spent += resp.usage.total_tokens
msg = resp.choices[0].message
messages.append(msg.model_dump(exclude_none=True))
if not msg.tool_calls:
return msg.content, spent, effort
if spent > token_budget:
return "[budget exceeded]", spent, effort
for call in msg.tool_calls:
args = json.loads(call.function.arguments)
out = run_tests(**args)
messages.append({"role": "tool", "tool_call_id": call.id, "content": out})
return "[max turns]", spent, effort
Two details matter. First, msg.model_dump(exclude_none=True) keeps the tool_calls field intact so the following tool messages match their call ids. Second, the budget check happens before executing tools, so a runaway turn does not trigger more side effects.
Step 4: Test it with a mock Beam server
This Flask server speaks just enough of the chat completions format: it returns a tool call on the first request and a final answer once a tool result is present. It also prints the effort it received, which proves your routing works.
import json, time
from flask import Flask, request, jsonify
app = Flask(__name__)
@app.post("/v1/chat/completions")
def chat():
b = request.get_json()
print("effort:", b.get("reasoning_effort"), "tools:", bool(b.get("tools")))
has_tool = any(m.get("role") == "tool" for m in b["messages"])
if not has_tool:
msg = {"role": "assistant", "content": None, "tool_calls": [{
"id": "call_1", "type": "function",
"function": {"name": "run_tests", "arguments": json.dumps({"path": "./tests"})}}]}
fin = "tool_calls"
else:
msg = {"role": "assistant", "content": "test_cache_expiry fails: TTL compared in ms vs s."}
fin = "stop"
return jsonify({"id": "x", "object": "chat.completion", "created": int(time.time()),
"model": b["model"], "choices": [{"index": 0, "message": msg, "finish_reason": fin}],
"usage": {"prompt_tokens": 100, "completion_tokens": 50, "total_tokens": 150}})
app.run(port=8765)
python mock_server.py &
BEAM_BASE_URL=http://localhost:8765/v1 python beam_client.py
Real output from my run:
('test_cache_expiry fails: TTL compared in ms vs s.', 300, 'high')
effort: high tools: True
effort: high tools: True
The task text contained "debug", so effort routed to high; the server logged two requests (tool call, then final answer); total tokens were 300 (two mock responses at 150 each). The answer text is canned by the mock, of course. What you verified is the plumbing.
Step 5: Size the self-hosting bill before weights land
Apache 2.0 weights are only useful if you can fit them. For an MoE model all 501B parameters must live in memory even though only 23B are active per token, so memory scales with the total and speed scales with the active count. Weights-only math:
def vram_gb(params_b=501, bits=16, overhead=1.0):
return round(params_b * bits / 8 * overhead, 1)
for b in (16, 8, 4):
print(b, "bit:", vram_gb(bits=b), "GB")
# 16 bit: 1002.0 GB
# 8 bit: 501.0 GB
# 4 bit: 250.5 GB
| Precision | Weights only | Realistic fit |
|---|---|---|
| BF16 | ~1,002 GB | Two 8-GPU 141GB nodes or more, plus KV cache room |
| 8-bit | ~501 GB | One 8x H200-class node is tight once KV cache is added |
| 4-bit | ~250 GB | Fits a single large node with room for long contexts |
These are weights only. KV cache for long contexts, activations and the serving framework add more, so use a multiplier of 1.2 to 1.4 for planning. No GGUF or MLX builds existed at launch, and I could not confirm which serving frameworks will support Beam on day one, so do not assume vLLM works until the model card says so.
A worked example: deciding API vs self-host
Say your coding agent makes 200 runs a day, each averaging 40K tokens across turns. That is 8M tokens a day. Since Beam's API price is undisclosed, you cannot compute the break-even yet, but you can set up the comparison now: log tokens per run with the spent counter above, and bucket by effort level. When pricing appears, multiply the buckets. In my experience with models of this class, a handful of high-effort runs dominate the bill, which is exactly why the router matters.
from collections import Counter
usage = Counter()
for task in tasks:
answer, spent, effort = agent(task)
usage[effort] += spent
print(usage) # e.g. Counter({'high': 410000, 'low': 22000, 'medium': 96000})
Common pitfalls
- Sending reasoning_effort: none. Docs say it is unsupported. Always send one of the five levels.
- Using unsupported endpoints. Responses, embeddings, images, audio, files, batch and assistants are not available. Embeddings need a separate model.
- Sending images or PDFs. Beam is text only. OCR first, then pass text.
- Trusting the 1M context number. The beta API documents 256K combined input and output, with at most 131,072 generated tokens. Plan for that.
- Dropping tool_calls from history. If you append only
content, the next request fails or the model loses track of what it asked for. - Planning hardware from active parameters. 23B active does not mean 23B of memory. You host all 501B.
- Treating launch benchmarks as settled. Run your own eval set. Early independent takes put Beam behind several newer Chinese open models.
Quick reference
| Need | Setting |
|---|---|
| Base URL | https://api.reflection.ai/openai/v1 |
| Model id | Beam-501B-A23B |
| Effort levels | low, medium (default), high, xhigh, max |
| Max output | 131,072 tokens inside 256,144 combined |
| Structured output | JSON object and JSON schema |
| Tool calling | Functions, tool_choice, parallel calls |
| Weights | Apache 2.0, promised October 2026 |
Next steps
- Join the waitlist at platform.reflection.ai and swap
BEAM_BASE_URLwhen your key arrives. - Build a 30-task eval from your own repos and compare Beam at medium and high against your current model.
- When weights drop, read the model card for supported serving frameworks and quantization formats before renting GPUs.
- Replace the keyword router with a cheap classifier and log accuracy against actual token spend.
Sources: Reflection's launch post (reflection.ai/blog/introducing-beam), MarkTechPost's launch coverage, Kingy AI's API summary, and the Latent Space AINews digest, all from October 5-6, 2026. Some details above come from secondary summaries of the developer docs, so verify them once you have access.
Comments
Be the first to comment
Found this useful?
Get new AI guides for builders by email. Free.
Join 3,605 newsletter subscribers.