Grok Build
Grok Build is xAI's coding agent for working with a local project. It can read the codebase, run shell commands, edit files, and use plan mode and parallel subagents for larger tasks. With Buddy, Grok Build can deploy the project and interact with pipelines, environments, and deployment logs.
Quick start
Install the Buddy CLI
bashnpm install -g bdy$
Log in to Buddy
bashbdy login$
Link your project
Run this inside your project directory to connect it to a Buddy project:
bashbdy proj link$
Install the Buddy skill
bashnpx skills add buddy/buddy-plugin$
Start Grok Build
bashgrok$
Prompt the agent
Ask it to build and deploy something end to end, for example:
promptCreate a snake app and deploy it for me
Example prompts
Once the agent is running and your project is linked to Buddy, try prompts like:
- Create a Next.js app and deploy it to production.
- Deploy an Umami analytics instance and wire it into my app.
- Deploy an AI chatbot with Postgres for history and Redis for rate limiting.
- Deploy my app, set up a CDN, and buy and configure a domain with SSL.
- Add a pipeline that runs on every change in the repository and executes my test suite.
- Add a pipeline that runs every minute, checks that my site is up, and sends a notification to Slack, email, Telegram, or SMS if anything is wrong.
- Check the last few CI pipeline runs for failures, read the logs, and fix the failing tests.
- Analyze the logs from the last production deployment and fix the errors.
- Find the last successful production deployment and roll back to it.
- Check my app logs and open issues based on what you find.
Run Grok in a pipeline
You can also run Grok directly inside a Buddy pipeline using the Grok action. Instead of starting Grok manually from the terminal, the action can run on pipeline events such as a pull request, failed deployment, or cron schedule, with access to the repository, artifacts, and variables from that run.
Connect xAI
Add a Grok integration with your xAI API key. The action reads the credentials from the integration, so the API key is not stored in the repository.Add the Grok action
In the pipeline, click Add action and pick Grok. Set the integration and the model.
Image loading...
Write the prompt
Add one or more prompts - inline, or read from a file in the repository such as.buddy/grok-prompt.md. Optionally add skills and MCP servers the agent can use.
Or define it in YAML:
yaml- action: Grok type: GROK integration: grok prompts: - review the pull request - file: .buddy/grok-prompt.md model: grok-build-0.1
See Run agents in a pipeline for prompt files, output variables, and supported triggers, and Grok with YAML for the full field reference.
Connect MCP
Give Grok Build access to Buddy over MCP so it can run pipelines, manage deployments, and read logs. See the MCP page for the regional server URLs and how to filter the exposed tool categories.
Add the server to ~/.grok/config.toml:
toml[mcp_servers.buddy] url = "https://mcp.buddy.works/mcp"
Or ask Grok Build to configure it:
promptAdd the Buddy MCP server (https://mcp.buddy.works/mcp) to your MCP configuration.
Last modified on Oct 15, 2026