속성
projectId
projectId: string
settings
settings: object
attributes
이 클라이언트가 생성하는 모든 트레이스에 적용되는 속성 맵입니다.readonlyattributes:Record<string,any>
genai
readonlygenai:object
genai.batchOptions
optionalbatchOptions:BufferConfig
BatchSpanProcessor 설정입니다. spanProcessor === 'batch'가 아니면 무시됩니다.
genai.spanProcessor
GenAI span을 내보내는 방식입니다.optionalspanProcessor:"batch"|"simple"|SpanProcessor
'batch'(기본값):BatchSpanProcessor로, 프로덕션 에이전트와 장기 실행 프로세스에 적합합니다.'simple':SimpleSpanProcessor로, span마다 HTTP POST를 한 번씩 전송합니다. 처리량보다 결정적인 플러시가 더 중요한 테스트나 단기 실행 CLI에 유용합니다.SpanProcessor인스턴스: 사용자가 직접 제공하는 프로세서입니다. 라이프사이클은 호출자가 직접 관리하며,/agents/otel/v1/traces로 전송하는 Weave OTLP 익스포터는 사용되지 않습니다.
printCallLink
op에 대한 Weave UI 링크를 터미널에 출력합니다.readonlyprintCallLink:boolean
기본값
true
useCallsComplete
useCallsComplete: boolean
완료된 Call을 기존 call/upsert_batch 경로 대신 calls/complete 엔드포인트로 전송합니다(start와 end는 클라이언트 측에서 페어링).
기본값
true
useOTelV2
useOTelV2: boolean
OTel을 지원하는 인테그레이션을 해당 OTel 변형으로 라우팅합니다.
기본값
true
traceServerApi
traceServerApi:Api<any>
메서드
addScore()
addScore(Call에 Scorer 결과(예: Scorer 출력)를 추가합니다. 명령형 Evaluation에서 예측 Call에 Scorer 결과를 연결하는 데 사용합니다.predictCallId,scorerCallId,runnableRefUri,scorerOutput):Promise<string>
Parameters
string
필수
feedback를 attach할 predict call의 ID
string
필수
feedback를 생성한 scorer call의 ID
string
필수
Scorer의 URI(Op 또는 Object ref)
any
필수
Scorer의 출력
반환값
Promise<string>
createCall()
createCall(internalCall,opRef,params,parameterNames,thisArg,currentCall,parentCall,startTime,displayName?,attributes?,eagerCallStart?):Promise<void>
매개변수
InternalCall
필수
any
필수
any[]
필수
undefined | "useParam0Object" | string[]
필수
any
필수
object
필수
{…} | undefined
필수
전체 유형:
{ callId: string; childSummary: Record<string, any>; displayName?: string; opName?: string; traceId: string; } | undefinedDate
필수
string
Record<string, any>
boolean = false
반환값
Promise<void>
finishCall()
finishCall(call,result,currentCall,parentCall,summarize,endTime,startCallPromise):Promise<void>
매개변수
InternalCall
필수
any
필수
object
필수
{…} | undefined
필수
전체 유형:
{ callId: string; childSummary: Record<string, any>; displayName?: string; opName?: string; traceId: string; } | undefined((result) => Record<string, any>) | undefined
필수
Date
필수
Promise<void>
필수
반환값
Promise<void>
finishCallWithException()
finishCallWithException(call,error,currentCall,parentCall,endTime,startCallPromise):Promise<void>
매개변수
InternalCall
필수
any
필수
object
필수
{…} | undefined
필수
전체 유형:
{ callId: string; childSummary: Record<string, any>; displayName?: string; opName?: string; traceId: string; } | undefinedDate
필수
Promise<void>
필수
반환값
Promise<void>
flush()
flush():버퍼에 저장된 모든 Call을 server로 전송합니다.Promise<void>
process.exit() 전에 await하세요.
반환값
Promise<void>
get()
get(ref):Promise<any>
Parameters
반환값
Promise<any>
getAgentCustomAttributes()
getAgentCustomAttributes(프로젝트의 에이전트 span에서 관찰된 유형 지정 맞춤형 속성 키를 조회합니다. 각 결과 행은 하나의options):Promise<Response<{attributes?:object[];has_more?:boolean;limit?:number;offset?:number; }>>
(source, key, value_type) 트리플과 해당 속성을 포함하는 span 수로 구성됩니다. span 쿼리/그룹/통계 API는 이를 사용하여 맞춤형 속성을 참조합니다.
query(구조화된 span 필터), startedAfter / startedBefore(ISO-8601) 또는 둘 다를 전달하여 대상 span을 필터링합니다. limit / offset을 사용하여 조회된 키를 페이지 단위로 가져옵니다.
매개변수
object
필수
반환값
Promise<Response<{ attributes?: object[]; has_more?: boolean; limit?: number; offset?: number; }>>
예시
getAgents()
getAgents(집계 통계와 함께 에이전트 목록을 조회합니다.options?):Promise<Response<GetAgentsResult>>
매개변수
GetAgentsOptions = {}
GetAgentsOptions를 참조하세요.반환값
Promise<Response<GetAgentsResult>>
예시
getAgentSpans()
getAgentSpans(에이전트 이름 및/또는 Mongo 스타일 쿼리 표현식으로 선택적으로 필터링된 에이전트 span을 쿼리합니다.options):Promise<Response<GetAgentSpansResult>>
매개변수
GetAgentSpansOptions
필수
GetAgentSpansOptions를 참조하세요.반환값
Promise<Response<GetAgentSpansResult>>
예시
getAgentSpanStats()
getAgentSpanStats(프로젝트의 에이전트 span에 대한 집계 결과를 시계열 / 버킷 기반 시각화에 적합한 행 + 열 메타데이터 형식으로 반환합니다.options):Promise<Response<{bucket_type?:"number"|"time";columns?:object[];end:string;granularity?:number|null;rows?:Record<string,string|number|boolean|null>[];start:string;timezone:string; }>>
start(필수)와 end는 시간 범위를 정의합니다. metrics의 각 항목은
추출할 필드와 집계 방법(sum,
avg, count, 백분위수 등)을 지정합니다. 시간별로 행을 버킷화하려면
granularity(초)를 전달하고, 에이전트 /
공급자 / 모델 / 기타 기준으로 결과를 분류하려면 groupBy를 사용합니다. query는
집계 전에 원본 span을 필터링합니다.
매개변수
object
필수
반환값
Promise<Response<{ bucket_type?: "number" | "time"; columns?: object[]; end: string; granularity?: number | null; rows?: Record<string, string | number | boolean | null>[]; start: string; timezone: string; }>>
예시
getAgentTurn()
getAgentTurn(traceId로 단일 turn의 데이터(메시지 포함)를 조회합니다.options):Promise<Response<{agent_name?:string|null;agent_version?:string|null;feedback?:Record<string,any>[] |null;messages?:object[];provider?:string|null;root_span_name?:string|null;status_code?:"UNSET"|"OK"|"ERROR"|null;total_cost_usd?:number|null;total_duration_ms?:number|null;trace_id:string; }>>
매개변수
GetAgentTurnOptions
필수
GetAgentTurnOptions를 참조하세요.반환값
Promise<Response<{ agent_name?: string | null; agent_version?: string | null; feedback?: Record<string, any>[] | null; messages?: object[]; provider?: string | null; root_span_name?: string | null; status_code?: "UNSET" | "OK" | "ERROR" | null; total_cost_usd?: number | null; total_duration_ms?: number | null; trace_id: string; }>>
예시
getAgentTurns()
getAgentTurns(options):Promise<Response<GetAgentTurnsResult>>
conversationId별 여러 턴의 데이터(메시지 포함)를 조회합니다.
매개변수
GetAgentTurnsOptions
필수
GetAgentTurnsOptions를 참조하세요.반환값
Promise<Response<GetAgentTurnsResult>>
예시
getAgentVersions()
getAgentVersions(지정된 에이전트의 버전 목록을 반환합니다.options):Promise<Response<GetAgentVersionsResult>>
매개변수
GetAgentVersionsOptions
필수
GetAgentVersionsOptions를 참조하세요.반환값
Promise<Response<GetAgentVersionsResult>>
예시
getCall()
getCall(callId,includeCosts?):Promise<{attributes:Record<string,any>;deleted_at?:string|null;display_name?:string|null;ended_at?:string|null;exception?:string|null;expire_at?:string|null;id:string;inputs:Record<string,any>;op_name:string;output?:null;parent_id?:string|null;project_id:string;started_at:string;storage_size_bytes?:number|null;summary?:Record<string,any>;thread_id?:string|null;total_storage_size_bytes?:number|null;trace_id:string;turn_id?:string|null;wb_run_id?:string|null;wb_run_step?:number|null;wb_run_step_end?:number|null;wb_user_id?:string|null;wb_username?:string|null;setDisplayName:Promise<void>; }>
매개변수
string
필수
boolean = false
반환값
Promise<{ attributes: Record<string, any>; deleted_at?: string | null; display_name?: string | null; ended_at?: string | null; exception?: string | null; expire_at?: string | null; id: string; inputs: Record<string, any>; op_name: string; output?: null; parent_id?: string | null; project_id: string; started_at: string; storage_size_bytes?: number | null; summary?: Record<string, any>; thread_id?: string | null; total_storage_size_bytes?: number | null; trace_id: string; turn_id?: string | null; wb_run_id?: string | null; wb_run_step?: number | null; wb_run_step_end?: number | null; wb_user_id?: string | null; wb_username?: string | null; setDisplayName: Promise<void>; }>
getCalls()
Call 시그니처
getCalls(options?):Promise<object[]>
매개변수
GetCallsOptions
GetCallsOptions를 참조하세요.반환값
Promise<object[]>
Call 시그니처
getCalls(options?,includeCosts?,limit?):Promise<object[]>
매개변수
CallsFilter
CallsFilter를 참조하세요.boolean
number
반환값
Promise<object[]>
getCallsIterator()
Call 시그니처
getCallsIterator(options?,includeCosts?,limit?):AsyncIterableIterator<CallSchema>
매개변수
CallsFilter
CallsFilter를 참조하세요.boolean
number
반환값
AsyncIterableIterator<CallSchema>
Call 시그니처
getCallsIterator(options?):AsyncIterableIterator<CallSchema>
매개변수
GetCallsOptions
GetCallsOptions를 참조하세요.반환값
AsyncIterableIterator<CallSchema>
getCallStack()
getCallStack(): CallStack
반환값
CallStack
getCurrentAttributes()
getCurrentAttributes():Record<string,any>
반환값
Record<string, any>
linkPromptToRegistry()
linkPromptToRegistry(게시된 프롬프트 버전을 레지스트리 포트폴리오에 연결합니다.prompt,options):Promise<{version_index:number|null; }>
매개변수
object
필수
반환값
Promise<{ version_index: number | null; }>
pendingCallCount()
pendingCallCount(): number
클라이언트 측에 버퍼링되었지만 아직 server로 전송되지 않은 Call입니다.
반환값
number
publish()
publish(obj,objId?):Promise<ObjectRef>
매개변수
any
필수
string
반환값
Promise<ObjectRef>
pushNewCall()
pushNewCall(): object
반환값
object
object
필수
currentCall.callId
callId: string
currentCall.childSummary
childSummary:Record<string,any>
currentCall.displayName
optionaldisplayName:string
currentCall.opName
optionalopName:string
currentCall.traceId
traceId: string
CallStack
필수
object
parentCall.callId
callId: string
parentCall.childSummary
childSummary:Record<string,any>
parentCall.displayName
optionaldisplayName:string
parentCall.opName
optionalopName:string
parentCall.traceId
traceId: string
registerCustomRuntime()
registerCustomRuntime(맞춤형 런타임을 등록합니다. 이미 존재하는 경우 전체 설정을 대체합니다.options):Promise<Response<{api_key_secret:string|null;base_url:string;headers:Record<string,string>;name:string;runtime_ids:object[]; }>>
매개변수
RegisterCustomRuntimeOptions
필수
RegisterCustomRuntimeOptions를 참조하세요.반환값
Promise<Response<{ api_key_secret: string | null; base_url: string; headers: Record<string, string>; name: string; runtime_ids: object[]; }>>
runWithAttributes()
runWithAttributes<T>(attributes,fn):T
유형 매개변수
매개변수
Record<string, any>
필수
() => T
필수
반환값
T
runWithCallStack()
runWithCallStack<T>(callStack,fn):T
유형 매개변수
매개변수
CallStack
필수
() => T
필수
반환값
T
saveCallEnd()
saveCallEnd(callEnd):void
매개변수
object & object
필수
반환값
void
saveCallStart()
saveCallStart(callStart,opts?):void
매개변수
object
필수
object
반환값
void
saveOp()
saveOp(op,objId?):Promise<OpRef>
매개변수
string
반환값
Promise<OpRef>
searchAgents()
searchAgents(프로젝트 내 에이전트 메시지 전체에서 전문 검색을 수행합니다. 결과는 대화별로 그룹화되며, 일치하는 각 메시지의 미리보기가 포함됩니다.options):Promise<Response<{results:object[];total_conversations?:number; }>>
query는 전문 검색어입니다. 텍스트 일치 없이 구조화된 필터(agentName,
conversationId, traceId)에 일치하는 모든 메시지를 검색하려면 빈 문자열을 전달하세요. limit /
offset을 사용하여 결과를 페이지 단위로 조회하세요.
매개변수
object
필수
반환값
Promise<Response<{ results: object[]; total_conversations?: number; }>>
예시
serializeAudio()
serializeAudio(원시 오디오 바이트를 Weave 콘텐츠 저장소에 업로드하고 Call 출력에 포함할 수 있는data,audioType?):Promise<{_type:"CustomWeaveType";files:Record<string,string>;load_op:string;weave_type: {type:string; }; }>
CustomWeaveType 자리 표시자를 반환합니다.
finishCall의 자동 직렬화 파이프라인을 사용하지 않고(예: saveCallEnd를 통해)
Call 출력을 수동으로 구축할 때 사용하세요.
매개변수
Buffer
필수
원시 오디오 바이트(브라우저 호환성을 위해 WAV 권장)
"wav" = DEFAULT_AUDIO_TYPE
파일 형식 — 현재 ‘wav’만 지원됩니다
반환값
Promise<{ _type: "CustomWeaveType"; files: Record<string, string>; load_op: string; weave_type: { type: string; }; }>
updateCall()
updateCall(callId,displayName):Promise<void>
매개변수
string
필수
string
필수
반환값
Promise<void>
waitForBatchProcessing()
waitForBatchProcessing():Promise<void>
반환값
Promise<void>