Skip to content
Back to skills

437 Grok 9ae29dc9

ASecurity

memU includes first-class support for [Grok](https://grok.x.ai/), allowing you to leverage xAI's powerful language models directly within your application.

  • 9 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added October 11, 2026
ai-agentspythonbashapi

Works with

  • api

Security analysis

A100/100

Scanned October 11, 2026

npx -y skills add tools-only/X-Skills --skill 437-grok_9ae29dc9 --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of 437 Grok 9ae29dc9?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for 437 Grok 9ae29dc9
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/tools-only-437-grok-9ae29dc9/badge)](https://www.skillsdirectory.com/skills/tools-only-437-grok-9ae29dc9)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

SKILL.md
# Grok (xAI) Provider

memU includes first-class support for [Grok](https://grok.x.ai/), allowing you to leverage xAI's powerful language models directly within your application.

## Prerequisites

To use this provider, you must have an active xAI account.

1.  Navigate to the [xAI Console](https://console.x.ai/).
2.  Sign up or log in.
3.  Create a new **API Key** in the API Keys section.

## Configuration

The integration is designed to work out-of-the-box with minimal configuration.

### Environment Variables

Set the following environment variable in your `.env` file or system environment:

```bash
GROK_API_KEY=xai-YOUR_API_KEY_HERE
```

### Defaults

When you select the `grok` provider, memU automatically configures the following defaults:

*   **Base URL**: `https://api.x.ai/v1`
*   **Model**: `grok-2-latest`

## Usage Example

You can enable the Grok provider by setting the `provider` field to `"grok"` in your application configuration.

### Using Python Configuration

```python
from memu.app.settings import LLMConfig
from memu.app.service import MemoryService

# Configure the LLM provider to use Grok
llm_config = LLMConfig(provider="grok")

# Initialize the service
service = MemoryService(llm_config=llm_config)
print(f"Service initialized with model: {llm_config.chat_model}")
# Output: Service initialized with model: grok-2-latest
```

## Troubleshooting

### Connection Issues
If you are unable to connect to the xAI API:
1.  Verify that your `GROK_API_KEY` is set correctly and has not expired.
2.  Ensure that the `base_url` is resolving to `https://api.x.ai/v1`. If you have manual overrides in your settings, they might be conflicting with the default.

### Model Availability
If you receive a `404` or "Model not found" error, xAI may have updated their model names. You can override the model manually in the config if needed:

```python
config = LLMConfig(
    provider="grok",
    chat_model="grok-beta" # Example override
)
```

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…