Learning resourcesReviewed · xAI

Company to Call Brief

Company to Call Brief is a tutorial for developers building an AI sales call assistant, but its sample CRM is fictional and its search limits need scrutiny. The TypeScript example combines Grok web and X searches with application-run CRM lookups to produce a sourced brief through a web interface or terminal.

Researched 23 Nov 2026

In short.

Company to Call Brief is an xAI cookbook tutorial for developers creating sales call briefs, with fictional CRM data and search limits that cannot establish a firm spending ceiling. It documents a Node.js application using grok-4.7, hosted web and X searches, and five application-run CRM functions. Its useful teaching points include continuing conversations across function calls, streaming structured output, filtering sources and limiting the CRM fields sent to the provider. The page reports roughly $0.10 per example run, but future costs are unknown. No code was executed, and implementation correctness, privacy behavior and brief quality were not independently assessed.

Researched and written by an AI model and checked by a second AI model. How it works

Coverage is limited to the complete documentation page at the exact selected address, [https://docs.x.ai/cookbook/examples/company-to-call-brief.md]. Linked pages and referenced repository files are excluded. No separate license notice, dependency manifest, generated brief or billing receipt was supplied. All implementation behavior, timing and cost observations are attributed to the page; no installation, API request or application execution was performed.

The overview

Identity

Company to Call Brief is an instructional example in the xAI cookbook at [https://docs.x.ai/cookbook/examples/company-to-call-brief.md]. It teaches developers to combine external company research with account history and generate a one-page sales call brief. The selected resource is the documentation page; its referenced application code was not supplied.

Assessment

The tutorial is useful for understanding an assistant that mixes provider-hosted search with functions running in your own application. It explains request boundaries, conversation state, streaming, cancellation and source handling with concrete file and function names. Adopting it for real sales work requires replacing the sample CRM and examining the documented limits around search counts, citations and private data. It does not establish production reliability or the factual accuracy of generated briefs.

Users

The strongest fit is a developer building call preparation into a CRM or learning how hosted search and custom functions interact. Beginners get a concrete company-research example and visible progress in a browser. Experienced developers get details about tool-call loops, JSON schema output and state transfer between requests. A salesperson could use the documented interface after setup, but the tutorial requires a development environment and an API key.

Capabilities

The documented app researches a company through web search and X search, with X searches restricted to the preceding 30 days. It can retrieve an account, contacts, meetings, deals and tickets through five CRM functions. The resulting brief contains a company overview, sourced news, account history, talking points and risks.

The browser interface shows progress separately for provider-side activity and application-side CRM lookups, streams brief sections, displays reported cost and offers a Markdown download. The terminal version reports the same underlying progress. Both versions save briefs to output/<company>-<date>.md. Stop controls and page closure are described as cancelling the run.

Using it

Requirements

The page requires Node.js 22.13 or later and an xAI API key supplied through a root .env file or XAI_API_KEY. Its instructions assume access to the example repository and npm. The documented requests use grok-4.7 and SDK helpers for search, streaming and structured output. The page does not establish an SDK package version, a dependency lockfile, account eligibility or deployment requirements.

Mechanism

Each request offers Grok webSearch(), xSearch() and five custom function tools. Searches execute at the provider. A custom function call ends the request and hands control to the application, where lookUp() retrieves selected fields from crm.json. The next request includes response.toInput() and the function results. The loop finishes when a response contains no function calls, subject to a six-request cap.

The page describes a typical sequence of three requests: find the account, retrieve the other four CRM records, then research and write the brief. Searches can also occur before a function call. The final brief follows a JSON schema, while streamed json events provide partial content. The Node server forwards progress to the browser through server-sent events and passes an AbortSignal to API requests.

Setup

The documented browser setup is to enter examples/company-to-call-brief/typescript, run npm install, configure the API key and run npm run web. The interface is then available at [http://localhost:3000]. Enter a company or choose a sample account and select Prep brief.

For terminal use, the page gives npm start -- Shopify; omitting the company defaults to Stripe. To connect a real CRM, replace the functions in LOOKUPS in src/crm.ts while preserving deliberate selection of fields returned to Grok. These instructions were not executed.

Example

Preparing a Stripe call illustrates the intended flow: retrieve the sample account history, research recent company developments and combine them into talking points and risks with sources. The sample CRM contains Stripe, Shopify, Duolingo and Figma, but their contacts, meetings, deals and tickets are invented. Other company names are supported according to the page, with the brief indicating that no CRM account was found. No generated brief was supplied for accuracy assessment.

Assessment & evidence

Limitations

max_turns applies separately to each API request and resets after an application function call. The author also reports five sequential searches despite max_turns: 2. This makes it unsuitable as the sole control for total search activity or spending.

Citations cover searches within their own request. The example therefore also collects sources from streamed web-search events, and keepCited() removes unsupported source entries and news left without a source. Matching a returned source does not establish that an individual claim accurately represents it.

The example withholds contact email addresses, phone numbers and minimum acceptable discounts, but Grok still receives the selected CRM fields returned by functions. The page describes store: false and state transfer through toInput(); it does not establish comprehensive retention guarantees. The instruction against putting CRM data into searches is described, but its enforcement was not assessed.

Design choices and trade-offs

The example demonstrates why function calls need application-managed continuation: hosted searches proceed within a request, while CRM calls return control to the application. Sharing prepareBrief() between the browser and terminal also gives both interfaces the same orchestration logic.

The requests use low reasoning effort. The author reports that default effort produced another round of searches and a few additional specifics, taking about 70 seconds instead of 40 in a comparison. This is a source-reported observation, not an independently reproduced benchmark or evidence that low effort always gives equivalent quality.

Alternatives

Within the example, the browser is useful for watching the two activity lanes and reading the streaming brief, while the terminal provides the same preparation flow without that interface. The page also discusses default reasoning effort as a slower configuration that may add detail. It provides no comparison with other sales research products, model providers or orchestration libraries, so relative quality and value are unknown.

Evidence

The evidence consists of the complete supplied documentation page at [https://docs.x.ai/cookbook/examples/company-to-call-brief.md]. It supports the described architecture, commands and author-reported observations. Referenced source files, dependency manifests, generated outputs and billing records were not supplied. Nothing was executed; successful setup, cancellation, source filtering, privacy behavior and output accuracy remain unverified.

Access & freshness

Costs

The author reports about $0.10 for an example run: roughly $0.04–$0.06 for searches and about $0.05 for tokens. The page lists Web Search at $5 per 1,000 searches and X Search at $5 per 1,000 posts fetched. The X billing unit is therefore fetched posts, rather than search requests.

These are source-reported figures without a dated billing receipt or complete usage breakdown. The page does not give model token rates, repository licensing costs or real CRM integration costs. Future per-run cost is unknown, and a six-request limit does not establish a fixed number of searches, fetched posts or tokens.

Rights

The supplied page contains no explicit license or reuse terms for the documentation or application code. Permission to copy, modify or redistribute those materials is therefore unknown from this evidence. Provider terms and rights governing retrieved web or X material are also not established. A citation identifies a source but does not establish permission to reproduce its content.

Freshness

The supplied page was captured on 23 November 2026 and gives no publication or last-update date. It names grok-4.7, Node.js 22.13 or later and specific search prices. Their continuing availability and accuracy are unknown beyond the supplied text. Its X search window concerns the recency of retrieved posts; it does not establish that every statement in a generated brief is current.

Next steps

Begin with the fictional CRM to understand the request timeline and generated brief. Before connecting real account data, inspect LOOKUPS, confirm which fields leave the application and examine the displayed search queries. Check current model access and prices, establish spending controls beyond max_turns, and verify news claims against their sources. Confirm the repository license before reusing code. The supplied page alone does not resolve these points.

Evidence for this report

selected-page.txtselected · checked 2026-11-23