Skip to content
Product

Automate Your Automations: JieGou SDK for CI/CD and Slack Bots

Execute JieGou recipes, workflows, and coding agents programmatically with the new SDK API. API key auth, sync and async execution, SSE streaming — built for developers.

JT
JieGou Team
· · 4 min read

JieGou has always been a visual platform — you build recipes and workflows in the browser, run them with a click, and see results in real time. But what if you want to trigger a workflow from a GitHub Action? Or run a recipe from a Slack bot? Or embed JieGou execution into your existing CI/CD pipeline?

Today we’re launching the SDK API — a headless execution layer that lets you run anything in JieGou programmatically.

One endpoint, four actions

The SDK API is a single unified endpoint at POST /api/sdk. Authenticate with a bearer token, specify an action, and get results:

# Run a recipe synchronously
curl -X POST https://console.jiegou.ai/api/sdk \
  -H "Authorization: Bearer jg_a7f2b1c3e9d4..." \
  -H "Content-Type: application/json" \
  -d '{
    "action": "run_recipe",
    "recipeId": "abc123",
    "input": { "topic": "AI trends in 2026" }
  }'

Four actions are available:

ActionWhat it doesResponse
run_recipeExecute a single recipeSynchronous — returns result immediately
run_workflowExecute a multi-step workflowAsync — returns runId for polling
run_coding_agentRun a coding agent taskAsync — returns runId with streaming
send_messageSend a message to a conversationSynchronous — returns assistant response

API keys with granular permissions

SDK API keys are separate from your LLM provider keys (BYOK). Create them from the account settings page with scoped permissions:

  • recipes:read / recipes:execute
  • workflows:read / workflows:execute
  • runs:read
  • conversations:read / conversations:write
  • coding-agent:execute
  • skills:read

Keys use the jg_ prefix for easy identification in logs and secret scanners. The plaintext token is shown once at creation — after that, only the first 8 characters are visible. Keys are stored as SHA-256 hashes, never in plaintext.

Each key can have an optional expiration date. Rotate keys instantly — the old token is revoked and a new one is generated with the same configuration.

Async execution with polling and streaming

Workflows and coding agent tasks run asynchronously. The initial response gives you a runId and a pollUrl:

{
  "status": "queued",
  "runId": "run_xyz789",
  "pollUrl": "/api/sdk/runs/run_xyz789"
}

Poll for status:

curl https://console.jiegou.ai/api/sdk/runs/run_xyz789 \
  -H "Authorization: Bearer jg_a7f2b1c3..."

Or stream real-time events via SSE:

curl -N https://console.jiegou.ai/api/sdk/runs/run_xyz789/stream \
  -H "Authorization: Bearer jg_a7f2b1c3..." \
  -H "Accept: text/event-stream"

Events include step starts, step completions, coding agent tool calls, and the final result.

Rate limiting and usage tracking

Each API key has its own rate limits:

  • 60 requests per minute per key
  • 1,000 requests per hour per key
  • 10 concurrent requests per key

SDK usage is tracked separately from web UI usage in the billing dashboard, broken down by API key and action type. Token consumption feeds into the same BYOK billing as web usage.

Integration examples

GitHub Actions

- name: Generate changelog
  run: |
    curl -X POST $JIEGOU_URL/api/sdk \
      -H "Authorization: Bearer ${{ secrets.JIEGOU_SDK_KEY }}" \
      -d '{"action": "run_recipe", "recipeId": "changelog-gen", "input": {"diff": "${{ steps.diff.outputs.content }}"}}'

Slack bot

app.message('summarize', async ({ message, say }) => {
  const result = await fetch(`${JIEGOU_URL}/api/sdk`, {
    method: 'POST',
    headers: { 'Authorization': `Bearer ${JIEGOU_KEY}` },
    body: JSON.stringify({
      action: 'run_recipe',
      recipeId: 'thread-summarizer',
      input: { thread: message.text },
    }),
  });
  const data = await result.json();
  await say(data.result.output);
});

Scheduled batch processing

#!/bin/bash
# Run nightly data processing workflow
RESPONSE=$(curl -s -X POST "$JIEGOU_URL/api/sdk" \
  -H "Authorization: Bearer $JIEGOU_KEY" \
  -d '{"action": "run_workflow", "workflowId": "nightly-etl", "input": {"date": "'$(date -I)'"}}')

RUN_ID=$(echo $RESPONSE | jq -r '.runId')

# Poll until complete
while true; do
  STATUS=$(curl -s "$JIEGOU_URL/api/sdk/runs/$RUN_ID" \
    -H "Authorization: Bearer $JIEGOU_KEY" | jq -r '.status')
  [ "$STATUS" = "completed" ] && break
  [ "$STATUS" = "failed" ] && exit 1
  sleep 10
done

Available now

The SDK API is available on Pro plans and above. Create your first API key in Account Settings > SDK API Keys.

We’re also working on an npm package (@jiegou/sdk) that wraps the REST API with TypeScript types, streaming helpers, and automatic retry logic. Stay tuned.

Create an API key and start automating your automations.

sdk api ci-cd headless developer integration automation
Share this article

Enjoyed this post?

Get workflow tips, product updates, and automation guides in your inbox.

No spam. Unsubscribe anytime.