Skip to content

LangGraph TypeScript engine: a Claude plan's query is named per organization too - #1898

Open
davidmckayv wants to merge 1 commit into
mainfrom
feat/one-org-engines
Open

davidmckayv wants to merge 1 commit into
mainfrom
feat/one-org-engines

Conversation

@davidmckayv

Copy link
Copy Markdown
Contributor

One Claude engine serves every organization of an OpenBot. The LangGraph TypeScript engine named a Claude plan's query by (Bot, thread) alone, so the same thread id for a Bot of the same id in two organizations went to one query: one transcript and one set of turns for both.

What changes

  • The engine reads the run's organization from forwardedProps.openbotOrganization when the server sends one.
  • claudeThreadId(botId, threadId, organization?) joins the organization to the query's name.
  • With no organization the name is exactly the one it always was, so a thread that already has a query keeps it. A server that sends no organization (every OpenBot today, and the organization every OpenBot starts with) sees no change.
  • The organization is not sent on to the Claude engine.

Tests

agent-langgraph-ts/test/claude-plan.test.ts: "The same thread in two organizations is two Claude queries; with no organization the name is unchanged". Runs the engine over HTTP against a recorded Claude engine: the same thread id in org-a and org-b reaches /model under two different query names, and a run with no organization reaches it under the name the earlier test pins. Fails before the change (both organizations share one name), passes after.

npm test in agent-langgraph-ts: 63 passed, 1 skipped (the live test). npm run typecheck clean.

…ization too

One Claude engine serves every organization of an OpenBot. The engine named a Claude plan's query by (Bot, thread) alone, so the same thread id for a Bot of the same id in two organizations went to one query: one transcript and one set of turns for both.

The server now names the run's organization in forwardedProps.openbotOrganization, and the engine joins it to the query's name. A run with no organization keeps the name it always had, so a thread that already has a query keeps it.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant