DeepFuse

Connect

Prompt for AI coding agents

Is your website built with code, and do you work with an AI coding agent such as Claude Code, Cursor or Copilot? Paste this prompt into it. It adds the DeepFuse connection on the server side, safely.

  1. Make a key in the panel: Connect → Make a key.
  2. Copy the prompt below and replace YOUR_DEEPFUSE_KEY with your key (in the panel, the prompt comes with your key already in it).
  3. Paste it into your agent in the website's project and let it make the change.
  4. Submit a test form and check Rules → Activity in the panel.
Connect this website to DeepFuse so every form submission, lead and order is sent to the DeepFuse kernel as an event.

API
- POST https://deepfuse.ai/api/kernel/events
- Header: Authorization: Bearer <DEEPFUSE_KEY>
- Header: Content-Type: application/json
- Body (one event):
  {
    "source": "site",
    "type": "lead.received",
    "subject": { "kind": "lead", "id": "<the record id in this site>" },
    "customer_ref": "<customer phone or email>",
    "payload": { ...every field of the form or order... },
    "occurred_at": "<ISO 8601 time>",
    "dedupe_key": "<unique and stable id for this event, e.g. form:<submission id>>"
  }
- Several at once: { "events": [ ...up to 50 events... ] }
- Responses: 200 { ok: true, results }, 400 invalid body, 401 wrong key.

Event types to use (lowercase, noun.verb)
- lead.received   contact, quote and booking-request forms
- order.created   a new order
- order.paid      payment confirmed
- order.cancelled an order was cancelled
- booking.created a confirmed booking
- message.in      a chat or support message from a customer

Requirements
1. Send from the server only (API route, server action or backend). Never put the key in browser JavaScript, HTML or a public repository.
2. Read the key from an environment variable named DEEPFUSE_KEY. The value is: YOUR_DEEPFUSE_KEY
3. Never slow down or break the visitor's request: send after the data is saved, with a 5-second timeout. On failure, log it and retry up to 3 times in the background. Never show a DeepFuse error to the visitor.
4. Always send a stable dedupe_key, so a retry is never counted twice.
5. Include every useful field in payload (name, phone, email, service/product, message, amount, city…).

Test
Send one lead.received event with test data, then confirm it appears in the DeepFuse panel → Rules → Activity.