repo
scope (public_repo
is sufficient for public repositories).Sample Webhook Payload
Minimal FastAPI Server Code ()
main.py
This server will listen for incoming webhooks from LangSmith and commit the received prompt manifest to your GitHub repository..env
): It expects a .env
file with your GITHUB_TOKEN
, GITHUB_REPO_OWNER
, and GITHUB_REPO_NAME
. You can also customize GITHUB_FILE_PATH
(default: LangSmith_prompt_manifest.json
) and GITHUB_BRANCH
(default: main
).commit_manifest_to_github
function handles the logic of fetching the current file’s SHA (to update it) and then committing the new manifest content./webhook/commit
): This is the URL path your LangSmith webhook will target.https://prompt-commit-webhook.onrender.com
).https://prompt-commit-webhook.onrender.com/webhook/commit
.https://prompt-commit-webhook.onrender.com/webhook/commit
). The body of this request contains the JSON prompt manifest for the entire workspace.