@@ -20,6 +20,7 @@ import type { BaseChatModel } from '@langchain/core/language_models/chat_models'
2020import type { BaseMessage } from '@langchain/core/messages' ;
2121import { HumanMessage , SystemMessage } from '@langchain/core/messages' ;
2222import type { Embeddings } from '@langchain/core/embeddings' ;
23+ import { AgentToolProtocolServer } from '@mondaydotcomorg/atp-server' ;
2324
2425/**
2526 * Approval request that needs human decision
@@ -44,8 +45,10 @@ export interface ApprovalResponse {
4445 * Options for creating the LangGraph ATP client
4546 */
4647export interface LangGraphATPClientOptions {
47- /** Base URL of ATP server */
48- serverUrl : string ;
48+ /** ATP server instance */
49+ server ?: AgentToolProtocolServer ;
50+ /** Base URL of ATP server used for http server (not inProcess) */
51+ serverUrl ?: string ;
4952 /** Custom headers for authentication (e.g., { Authorization: 'Bearer token' }) */
5053 headers ?: Record < string , string > ;
5154 /** LangChain LLM for atp.llm.call() sampling */
@@ -121,6 +124,7 @@ export class LangGraphATPClient {
121124
122125 constructor ( options : LangGraphATPClientOptions ) {
123126 const {
127+ server,
124128 serverUrl,
125129 headers,
126130 llm,
@@ -132,7 +136,8 @@ export class LangGraphATPClient {
132136 } = options ;
133137
134138 this . client = new AgentToolProtocolClient ( {
135- baseUrl : serverUrl ,
139+ server,
140+ baseUrl : serverUrl ,
136141 headers,
137142 hooks,
138143 serviceProviders : tools ? { tools } : undefined ,
0 commit comments