Skip to content

docs: add Grok CLI agent page#229

Open
beran-t wants to merge 3 commits into
mainfrom
add-grok-cli-docs
Open

docs: add Grok CLI agent page#229
beran-t wants to merge 3 commits into
mainfrom
add-grok-cli-docs

Conversation

@beran-t
Copy link
Copy Markdown
Contributor

@beran-t beran-t commented May 28, 2026

Summary

  • New docs/agents/grok.mdx covering the xAI Grok CLI in an E2B sandbox: headless run, cloned-repo example, parallel subagents (the marquee feature), streaming-json output, AGENTS.md context, and custom template build.
  • Wires the page into docs.json under "Agents in sandbox" and adds a card + mention on the Coding Agents use case page.

Open items

  • Page assumes a pre-built grok template (e2b sbx create grok); confirm slug before publishing.
  • Missing images/icons/grok.svg referenced by the frontmatter and use-case card.
  • Grok CLI is in early beta (SuperGrok / X Premium Plus); remove the <Info> callout once GA.

@cla-bot cla-bot Bot added the cla-signed label May 28, 2026
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale comment

Comment thread docs/agents/grok.mdx
from e2b import Sandbox

sandbox = Sandbox.create("grok", envs={
"XAI_API_KEY": os.environ["XAI_API_KEY"],
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔒 Agentic Security Review
Severity: HIGH
The guide labels --always-approve as safe while the same page also demonstrates running Grok against cloned repositories with credentials in environment/clone flows. In this setup, attacker-controlled repository content (for example instructions embedded in files) can drive autonomous tool execution without any approval checkpoint.

Impact: Prompt-injection content in a target repo can trigger automatic actions that exfiltrate tokens or make unauthorized code changes during headless runs.

Fix in Cursor Fix in Web

Reviewed by Cursor Security Reviewer for commit 5ce87bc. Configure here.

@mintlify
Copy link
Copy Markdown
Contributor

mintlify Bot commented May 28, 2026

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
e2b 🟢 Ready View Preview May 28, 2026, 12:21 PM

Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale comment

Comment thread docs/agents/grok.mdx
if line:
event = json.loads(line)
print(f"[{event['type']}]", event)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔒 Agentic Security Review
Severity: MEDIUM
This example logs the full streaming event object (console.log(..., event)), and the Python example below does the same. Streaming events can carry sensitive tool arguments/results, so copying this snippet into CI or shared logs may unintentionally expose secrets or private code context.

Impact: Sensitive runtime data may be persisted in log pipelines and become accessible beyond the intended operator scope.

Fix in Cursor Fix in Web

Reviewed by Cursor Security Reviewer for commit d4b6c9c. Configure here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant