Loading...
Loading...
Set up or log in to Karma. Use when user says "set up agent", "configure API key", "connect to Karma", "login to Karma", "log in", or before first use of any Karma skill.
npx skill4agent add show-karma/skills setup-agentKARMA_API_KEYAskUserQuestionBASE_URL="${KARMA_API_URL:-https://gapapi.karmahq.xyz}"
INVOCATION_ID=$(uuidgen)
curl -s -X POST "${BASE_URL}/v2/agent/register" \
-H "Content-Type: application/json" \
-H "X-Source: skill:setup-agent" -H "X-Invocation-Id: $INVOCATION_ID" -H "X-Skill-Version: 0.2.0" \
-d '{}'{ "key": "karma_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" }Note: Projects created with this method get their own wallet. They won't be linked to an existing Karma account, so they can't be managed from the website yet (coming in a future update).
BASE_URL="${KARMA_API_URL:-https://gapapi.karmahq.xyz}"
INVOCATION_ID=$(uuidgen)
curl -s -X POST "${BASE_URL}/v2/api-keys/auth/init" \
-H "Content-Type: application/json" \
-H "X-Source: skill:setup-agent" -H "X-Invocation-Id: $INVOCATION_ID" -H "X-Skill-Version: 0.2.0" \
-d '{ "email": "user@example.com" }'{ "message": "Verification code sent to user@example.com" }curl -s -X POST "${BASE_URL}/v2/api-keys/auth/verify" \
-H "Content-Type: application/json" \
-H "X-Source: skill:setup-agent" -H "X-Invocation-Id: $INVOCATION_ID" -H "X-Skill-Version: 0.2.0" \
-d '{
"email": "user@example.com",
"code": "123456",
"name": "claude-agent"
}'{ "key": "karma_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" }| Error | Meaning | Action |
|---|---|---|
| Wrong code or expired | Ask user to check code or request a new one |
| User already has a key | Tell them to use their existing key or revoke it from the website |
| Rate limited | Wait and try again |
Would you like me to save your API key to your shell config so you don't have to paste it every time?
# Detect shell config file
if [ -f "$HOME/.zshrc" ]; then
SHELL_RC="$HOME/.zshrc"
elif [ -f "$HOME/.bashrc" ]; then
SHELL_RC="$HOME/.bashrc"
fi
# Append only if not already present
grep -q 'KARMA_API_KEY' "$SHELL_RC" || echo '\n# Karma API Key\nexport KARMA_API_KEY="karma_..."' >> "$SHELL_RC"
# Also export for current session
export KARMA_API_KEY="karma_..."export KARMA_API_KEY="karma_your_key_here"export KARMA_API_URL="http://localhost:3002"curl -s "${KARMA_API_URL:-https://gapapi.karmahq.xyz}/v2/agent/info" \
-H "x-api-key: ${KARMA_API_KEY}" \
-H "X-Source: skill:setup-agent" -H "X-Invocation-Id: $INVOCATION_ID" -H "X-Skill-Version: 0.2.0" \
| python3 -m json.tool{
"walletAddress": "0x...",
"smartAccountAddress": "0x...",
"supportedChainIds": [10, 137, 1135, ...],
"supportedActions": ["createProject", "createMilestone", ...]
}walletAddresssupportedActionsYour Karma agent is ready!API Key:(the key from step 1 or the email flow)karma_...You can now use these skills:
— Create and manage projects, grants, milestones, and updatesproject-manager — Search for grants, hackathons, bounties, and morefind-funding-opportunities
| Issue | Fix |
|---|---|
| Key is wrong or expired — regenerate via email flow or at karmahq.xyz |
| Key was created before server wallets — regenerate it |
| Wrong |
| Run |