You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
📚 docs(openspec): propose export, import, compare and verify for prompts and assistants - #816
With this change, a user can move a prompt or an assistant to another LangSmith workspace or deployment through a JSON file kept in Git, using four new subcommands of langstar prompt and langstar assistant: export writes the file, import recreates the prompt or assistant from it, compare lists how a copy differs from the file, and verify checks that the copy has the secrets, graph and prompts it needs to run. Start with design.md.
Where langstar differs from the upstream references
langsmith-cliprompt pull / push: Langstar's export asks for the model with include=model; the Go CLI's pull leaves the model out. Langstar's import reads the file that export writes. The Go CLI's push sends whatever JSON it reads as the manifest, so its own pull output reaches LangSmith wrapped in an envelope.
Workspace selection: The Go CLI takes the workspace from its --workspace flag, LANGSMITH_WORKSPACE_ID, LANGSMITH_TENANT_ID or its profile, whichever comes first. Langstar's import requires --workspace-id and never falls back to LANGSMITH_WORKSPACE_ID, so langstar imports into the workspace the user typed.
langsmith-sdkpull_prompt_commit: The Python SDK sends the deprecated include_model=true. Langstar sends include=model, which the Go SDK uses. The OpenAPI spec accepts both.
langgraph SDK assistants: Langstar's SDK gains what that SDK already handles and langstar lacks today: context on create, update and read, version on read, graph_id on update, a search filtered by graph ID, and assistant_id and if_exists on create. With those last two, an import that stopped right after creating an assistant sends the same create again and gets that assistant back.
Is there an API that runs a prompt's model?
There is no documented one. The only invoke endpoint in the LangSmith OpenAPI spec (reference/openapi/langchain/langsmith/openapi.json) is POST /api/v1/prompts/invoke_prompt. Its body, InvokePromptPayload, holds only messages, template_format and inputs. It has no field for a model or an output schema, and the spec gives no shape for its response. No upstream SDK or CLI clone calls it. The playground endpoints in the spec (/api/v1/playground-settings) only store model configurations. In export-import-prompts-and-assistants Task 1.2 Record what the live API returns, a developer calls invoke_prompt on the live API before anyone builds on this.
Credentials in export files
Export writes no file when a prompt or assistant holds a credential, because a secret pushed to Git stays in the repository's history. It checks every string it would write for a key name such as api_key, token, password, secret or Authorization, and for a value shaped like a bearer token, a private key, a URL or connection string with a password, a JSON Web Token or a provider's API key. Export names the path of each flagged string and exits with status 1. A user who has read a flagged string and found it harmless passes --not-a-secret <json-pointer> to write it. Compare, verify and import print <redacted> in place of the same strings. Export refuses to write a file that holds a credential in design.md gives the full rules.
SDK release
Developers commit the new SDK fields as ✨ feat(sdk) with no BREAKING CHANGE: footer, so the Prepare Release workflow makes the next release a minor version. That is what the release docs ask for: docs/dev/git-scm-conventions.md gives feat a minor bump, and docs/dev/procedures.md counts a changed signature or a removed field as a breaking SDK change. #726 ✨ feat(assistant): add description field support from Agent Server API added Assistant.description the same way, and langstar released it in v2.2.0. design.md's decision on the SDK release has the citations.
Test environments
Developers build and run the tests in the existing test workspace and test deployment. Trying export and compare on a real set of assistants and prompts showed that those cover import, compare, verify and the destination record: every failure the trial found shows up in an export or in an import to any deployment, and comparing the schema and model settings finds a bad copy without a live model call. The move between environments that #807 Export, import, compare, and verify prompts and assistants across LangSmith environments asks for still needs a second workspace and a second deployment, so the tests that make that move carry an #[ignore], and developers merge the tasks that add the second workspace and deployment before anyone archives the change. Developers add the second workspace and deployment before they archive the change in design.md gives the reasoning.
…pts and assistants
Add the OpenSpec change export-import-prompts-and-assistants: a new prompt
capability and assistant additions for writing a prompt commit or an
assistant to a file, recreating it in another workspace or deployment,
comparing a copy with the file, and checking that the copy can run.
The task list splits the work into one pull request per group.
#807 Export, import, compare, and verify prompts and assistants across LangSmith environments
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
codekiln
added
enhancement
New feature or request
wip
Not ready yet: an open PR short of the ready bar, or an issue an open PR closes
labels
Oct 13, 2026
The reason will be displayed to describe this comment to others. Learn more.
from AI(claude-code, claude-opus-5-5, langstar i807-transfer-proposal)
AI (codekiln-review): reviewed commit aeb831e docs(openspec): propose export, import, compare and verify for prompts and assistants. The inline comments are ranked by what each costs codekiln to read. The first four are claims the code contradicts: assistant commands cannot reach a GitHub-built deployment today, the SDK lacks the assistant version field and a graph ID search, prompt get cannot check a tag, and the provider names in verify do not match. The page My/AI/Review/Comment in codekiln/logseq-garden was read for calibration.
Findings on the pull request body
1.
This PR is the design only. It adds the OpenSpec change [...], which gives langstar prompt and langstar assistant four new subcommands: export, import, compare and verify.
followed by the tour of proposal.md, specs/, design.md, tasks.md and references/, and "openspec validate ... --strict passes."
Cost to the reader: codekiln reads the pull request narrating itself and a list of the files every OpenSpec change has, and learns what the commands do only from the file names. They marked "This pull request carries the proposal" as serving no purpose.
Refs [#807 Export, import, compare, and verify prompts and assistants across LangSmith environments](https://github.com/codekiln/langstar/issues/807)
This OpenSpec change designs four new subcommands for `langstar prompt` and `langstar assistant`. `export` writes a prompt or an assistant to a JSON file that can live in Git, `import` recreates it in another workspace or deployment, `compare` lists how a copy differs from the file, and `verify` checks that the copy has the secrets, graph and prompts it needs to run. Start with [design.md](https://github.com/codekiln/langstar/blob/aeb831e1e048a24a6c2c9ea7761d5131fc3ad2c2/openspec/changes/export-import-prompts-and-assistants/design.md) and its Open Questions, which hold the decisions below.
[export-import-prompts-and-assistants Task 1.2 Record what the live API returns](https://github.com/codekiln/langstar/blob/aeb831e1e048a24a6c2c9ea7761d5131fc3ad2c2/openspec/changes/export-import-prompts-and-assistants/tasks.md#L8) tries `invoke_prompt` against the live API before anyone builds on this.
[export-import-prompts-and-assistants Task 2.1 Add the destination workspace and the model provider key](https://github.com/codekiln/langstar/blob/aeb831e1e048a24a6c2c9ea7761d5131fc3ad2c2/openspec/changes/export-import-prompts-and-assistants/tasks.md#L12) waits on that key.
4. Factual.
Test environments: the tests need a second workspace in the test organization (LANGSTAR_TEST_DEST_WORKSPACE_ID) and one long-lived destination deployment that they reuse. codekiln has to create both.
Cost to the reader: the tasks say otherwise. tasks.md:12 has codekiln create the workspace and the model key, and tasks.md:13 has a fixture create the deployment; TestDeploymentConfig (sdk/src/test_utils.rs:46) finds or creates it by name prefix. codekiln is asked to set up a deployment nothing in the plan needs from them.
-**Test environments:** the tests need a second workspace in the test organization (`LANGSTAR_TEST_DEST_WORKSPACE_ID`), which codekiln has to create, and one destination deployment that the `TestDeploymentConfig` fixture creates on the first run and the tests reuse after that. Recommendation: set them up this way.
5.
langsmith-mcp-server: It has no export or copy tools to compare against.
Cost to the reader: codekiln holds a tool that has nothing to say about this change, to learn that it has nothing to say.
… on the transfer design
Add the SDK fields and the deployment URL fix the assistant commands
need (tasks 2.3 and 3.3), check a prompt tag through the commits
endpoint, match the model provider by class name and report a missing
saved model configuration as a note (Open Question 7), and turn topic
headings into decisions.
#807 Export, import, compare, and verify prompts and assistants across LangSmith environments
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This OpenSpec change designs four new subcommands for langstar prompt and langstar assistant. export writes a prompt or an assistant to a JSON file that can live in Git, import recreates it in another workspace or deployment, compare lists how a copy differs from the file, and verify checks that the copy has the secrets, graph and prompts it needs to run. Start with design.md and its Open Questions, which hold the decisions below.
4. The test environments bullet matches the tasks, and proposal.md's Impact and Open Question 5 now say the same:
Test environments: the tests need a second workspace in the test organization (LANGSTAR_TEST_DEST_WORKSPACE_ID), which codekiln has to create, and one destination deployment that the TestDeploymentConfig fixture creates on the first run and the tests reuse after that. Recommendation: set them up this way.
5. The langsmith-mcp-server bullet is cut.
Two sentences changed to follow the inline threads:
The Go CLI's push sends whatever JSON it reads as the manifest, so its own pull output reaches LangSmith wrapped in an envelope.
Langstar follows it and adds context, version, assistant_id, if_exists and a search by graph ID, which the langstar SDK lacks today.
One bullet is new under Decisions for codekiln, for Open Question 7:
Saved model configuration: a prompt runs without one, because its manifest carries the model, but the issue asks import to report a missing one. prompt verify reports a missing saved model configuration as a note that leaves the exit status alone. Recommendation: keep the note.
…data removals through import
Export now writes the commit description, and import sends it on each
commit it creates. With --update, prompt import also sets the destination
repo's description, readme, tags and visibility through
PATCH /api/v1/repos/{owner}/{repo}, and a repo-only difference updates the
repo without adding a commit. Assistant import sends each metadata key the
destination has and the file lacks with a null value, because the Agent
Server merges metadata on update, and reports any key that remains. Task
3.3 adds graph_id to UpdateAssistantRequest, task 3.4 adds the commit
description and repo update to the SDK, and task 4.1 tests sorted keys
with values built in different insertion orders.
#807 Export, import, compare, and verify prompts and assistants across LangSmith environments
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Issue #807 requires assistant import to check that the destination serves the graph and that referenced prompts exist. Those checks are specified only for assistant verify, so this import can create and report an assistant successfully even when it cannot run. Require import to perform the graph and prompt dependency checks, and cover both failures in the import tests.
Preserve selected source ref in exported assistant metadata
The design's file example includes source.ref, and issue #807 requires export to identify the source commit or tag, but this normative contract records only the resolved commit hash. An export made with --commit prod therefore loses the fact that prod was the selected source reference. Add the requested ref to source and assert it in export tests.
Run dependency verification during assistant import
Issue #807 requires import itself to check destination model/provider requirements and report missing credentials/configurations. This import path only creates and reads back the prompt; the secret and provider checks are reserved for the separate verify command, so an import can report success even when its dependencies are absent. Require import to run the relevant verification checks and add import tests for missing dependencies.
Include commit tags in comparison and update imports
A destination can have the same latest manifest while a file commit tag is missing or points to another commit. This scenario currently reports “unchanged” because neither this match condition nor prompt compare includes the exported commit-tag mappings, despite export/import treating them as part of the saved definition. Include commit tags in comparison and make import restore/move them under --update, with a drift test.
Start with design.md and its Open Questions, which hold the decisions below.
Cost to the reader: The link opens design.md at 828864d, before 7c26daa added the commit description, the repo update and the metadata removal. codekiln reads a design the branch no longer holds. The two Task links in the body point at aeb831e, where task 2.1 still reads as it did before the last round.
Rewrite: Start with design.md and its Open Questions, which hold the decisions below.
(Link the two Task references to the branch the same way.)
PR body, writing and factual.
langgraph SDK assistants: Langstar follows it and adds context, version, assistant_id, if_exists and a search by graph ID, which the langstar SDK lacks today.
Cost to the reader: "Follows it and adds" reads as if langstar goes beyond the LangGraph SDK. In fact langstar's SDK catches up to it. The list also leaves out graph_id on update, which task 3.3 adds and the assistant --update needs.
Rewrite:langgraph SDK assistants: Langstar's SDK gains the assistant fields that SDK already sends and langstar lacks today: context and version, assistant_id and if_exists on create, graph_id on update, and a search by graph ID.
…and order assistant compare before its record
Task 3.2 now moves a tag with PATCH /api/v1/repos/{owner}/{repo}/tags/{tag_name}, task 1.1 extracts that endpoint and the repo update, task 7.2 tests the warning that the destination changed since the last import, and tasks 9.1 and 9.2 add --assistant-id so assistant compare and verify can name an assistant before import exists. The manifest example uses the PromptPlayground id the upstream fixture holds, and design.md links tasks.md relatively.
#807 Export, import, compare, and verify prompts and assistants across LangSmith environments
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Start with design.md and its Open Questions, which hold the decisions below.
The Task 1.2 and Task 2.1 links now point at tasks.md on the i807-transfer-proposal branch too.
langgraph SDK assistants: Langstar's SDK gains the assistant fields that SDK already sends and langstar lacks today: context and version, assistant_id and if_exists on create, graph_id on update, and a search by graph ID.
Issue #807 requires assistant import to check the destination graph and referenced prompts, but this contract creates the assistant without the checks defined under assistant verify. A missing prompt can therefore still produce a successful import, while a missing graph may surface as a generic status-1 API error instead of a failed check/status 2. Require import to run the same graph and prompt checks and test both failures.
Define clearing semantics for omitted assistant fields
Exact replacement is still undefined for non-metadata fields that need clearing. The Agent Server response allows a null description and optional context, but AssistantPatch documents omitted fields as retaining their current value and does not allow null for description, config, or context. Thus importing a file with no description/context over an assistant that has them cannot satisfy this requirement or the read-back comparison. Extend the live API investigation to determine clearing semantics, then define normalization or a reported failure and test these cases.
Issue #807 requires import itself to check destination dependencies, but this import contract only creates and reads back the prompt; the secret/provider checks are exclusive to prompt verify. As written, import can report success even when a required credential is absent. Require import to run the same dependency checks (while preserving the decision that a missing saved model configuration is only a note) and cover these checks in import tests.
Require distinct destination deployments in transfer tests
get_or_create_deployment falls back to reusing a deployment with the same repository and config_path (sdk/src/test_utils.rs:421-457), because the control plane permits only one deployment for that agent environment. A destination fixture that merely uses another name/prefix will therefore return the source deployment (or hit a 409), so these tests would not exercise cross-deployment transfer. Require a distinct graph config path/agent environment and assert that the source and destination deployment IDs differ.
…yment's url
The assistant spec said a deployment without source_config.custom_url
fails, which task 2.3 changes. Add a MODIFIED requirement that sends
assistant requests to the control plane's top-level url, falling back to
custom_url, and align task 2.3, the design risk and the proposal.
#807 Export, import, compare, and verify prompts and assistants across LangSmith environments
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The reason will be displayed to describe this comment to others. Learn more.
🟡 Changes recommended
Verification tasks still depend on optional setup, and the design claims local-server import support that the proposed deployment-only CLI cannot provide.
…ond one exists
Copilot pointed out that the tasks called the second workspace and
deployment optional while task 3.3 needed the destination fixture from
2.4, and task 7.3 read LANGSTAR_TEST_DEST_WORKSPACE_ID, which only 2.1
sets. Until those tasks merge, the destination workspace and deployment
are the existing test ones. The graph moves in 3.3 and 10.2 and the
destination-only prompt in 9.2 carry an ignore naming the task that adds
their environment, and the structured output script takes the workspace
ID the import test used.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… import target
Copilot pointed out that --deployment resolves a name or ID only through
the control plane's deployment list (resolve_deployment_url in
cli/src/deployment_utils.rs), so the proposed commands cannot reach a
local langgraph dev server. Nothing else in the change depends on one, so
the design drops the claim and lists a server the control plane does not
list as a non-goal.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e change is archived
#807 asks the assistant tests to create an assistant on a separate
deployment and to exercise an assistant whose prompts were imported into a
separate workspace. The design made tasks 2.1, 2.3 and 2.4 optional, so the
change could be archived with those tests still ignored.
Developers still build and run everything in one workspace and deployment.
Tasks 2.1, 2.3 and 2.4 now merge before the archive, each removes the
`#[ignore]` from the tests that waited for it, and the archiving pull
request links a CI run in which they passed. A 409 from the control plane
in 2.3 goes to codekiln as a decision.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…n act
The pr-language-review skill found documents and tasks doing the verbs:
"the design made tasks optional", "those tasks land", "they merge", "a 409
goes to codekiln". Developers merge the tasks, the control plane answers
with a 409, and codekiln decides.
Also drops the coined "unignore" from the Workflow follow-up and splits the
409 clause out of the sentence it was knotted into.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…e heading
The decision said "tasks 2.1, 2.3 and 2.4" with no link and no title, which
costs a reader a trip into tasks.md to learn what they add. Each one now
carries the link and the task title the rest of design.md uses.
The heading was a sentence long enough to read twice. It now says what
developers do: add the second workspace and deployment before they archive
the change.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
"those tasks land", "they merge", "a 409 goes to codekiln as a decision" named no one who could do the verb. Developers merge the tasks, the control plane answers with a 409, and codekiln decides what the assistant tests run against. My/Pref/Writing/Give every sentence a subject that can do its verb
The Security Audit job is red on this branch, on main, and on every other open branch, because cargo audit flags rustls-webpki 0.103.15 and webpki-roots 1.0.9. #829 🔧 build(deps): update rustls-webpki and webpki-roots to clear RUSTSEC-2026-0381 and 0382 bumps both against main. Once it merges, a merge from main turns this branch's audit green; nothing in this branch touches it.
…reader who has not read the LangSmith API
codekiln read three paragraphs and could not tell what they were saying.
The verify section now opens with the question a user has after an import —
will the copy run here — and then says what verify asks the destination and
what it prints. Each API call arrives after the sentence that says why
langstar makes it. The assistant graph check explains that every graph a
deployment serves has a default assistant, so an empty search answer means
the deployment does not serve the graph; the 422 paragraph says the server
may refuse an unknown graph ID instead of answering with nothing.
The import section now says what import does — run verify's checks before
it creates anything — and gives the cleanup it saves afterwards.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
A newer Agent Server refuses to create an assistant that sets both
config.configurable and context, while every read returns both. Import
now sends configurable alone when the two match, the one present when
only one is, and stops with status 1 when they differ.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A read of an assistant returns its settings twice, in config.configurable and in context. A newer Agent Server refuses a create that sets both, with status 400 and Cannot specify both configurable and context. That happened in a trial copy of assistants to a deployment running a newer server. Sending configurable alone worked there, and the server filled in context itself.
Same values in both fields: import sends configurable alone.
Only one field: import sends that one.
Different values: import writes nothing and exits with status 1.
Task 1.2 now also records how the server treats both fields on create and update. Tasks 10.1 and 10.2 have a test for each case. openspec validate export-import-prompts-and-assistants --strict passes.
The reason will be displayed to describe this comment to others. Learn more.
🔵 Needs a closer look
Human assessment is needed because equivalent settings aliases can cause correctly copied assistants to report failure on repeated imports, even with --update.
…ln marked
Same sweep as the verify and import-check sections, across the remaining
decisions.
The destination-record decision opened with the reason for a separate file
instead of saying what import writes. The exit-status decision opened with a
sentence that had to be read twice and ended in "neither success nor a
broken run". The prompt-reference decision said the same thing in its first
two sentences. The one-field heading read "in one field, never in both".
The compare decision and the structured-output script were each one
paragraph long enough to lose a reader; both are split by what they cover.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
compare, verify and import exit with 3 when they find a difference opened with "Langstar exits today only with 0, with 1 from main ... and with clap's 2, so 3 is the first status that means neither success nor a broken run". It now says status 3 is new, lists what langstar already uses, and gives each status its own sentence. The clap paragraph stands on its own.
Smaller rewrites: "replaces with <redacted> every string that export's credential check flags" read backwards; "A trial copy ... did exactly this" pointed back instead of saying what the trial sent; the goals bullet said "it finds its earlier copy" with the subject a sentence away.
The reason will be displayed to describe this comment to others. Learn more.
🟡 Changes recommended
Config-only assistant imports can succeed but fail read-back comparison because settings mirrored from config.configurable into context are not treated as equivalent.
…d holds them
A file that holds settings in config.configurable alone imported cleanly
and then failed its own read-back: the Agent Server fills context from
configurable, so the comparison found a context the file lacked and import
exited with status 3. The same happened the other way round for a file that
holds only context.
Compare and the read-back now take the file's settings from whichever field
the file holds and the destination's from whichever the server returned,
and a field one side lacks is no difference.
--update no longer sends an empty context beside a config.configurable.
That would be refused by a newer server, or would wipe out the settings the
server had just filled in. Import clears context only for a file that holds
settings in neither field.
New requirements and scenarios in specs/assistant for both rules, and tests
in tasks 10.1 and 10.2 for a config-only file's round trip and for an
--update that leaves the field it did not send alone.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The reason will be displayed to describe this comment to others. Learn more.
🟡 Changes recommended
Short Basic credentials can evade detection and redaction, exposing secrets in Git exports, while configuration alias comparisons can produce false import mismatches.
…s alias in the shared comparison
Copilot found two holes.
The credential check asked for at least 16 base64 characters after
`Basic `, and `Basic dXNlcjpwYXNz` carries twelve and decodes to
`user:pass`. Under a key the name rule ignores, export would have written
it to Git. The check now decodes the payload and flags it when the result
is printable text with a colon in it, however short. `Basic instructions
follow.` still passes, because its payload decodes to nothing readable.
The settings alias lived in the assistant spec, while task 4.2's shared
comparison still compared every key under `assistant`, so a one-field file
would have been reported as a difference after all. Task 4.2 now reads
`config.configurable` and `context` as one value and compares every other
key under `config` as it stands, with tests for both single-field files and
for a changed `config.recursion_limit`.
Also a repeated-import test for each single-field file, and the matching
scenario in specs/assistant.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The reason will be displayed to describe this comment to others. Learn more.
🟡 Changes recommended
The recovery rule could publish a private prompt to a public destination; import must refuse before upload without --update and make the repository private before pushing with it.
Copilot found an exposure in the recovery path. When an earlier import left
a repo with no commit and that repo is public, while the file says the
prompt is private, import pushed the manifest and reported the visibility
difference afterwards. By then the prompt's text was public, and no report
takes that back.
Import now pushes nothing in that case without --update, reports
/repo/is_public and exits with status 3. With --update it makes the repo
private before it pushes. The same holds for a repo someone else made.
New requirement and scenarios in specs/prompt, and tests in tasks 7.1
and 7.2.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
documentationImprovements or additions to documentationenhancementNew feature or requestpriority: mediumReview after high: bug fixes and features with no open decision
2 participants
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
from AI(claude-code, claude-opus-5-5, langstar i807-transfer-proposal)
Refs #807 Export, import, compare, and verify prompts and assistants across LangSmith environments
With this change, a user can move a prompt or an assistant to another LangSmith workspace or deployment through a JSON file kept in Git, using four new subcommands of
langstar promptandlangstar assistant:exportwrites the file,importrecreates the prompt or assistant from it,comparelists how a copy differs from the file, andverifychecks that the copy has the secrets, graph and prompts it needs to run. Start with design.md.Where langstar differs from the upstream references
prompt pull/push: Langstar's export asks for the model withinclude=model; the Go CLI's pull leaves the model out. Langstar's import reads the file that export writes. The Go CLI's push sends whatever JSON it reads as the manifest, so its own pull output reaches LangSmith wrapped in an envelope.--workspaceflag,LANGSMITH_WORKSPACE_ID,LANGSMITH_TENANT_IDor its profile, whichever comes first. Langstar's import requires--workspace-idand never falls back toLANGSMITH_WORKSPACE_ID, so langstar imports into the workspace the user typed.pull_prompt_commit: The Python SDK sends the deprecatedinclude_model=true. Langstar sendsinclude=model, which the Go SDK uses. The OpenAPI spec accepts both.contexton create, update and read,versionon read,graph_idon update, a search filtered by graph ID, andassistant_idandif_existson create. With those last two, an import that stopped right after creating an assistant sends the same create again and gets that assistant back.Is there an API that runs a prompt's model?
There is no documented one. The only invoke endpoint in the LangSmith OpenAPI spec (
reference/openapi/langchain/langsmith/openapi.json) isPOST /api/v1/prompts/invoke_prompt. Its body,InvokePromptPayload, holds onlymessages,template_formatandinputs. It has no field for a model or an output schema, and the spec gives no shape for its response. No upstream SDK or CLI clone calls it. The playground endpoints in the spec (/api/v1/playground-settings) only store model configurations. In export-import-prompts-and-assistants Task 1.2 Record what the live API returns, a developer callsinvoke_prompton the live API before anyone builds on this.Credentials in export files
Export writes no file when a prompt or assistant holds a credential, because a secret pushed to Git stays in the repository's history. It checks every string it would write for a key name such as
api_key,token,password,secretorAuthorization, and for a value shaped like a bearer token, a private key, a URL or connection string with a password, a JSON Web Token or a provider's API key. Export names the path of each flagged string and exits with status 1. A user who has read a flagged string and found it harmless passes--not-a-secret <json-pointer>to write it. Compare, verify and import print<redacted>in place of the same strings. Export refuses to write a file that holds a credential in design.md gives the full rules.SDK release
Developers commit the new SDK fields as
✨ feat(sdk)with noBREAKING CHANGE:footer, so the Prepare Release workflow makes the next release a minor version. That is what the release docs ask for:docs/dev/git-scm-conventions.mdgivesfeata minor bump, anddocs/dev/procedures.mdcounts a changed signature or a removed field as a breaking SDK change. #726 ✨ feat(assistant): add description field support from Agent Server API addedAssistant.descriptionthe same way, and langstar released it in v2.2.0. design.md's decision on the SDK release has the citations.Test environments
Developers build and run the tests in the existing test workspace and test deployment. Trying export and compare on a real set of assistants and prompts showed that those cover import, compare, verify and the destination record: every failure the trial found shows up in an export or in an import to any deployment, and comparing the schema and model settings finds a bad copy without a live model call. The move between environments that #807 Export, import, compare, and verify prompts and assistants across LangSmith environments asks for still needs a second workspace and a second deployment, so the tests that make that move carry an
#[ignore], and developers merge the tasks that add the second workspace and deployment before anyone archives the change. Developers add the second workspace and deployment before they archive the change in design.md gives the reasoning.Decisions for codekiln
None.
design.mdhas no open questions.🤖 Generated with Claude Code