Brief IA

Grok Build (xAI) Launches a Complete AI Project in 4 Prompts

💻 Code & Dev·Tom Levy·

Grok Build (xAI) Launches a Complete AI Project in 4 Prompts

Grok Build (xAI) Launches a Complete AI Project in 4 Prompts
Key Takeaways
1A complete data science project was conducted in four prompts with Grok Build
2The deployed FastAPI predicts wait times and exposes its metrics in production
3The terminal agent automates testing, session recovery, and deployment
💡Why it mattersThis case illustrates the ability of an AI agent to manage an entire data science workflow, from the dataset to the public API, with measurable and reproducible results.
Le brief IA que lisent les pros

Le brief IA que les pros lisent chaque soir

Les 7 actus IA du jour, décryptées en 5 min. Gratuit.

Inclus dès l'inscription : notre sélection des meilleurs guides & comparatifs IA.

Choisis ton rythme

Gratuit · Pas de spam · Désabonnement en 1 clic

📄
Full Analysis

An agent operated in the terminal generated data, trained several models, retained the best pipeline, and exposed a functional FastAPI API, tested online. The predictions include an estimated wait time in minutes and performance metrics, with a Gradient Boosting model leading the way. xAI presents Grok 4.6 as a long-duration coding and agent model on par with the best, now at the heart of Grok Build.

A functional public API returns 13.06 minutes and exposes its metrics

After deployment on FastAPI Cloud, the prediction API responded with a predicted_wait_time_minutes of 13.06, an explanation indicating approximately 13.1 minutes related to a queue of 5 people and peak hours, the model name (Gradient Boosting), and its metrics. The proper functioning of the deployed model, the preprocessing pipeline, and the FastAPI endpoint in production has been confirmed. The same prediction was also verified via the live Swagger interface, which returns the expected prediction, metrics, and explanation. A public Swagger documentation URL and a ready-to-use curl command were provided to test POST /predict on an online instance. The example payload included an order date, time, drink type, size, quantity, queue length, and number of baristas. The winning pipeline was pre-serialized, and the application loads this file at startup while exposing service and health routes.

A terminal agent automates testing, session resumption, and deployment

The Grok Build coding agent, accessible from a full-screen TUI and usable without a graphical interface, handled extended development tasks, from executing commands to web browsing. It launched the server, sent test requests, and checked responses to ensure the proper behavior of the prediction and validation endpoints. When the free usage limit was reached, the session could be resumed after a plan change, with the agent continuing exactly where it left off. During deployment, browser authentication was required, after which the process resumed automatically. The fact that Grok 4.6 powers this TUI allows leveraging xAI's latest coding model in an environment tailored for it.

Cleaned synthetic dataset and quantitative exploratory analysis

The project began with the generation of 3,000 realistic coffee orders, recording a data file and producing visualizations. In just a few minutes, a raw dataset was produced along with a cleaned version of 2,986 rows, managing missing values and removing 14 extreme outliers. An average wait time of approximately 10.5 minutes was highlighted. Peak hours added about 3.3 minutes, while staff load showed the strongest correlation with wait time, at 0.68. A baseline Random Forest model was established, with an MAE of 1.63 minutes and an R² of 0.85.

Model comparison on 598 orders and export of the winning pipeline

A reusable scikit-learn preprocessing pipeline was built before training three algorithms: linear regression, Random Forest, and Gradient Boosting. The comparison was conducted on a test set of 598 orders using MAE, RMSE, and R². Gradient Boosting achieved the best numerical results with an MAE of 1.101, an RMSE of 1.408, and an R² of 0.934. Linear regression performed well, and Random Forest ranked third. The winning pipeline was then saved in models/coffee_wait_time_pipeline.joblib for reuse.

Endpoints, validation, and documentation integrated into a FastAPI application

The produced FastAPI application loads the pipeline at startup and provides three endpoints: a root endpoint for service information and usage example, a health endpoint to check the model loading, and a prediction endpoint that returns an estimated wait time along with a brief explanation in plain language. Input validation relies on Pydantic to produce structured error messages in case of invalid data. Examples are included in the automatic documentation, facilitating testing and integration.

Cross-platform installation and onboarding in a dedicated folder

Precompiled versions are available for Windows, macOS, Linux, and WSL. Installation is done via a curl command on macOS, Linux, and WSL, and through a dedicated PowerShell command on Windows. Once installed, the tool returns version 1.0.4 (d846eb93d9). Onboarding takes place in a dedicated working directory, and the agent starts from this folder. Upon the first launch, a browser window generally opens to perform the login before operating entirely in the terminal.

Positioning of Grok 4.6 and feedback on the tool

Grok 4.6 is presented by xAI as a cutting-edge model dedicated to coding, agents, and knowledge work, with a focus on long-duration agents capable of following multi-step tasks in codebases. According to internal evaluations, it competes with GPT-5.6 Sol on the Artificial Analysis Intelligence Index. Grok Build, xAI's terminal coding agent and TUI, is directly powered by this model. Based on reported experiences, the agent handled the entire workflow: data generation and cleaning, model training, API construction, testing, troubleshooting, and deployment. The author finds the tool more capable and polished for serious coding work, placing it on par with Claude Code for many practical tasks, and points out the main improvement as the handling of long flows without continuous guidance. They believe that with regular advancements on the model and terminal experience, the agent could establish itself among the best options.

Brief IA — L'actualité IA en français

L'essentiel de l'actualité de l'intelligence artificielle, décrypté et expliqué chaque jour.