Skip to main content
Context Hub commit webhooks notify external services whenever an agent or skill commit is created in your workspace. Use them to trigger automation from Context Hub changes, including commits created through LangSmith Fleet. Managing Context Hub webhooks requires the prompts:update permission, which Workspace Admins and Workspace Editors have by default.

Add a webhook

Each webhook applies to the entire workspace. Every configured endpoint receives every agent and skill commit, including commits created by Fleet. The context_hub.commit.created.v1 event does not support filtering by repository or event type. To add a webhook:
  1. In the LangSmith UI, go to SettingsIntegrationsContext Hub webhooks.
  2. Click Add webhook.
  3. Enter a publicly reachable HTTPS URL.
  4. (Optional) Add custom request headers, such as an Authorization header.
  5. Click Add webhook.
  6. Copy the generated signing secret and store it securely.
The number of subscriptions you can add depends on your workspace configuration.

Manage a webhook

The webhook list displays endpoint URLs and custom header names. Header values and signing secrets remain hidden until you click Reveal secrets. You can reveal them later if you still have permission to manage Context Hub webhooks. Use the controls on a webhook to manage it:
  • Edit webhook: Change the HTTPS URL or replace its custom headers. Editing does not change the signing secret.
  • Roll signing secret: Generate and reveal a new signing secret. LangSmith uses the new secret for future deliveries immediately, and the previous secret stops working. Update every consumer that verifies the webhook.
  • Delete webhook: Stop the endpoint from receiving future Context Hub commit events from the workspace.

Delivery

LangSmith sends a JSON POST request for each event. Custom headers cannot override Content-Type or X-LangSmith-Signature, which LangSmith sets after applying custom headers. Retries contain the byte-identical request body and retain the event id. Deduplicate events by id before producing downstream effects.

Verify the signature

Each request includes an X-LangSmith-Signature header in this format:
Compute the HMAC-SHA256 digest over the exact raw request body bytes with the webhook’s signing secret. Verify the signature before parsing the JSON, and compare the complete header value in constant time. Parsing and reserializing the body before verification can change its bytes and invalidate the signature.

Event envelope

The outer id, type, created, and data envelope is frozen. The .v1 suffix on the event type versions the data.commit schema.

data.commit

The data.commit object describes the Context Hub commit that triggered the event.

data.commit.files_changed

Each entry summarizes a changed path. It does not contain the file contents.

Handle event versions

Branch on the complete event type before parsing data.commit:
A breaking change to data.commit uses a new event type suffix, such as .v2. Ignore unknown types instead of trying to parse them as v1, and allow unknown fields so compatible additions do not break your handler.

Next step