Skip to content
Product

Extend JieGou Your Way: Custom Tools, Step Types, and Lifecycle Hooks

Define webhook-backed tools, V8-sandboxed workflow step types, and lifecycle hooks to integrate JieGou with your existing infrastructure — no fork required.

JT
JieGou Team
· · 5 min read

JieGou ships with 260+ MCP integrations, 9 LLM providers, and a visual workflow builder. But every organization has unique tools, internal APIs, and processes that a general-purpose platform can’t anticipate.

Today we’re launching three extensibility features that let you bring your own capabilities into JieGou — without forking the codebase or waiting for us to build an integration.

Custom Webhook Tools

Define a tool backed by any HTTP endpoint. Your tool becomes available in recipes, workflows, and the conversational agent — just like built-in tools.

How it works

  1. Define the tool: Name, description, JSON input schema, and endpoint URL
  2. Configure the request: Method (GET/POST), custom headers (encrypted), optional Handlebars request template
  3. Map the response: JSONPath expression to extract the relevant output
  4. Scope it: Assign to specific departments or make it account-wide

Example: Inventory check tool

{
  "name": "check_inventory",
  "description": "Check current inventory levels for a product SKU",
  "inputSchema": {
    "type": "object",
    "properties": {
      "sku": { "type": "string", "description": "Product SKU" }
    },
    "required": ["sku"]
  },
  "endpoint": {
    "url": "https://api.internal.example.com/inventory/{{sku}}",
    "method": "GET",
    "headers": { "Authorization": "Bearer {{env.INVENTORY_API_KEY}}" },
    "timeoutMs": 10000
  },
  "responseMapping": "$.data.quantity"
}

Now any recipe or workflow step can use check_inventory as a tool. The LLM sees it alongside built-in tools and calls it when relevant.

Security

  • HTTPS required in production
  • Custom headers are encrypted at rest (same AES-256-GCM as BYOK keys)
  • All outbound requests go through the platform’s timeout, retry, and rate limiting infrastructure
  • Response size capped at 100KB
  • Tool execution counts toward your account’s rate limits

Custom webhook tools are available on Team plans and above.

Custom Workflow Step Types

For logic that goes beyond a webhook call, define custom step types as TypeScript modules that run in V8 isolates — fully sandboxed with no access to the filesystem, network, or host process.

The sandbox

Custom steps execute in isolated-vm V8 isolates with strict constraints:

  • Memory limit: 128MB per execution
  • CPU time limit: Configurable per step
  • No require() or import: Dependencies are explicitly injected
  • No filesystem or network: Only platform-provided APIs are available

Injected APIs

Custom steps can use a subset of platform capabilities, declared at definition time:

APIWhat it provides
httpProxied HTTP fetch (respects rate limits)
llmLLM invocation (uses account’s BYOK config, tracked for billing)
firestore_readRead-only Firestore access (scoped to account)

Example: Sentiment aggregator step

// Custom step: aggregate-sentiment
// Allowed APIs: llm

export async function execute(input: { reviews: string[] }, context: any) {
  const results = await Promise.all(
    input.reviews.map(review =>
      context.llm.invoke(`Rate this review's sentiment from 1-5: "${review}". Reply with just the number.`, { model: 'haiku' })
    )
  );

  const scores = results.map(r => parseInt(r.trim())).filter(n => !isNaN(n));
  const average = scores.reduce((a, b) => a + b, 0) / scores.length;

  return {
    averageSentiment: Math.round(average * 10) / 10,
    totalReviews: scores.length,
    distribution: {
      positive: scores.filter(s => s >= 4).length,
      neutral: scores.filter(s => s === 3).length,
      negative: scores.filter(s => s <= 2).length,
    },
  };
}

Edit code in the built-in Monaco editor, define input/output schemas, and test with sample data before deploying.

Custom step types are available on Enterprise plans.

Lifecycle Hooks

Register webhook endpoints that fire on workflow and recipe execution events. Use them to integrate with Slack, PagerDuty, custom dashboards, or any HTTP service.

Supported events

EventWhen it fires
workflow:startWorkflow execution begins
workflow:completeWorkflow finishes successfully
workflow:errorWorkflow fails
step:startIndividual step begins
step:completeIndividual step finishes
step:errorIndividual step fails
recipe:startRecipe execution begins
recipe:completeRecipe finishes
approval:requestedApproval gate triggered
approval:grantedApproval given
approval:rejectedApproval denied

Non-blocking vs. blocking

Non-blocking hooks (default) are fire-and-forget. The platform sends the webhook and continues execution without waiting for a response. Use these for notifications and logging.

Blocking hooks pause execution until the webhook responds (10-second timeout). The response can modify the execution context. Use these for pre-flight checks or dynamic configuration injection. Blocking hooks have a circuit breaker — if they fail repeatedly, they’re automatically disabled.

Example: Slack notification on workflow completion

{
  "name": "Slack notify on completion",
  "events": ["workflow:complete", "workflow:error"],
  "webhookUrl": "https://hooks.slack.com/services/T.../B.../xxx",
  "blocking": false
}

Lifecycle hooks are available on Team plans and above.

How they work together

The three extensibility features compose naturally:

  1. A custom tool checks your internal inventory API
  2. A custom step runs specialized business logic in a V8 sandbox
  3. A lifecycle hook notifies your Slack channel when the workflow completes

All three respect the platform’s existing security model — RBAC, audit logging, rate limiting, and department scoping apply uniformly.

Explore the extensibility features in your account settings.

custom-tools lifecycle-hooks extensibility webhooks v8-sandbox enterprise
Share this article

Enjoyed this post?

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

No spam. Unsubscribe anytime.