Loading...
Loading...
Verify and configure SAP AI Core credentials, retrieve auth tokens, and manage resource groups. WHEN: user wants to check if AI Core is set up, configure credentials, get a Bearer token, fix authentication errors, run a setup health check, or list, create, update, or delete resource groups. DO NOT USE FOR: managing deployments — use `aicore-lifecycle-management`; listing foundation models — use `genai-hub-foundation-models`.
npx skill4agent add sap/ai-skills-library aicore-admin-resourcescheck_setup.pyAICORE_BASE_URL/v2uv run scripts/check_setup.py{
"status": "ok",
"resource_group": "<your-resource-group>",
"base_url": "https://api.ai.<region>...",
"auth_url": "https://..."
}references/SETUP.mdexport TOKEN=$(uv run scripts/get_token.py)get_token.py2>&1$()references/SETUP.md| Option | Command / Action |
|---|---|
| Interactive CLI (recommended) | |
| Environment variables | Set |
| Profile config file | Create |
| Error | Fix |
|---|---|
| Re-run |
| Append |
| Create it in AI Core Launchpad or contact admin |
| Set the required env vars or run |
config_<profile>.jsonAICORE_HOME~/.aicoreexport AICORE_HOME=/path/to/credentials # only needed if not ~/.aicore
export AICORE_PROFILE=<profile>
# then start the agent — it inherits the env varssource scripts/set_profile.sh <profile> && uv run scripts/check_setup.pyAICORE_PROFILE=<profile> uv run scripts/check_setup.pysource scripts/set_profile.sh# List all resource groups:
uv run scripts/list_resource_groups.py
# Show detailed view (includes labels):
uv run scripts/list_resource_groups.py --response-format detailed
# JSON output:
uv run scripts/list_resource_groups.py --json
# Inspect a single resource group:
uv run scripts/list_resource_groups.py --resource-group-id <id>
# Create a resource group:
uv run scripts/create_resource_group.py --id <id>
# Create with labels (keys must be prefixed ext.ai.sap.com/ or scenarios.ai.sap.com/):
uv run scripts/create_resource_group.py --id <id> --label ext.ai.sap.com/team=data --label ext.ai.sap.com/env=prod
# Update labels (replaces the full label set):
uv run scripts/patch_resource_group.py --id <id> --label ext.ai.sap.com/team=data
# Delete a resource group (--confirm is required):
uv run scripts/delete_resource_group.py --id <id> --confirmext.ai.sap.com/scenarios.ai.sap.com/team=dataaicore-lifecycle-managementgenai-hub-foundation-models| Trigger | Load |
|---|---|
| Any credential/auth error or setup question | |