|
| 1 | +# n8n-nodes-bailinghub |
| 2 | + |
| 3 | +`n8n-nodes-bailinghub` lets n8n workflows submit and monitor governed AI jobs through |
| 4 | +[BailingHub](https://github.com/bailinghub/bailinghub). |
| 5 | + |
| 6 | +BailingHub sits between agents or automation workflows and existing business systems. It |
| 7 | +provides a control plane for route allowlists, risk-aware tool governance, human approval |
| 8 | +intents, execution records, and auditability. This node is an independent adapter to its |
| 9 | +public Client API; it does not embed BailingHub or redefine ACC. |
| 10 | + |
| 11 | +## Installation |
| 12 | + |
| 13 | +Install the community package named `n8n-nodes-bailinghub` from n8n's community node UI, |
| 14 | +or install it in a self-hosted n8n deployment according to the |
| 15 | +[n8n community node guide](https://docs.n8n.io/integrations/community-nodes/installation/). |
| 16 | + |
| 17 | +The package's verified-node status is tracked through its GitHub releases. The repository |
| 18 | +does not claim n8n verification until n8n has completed that review. |
| 19 | + |
| 20 | +## Operations |
| 21 | + |
| 22 | +| Operation | Purpose | |
| 23 | +| --- | --- | |
| 24 | +| Submit Governed Job | Calls `POST /run` with a request ID, allowed route, and task input. | |
| 25 | +| Get Job | Calls `GET /jobs/{job_id}` and returns a deliberately reduced public result. | |
| 26 | +| Wait for Job | Polls the same job for at most 60 seconds, then returns the terminal or latest state. | |
| 27 | + |
| 28 | +The node never resubmits a task while waiting. If a wait times out, branch on |
| 29 | +`wait_timed_out: true` and continue polling later with the same job ID. |
| 30 | + |
| 31 | +## Credentials |
| 32 | + |
| 33 | +Create a dedicated BailingHub client in the BailingHub console and configure: |
| 34 | + |
| 35 | +- **Base URL**: the deployment root, such as `https://hub.example.com`; |
| 36 | +- **Client Token**: the per-client token issued by BailingHub; |
| 37 | +- **Allow Insecure HTTP**: keep disabled unless a self-hosted n8n instance reaches |
| 38 | + BailingHub over a trusted private network without TLS. |
| 39 | + |
| 40 | +Do not use the BailingHub administrator token. Route access and rate limits should be |
| 41 | +configured on the dedicated client. n8n's credential test verifies that the configured |
| 42 | +BailingHub deployment is reachable through its public health endpoint. The Client Token is |
| 43 | +validated by BailingHub on the first protected job request; a health check is not presented |
| 44 | +as proof that a token is valid. |
| 45 | + |
| 46 | +## Security Boundary |
| 47 | + |
| 48 | +This adapter intentionally exposes only BailingHub's public client surface: |
| 49 | + |
| 50 | +- it does not call administrator trace or approval endpoints; |
| 51 | +- it does not expose approve or reject actions; |
| 52 | +- it does not accept acting-subject metadata in v1; |
| 53 | +- its dedicated credential is restricted to this node and is not exposed through n8n's |
| 54 | + generic Custom API Call surface; |
| 55 | +- it filters job responses so internal dispatch configuration, credentials, metadata, and |
| 56 | + administrator-only evidence do not enter n8n workflow output; |
| 57 | +- it maps upstream errors to bounded public messages rather than returning arbitrary bodies. |
| 58 | + |
| 59 | +Trusted acting subjects must be established from an authenticated business-system boundary. |
| 60 | +They must not be copied from model output. Final business authorization remains in the |
| 61 | +business system. |
| 62 | + |
| 63 | +## Typical Workflow |
| 64 | + |
| 65 | +1. A trusted n8n trigger receives a business event. |
| 66 | +2. **Submit Governed Job** sends the task to a BailingHub route with a stable request ID. |
| 67 | +3. Store the returned `job_id`. |
| 68 | +4. Use **Wait for Job** for a short bounded wait, or schedule **Get Job** later. |
| 69 | +5. Branch on `status`, `terminal`, and `wait_timed_out`. |
| 70 | +6. Consume `result`, `report`, or `raw_result` only after checking the terminal status. |
| 71 | + |
| 72 | +Approval workflow ownership remains outside this node. BailingHub can pause governed tool |
| 73 | +execution and emit approval intents through the deployment's configured approval channel. |
| 74 | + |
| 75 | +An importable example is available at |
| 76 | +[`examples/submit-and-wait.workflow.json`](examples/submit-and-wait.workflow.json). Replace |
| 77 | +the route placeholder with a route allowed for the dedicated BailingHub client, then assign |
| 78 | +the same BailingHub credential to both BailingHub nodes. |
| 79 | + |
| 80 | +## Compatibility |
| 81 | + |
| 82 | +The adapter targets BailingHub's public `POST /run` and `GET /jobs/{job_id}` Client API and |
| 83 | +the `bailing.contract.v2.13` compatible contract family. See |
| 84 | +[docs/COMPATIBILITY.md](docs/COMPATIBILITY.md) for the tested matrix. |
| 85 | + |
| 86 | +## Project Boundaries |
| 87 | + |
| 88 | +See [docs/PROJECT_BOUNDARIES.md](docs/PROJECT_BOUNDARIES.md). The dependency direction is |
| 89 | +strictly one-way: |
| 90 | + |
| 91 | +```text |
| 92 | +n8n-nodes-bailinghub -> BailingHub public Client API |
| 93 | +BailingHub may consume ACC declarations |
| 94 | +ACC has no dependency on either implementation |
| 95 | +``` |
| 96 | + |
| 97 | +## Privacy |
| 98 | + |
| 99 | +The node has no telemetry. It sends the configured request ID, route, and task input only to |
| 100 | +the BailingHub URL chosen by the n8n operator. See [PRIVACY.md](PRIVACY.md). |
| 101 | + |
| 102 | +## Resources |
| 103 | + |
| 104 | +- [BailingHub](https://github.com/bailinghub/bailinghub) |
| 105 | +- [BailingHub integration guide](https://github.com/bailinghub/bailinghub/blob/main/docs/INTEGRATION.en.md) |
| 106 | +- [n8n community node documentation](https://docs.n8n.io/integrations/creating-nodes/) |
| 107 | +- [Agent Capability Contract](https://agentcapability.org/) |
| 108 | + |
| 109 | +## Development |
| 110 | + |
| 111 | +```bash |
| 112 | +npm install |
| 113 | +npm run verify |
| 114 | +npm run dev |
| 115 | +``` |
| 116 | + |
| 117 | +`npm run verify` runs the n8n linter, builds the package, and executes the contract-focused |
| 118 | +tests. Releases are published from GitHub Actions with npm provenance. |
| 119 | + |
| 120 | +## License |
| 121 | + |
| 122 | +MIT |
0 commit comments