> ## Documentation Index
> Fetch the complete documentation index at: https://wb-21fd5541-sa-registry-access.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# クラス: WeaveClient

> TypeScript SDK リファレンス

[weave](../) / WeaveClient

<div id="table-of-contents">
  ## 目次
</div>

<div id="constructors">
  ### コンストラクタ
</div>

* [コンストラクタ](./weaveclient#constructor)

<div id="properties">
  ### プロパティ
</div>

* [projectId](./weaveclient#projectid)
* [settings](./weaveclient#settings)
* [traceServerApi](./weaveclient#traceserverapi)

<div id="methods">
  ### メソッド
</div>

* [addScore](./weaveclient#addscore)
* [createCall](./weaveclient#createcall)
* [finishCall](./weaveclient#finishcall)
* [finishCallWithException](./weaveclient#finishcallwithexception)
* [get](./weaveclient#get)
* [getAgentCustomAttributes](./weaveclient#getagentcustomattributes)
* [getAgentSpanStats](./weaveclient#getagentspanstats)
* [getAgentSpans](./weaveclient#getagentspans)
* [getAgentTurn](./weaveclient#getagentturn)
* [getAgentTurns](./weaveclient#getagentturns)
* [getAgentVersions](./weaveclient#getagentversions)
* [getAgents](./weaveclient#getagents)
* [getCall](./weaveclient#getcall)
* [getCallStack](./weaveclient#getcallstack)
* [getCalls](./weaveclient#getcalls)
* [getCallsIterator](./weaveclient#getcallsiterator)
* [getCurrentAttributes](./weaveclient#getcurrentattributes)
* [linkPromptToRegistry](./weaveclient#linkprompttoregistry)
* [publish](./weaveclient#publish)
* [pushNewCall](./weaveclient#pushnewcall)
* [runWithAttributes](./weaveclient#runwithattributes)
* [runWithCallStack](./weaveclient#runwithcallstack)
* [saveCallEnd](./weaveclient#savecallend)
* [saveCallStart](./weaveclient#savecallstart)
* [saveOp](./weaveclient#saveop)
* [searchAgents](./weaveclient#searchagents)
* [serializeAudio](./weaveclient#serializeaudio)
* [updateCall](./weaveclient#updatecall)
* [waitForBatchProcessing](./weaveclient#waitforbatchprocessing)

## コンストラクタ

<div id="constructors">
  ### コンストラクタ
</div>

• **new WeaveClient**(`«destructured»`): [`WeaveClient`](./weaveclient)

<div id="parameters">
  #### パラメーター
</div>

| 名                  | タイプ                                    |
| :----------------- | :------------------------------------- |
| `«destructured»`   | `Object`                               |
| › `projectId`      | `string`                               |
| › `settings?`      | `Partial`\<[`Settings`](../#settings)> |
| › `traceServerApi` | `Api`\<`any`>                          |

<div id="returns">
  #### 戻り値
</div>

[`WeaveClient`](./weaveclient)

<div id="defined-in">
  #### 定義箇所
</div>

[src/weaveClient.ts:459](https://github.com/wandb/weave/blob/9591aba8a5e77309ee0858e5ba94d31c1bd7e404/sdks/node/src/weaveClient.ts#L459)

## プロパティ

<div id="projectid">
  ### projectId
</div>

• **projectId**: `string`

<div id="defined-in">
  #### 定義箇所
</div>

[src/weaveClient.ts:456](https://github.com/wandb/weave/blob/9591aba8a5e77309ee0858e5ba94d31c1bd7e404/sdks/node/src/weaveClient.ts#L456)

***

<div id="settings">
  ### settings
</div>

• **settings**: [`Settings`](../#settings)

<div id="defined-in">
  #### 定義箇所
</div>

[src/weaveClient.ts:457](https://github.com/wandb/weave/blob/9591aba8a5e77309ee0858e5ba94d31c1bd7e404/sdks/node/src/weaveClient.ts#L457)

***

<div id="traceserverapi">
  ### traceServerApi
</div>

• **traceServerApi**: `Api`\<`any`>

<div id="defined-in">
  #### 定義箇所
</div>

[src/weaveClient.ts:455](https://github.com/wandb/weave/blob/9591aba8a5e77309ee0858e5ba94d31c1bd7e404/sdks/node/src/weaveClient.ts#L455)

## メソッド

<div id="addscore">
  ### addScore
</div>

▸ **addScore**(`predictCallId`, `scorerCallId`, `runnableRefUri`, `scorerOutput`): `Promise`\<`string`>

call に scorer の結果 (例: scorer output) を追加します。
命令型評価で、predict call に scorer の結果を関連付けるために使用します。

<div id="parameters">
  #### パラメーター
</div>

| 名                | タイプ      | 説明                                |
| :--------------- | :------- | :-------------------------------- |
| `predictCallId`  | `string` | フィードバックの関連付け先となる predict call のID |
| `scorerCallId`   | `string` | フィードバックを生成した scorer call のID      |
| `runnableRefUri` | `string` | scorer (Op または Object ref) のURI   |
| `scorerOutput`   | `any`    | scorerの出力                         |

<div id="returns">
  #### 戻り値
</div>

`Promise`\<`string`>

<div id="defined-in">
  #### 定義箇所
</div>

[src/weaveClient.ts:1727](https://github.com/wandb/weave/blob/9591aba8a5e77309ee0858e5ba94d31c1bd7e404/sdks/node/src/weaveClient.ts#L1727)

***

<div id="createcall">
  ### createCall
</div>

▸ **createCall**(`internalCall`, `opRef`, `params`, `parameterNames`, `thisArg`, `currentCall`, `parentCall`, `startTime`, `displayName?`, `attributes?`): `Promise`\<`void`>

<div id="parameters">
  #### パラメーター
</div>

| 名                | タイプ                        |                  |
| :--------------- | :------------------------- | ---------------- |
| `internalCall`   | `InternalCall`             |                  |
| `opRef`          | `any`                      |                  |
| `params`         | `any`\[]                   |                  |
| `parameterNames` | `ParameterNamesOption`     |                  |
| `thisArg`        | `any`                      |                  |
| `currentCall`    | `CallStackEntry`           |                  |
| `parentCall`     | `undefined`                | `CallStackEntry` |
| `startTime`      | `Date`                     |                  |
| `displayName?`   | `string`                   |                  |
| `attributes?`    | `Record`\<`string`, `any`> |                  |

<div id="returns">
  #### 戻り値
</div>

`Promise`\<`void`>

<div id="defined-in">
  #### 定義箇所
</div>

[src/weaveClient.ts:1570](https://github.com/wandb/weave/blob/9591aba8a5e77309ee0858e5ba94d31c1bd7e404/sdks/node/src/weaveClient.ts#L1570)

***

<div id="finishcall">
  ### finishCall
</div>

▸ **finishCall**(`call`, `result`, `currentCall`, `parentCall`, `summarize`, `endTime`, `startCallPromise`): `Promise`\<`void`>

<div id="parameters">
  #### パラメーター
</div>

| 名                  | タイプ                |                                                 |
| :----------------- | :----------------- | ----------------------------------------------- |
| `call`             | `InternalCall`     |                                                 |
| `result`           | `any`              |                                                 |
| `currentCall`      | `CallStackEntry`   |                                                 |
| `parentCall`       | `undefined`        | `CallStackEntry`                                |
| `summarize`        | `undefined`        | (`result`: `any`) => `Record`\<`string`, `any`> |
| `endTime`          | `Date`             |                                                 |
| `startCallPromise` | `Promise`\<`void`> |                                                 |

<div id="returns">
  #### 戻り値
</div>

`Promise`\<`void`>

<div id="defined-in">
  #### 定義箇所
</div>

[src/weaveClient.ts:1630](https://github.com/wandb/weave/blob/9591aba8a5e77309ee0858e5ba94d31c1bd7e404/sdks/node/src/weaveClient.ts#L1630)

***

<div id="finishcallwithexception">
  ### finishCallWithException
</div>

▸ **finishCallWithException**(`call`, `error`, `currentCall`, `parentCall`, `endTime`, `startCallPromise`): `Promise`\<`void`>

<div id="parameters">
  #### パラメーター
</div>

| 名                  | タイプ                |                  |
| :----------------- | :----------------- | ---------------- |
| `call`             | `InternalCall`     |                  |
| `error`            | `any`              |                  |
| `currentCall`      | `CallStackEntry`   |                  |
| `parentCall`       | `undefined`        | `CallStackEntry` |
| `endTime`          | `Date`             |                  |
| `startCallPromise` | `Promise`\<`void`> |                  |

<div id="returns">
  #### 戻り値
</div>

`Promise`\<`void`>

<div id="defined-in">
  #### 定義箇所
</div>

[src/weaveClient.ts:1672](https://github.com/wandb/weave/blob/9591aba8a5e77309ee0858e5ba94d31c1bd7e404/sdks/node/src/weaveClient.ts#L1672)

***

<div id="get">
  ### get
</div>

▸ **get**(`ref`): `Promise`\<`any`>

<div id="parameters">
  #### パラメーター
</div>

| 名     | タイプ                        |
| :---- | :------------------------- |
| `ref` | [`ObjectRef`](./objectref) |

<div id="returns">
  #### 戻り値
</div>

`Promise`\<`any`>

<div id="defined-in">
  #### 定義箇所
</div>

[src/weaveClient.ts:1025](https://github.com/wandb/weave/blob/9591aba8a5e77309ee0858e5ba94d31c1bd7e404/sdks/node/src/weaveClient.ts#L1025)

***

<div id="getagentcustomattributes">
  ### getAgentCustomAttributes
</div>

▸ **getAgentCustomAttributes**(`options`): `Promise`\<[`Response`](../#response)\<`GetAgentCustomAttributesResult`>>

project 内のエージェントのスパンで観測された型付きカスタム属性キーを検出します。各結果行は 1 つの `(source, key, value_type)` トリプルに、その値を持つスパン数を加えたもので、spans の query/group/stats API がカスタム属性を参照する際に使用する形式です。

対象とするスパンは、`query` (構造化された span
フィルター) 、`startedAfter` / `startedBefore` (ISO-8601) 、またはその両方を指定して絞り込めます。検出されたキーをページングするには、
`limit` / `offset` を使用します。

<div id="parameters">
  #### パラメーター
</div>

| 名         | タイプ                               |
| :-------- | :-------------------------------- |
| `options` | `GetAgentCustomAttributesOptions` |

<div id="returns">
  #### 戻り値
</div>

`Promise`\<[`Response`](../#response)\<`GetAgentCustomAttributesResult`>>

`例`

```ts twoslash theme={null}
// @noErrors
const client = await weave.init('entity/project');
const resp = await client.getAgentCustomAttributes({
  query: {
    $expr: {
      $eq: [{$getField: 'agent_name'}, {$literal: 'my-agent'}],
    },
  },
  startedAfter: '2026-06-15T00:00:00Z',
  limit: 200,
});

for (const attr of resp.data.attributes ?? []) {
  console.log(`${attr.source}.${attr.key} (${attr.value_type}): ${attr.span_count}`);
}
```

<div id="defined-in">
  #### 定義箇所
</div>

[src/weaveClient.ts:772](https://github.com/wandb/weave/blob/9591aba8a5e77309ee0858e5ba94d31c1bd7e404/sdks/node/src/weaveClient.ts#L772)

***

<div id="getagentspanstats">
  ### getAgentSpanStats
</div>

▸ **getAgentSpanStats**(`options`): `Promise`\<[`Response`](../#response)\<`GetAgentSpanStatsResult`>>

project 内のエージェント スパンに対する集約を、時系列 / バケット化された可視化に適した行 + 列の
メタデータとして返します。

`start` (必須) と `end` は時間ウィンドウを定義します。`metrics` の各エントリでは、
抽出するフィールドとその集約方法 (`sum`、
`avg`、`count`、パーセンタイルなど) を指定します。`granularity` (秒) を渡すと
行を時間単位でバケット化でき、`groupBy` を渡すと結果をエージェント /
provider / モデル / などごとに分けられます。`query` は、集約前に対象のスパンを
フィルターします。

<div id="parameters">
  #### パラメーター
</div>

| 名         | タイプ                        |
| :-------- | :------------------------- |
| `options` | `GetAgentSpanStatsOptions` |

<div id="returns">
  #### 戻り値
</div>

`Promise`\<[`Response`](../#response)\<`GetAgentSpanStatsResult`>>

`例`

```ts twoslash theme={null}
// @noErrors
const client = await weave.init('entity/project');
const resp = await client.getAgentSpanStats({
  start: '2026-06-10T00:00:00Z',
  end: '2026-06-23T00:00:00Z',
  granularity: 86400, // 1日1行
  metrics: [
    {
      alias: 'total_input_tokens',
      value_type: 'number',
      aggregations: ['sum'],
      value: {source: 'field', key: 'input_tokens'},
    },
  ],
  groupBy: [{key: 'agent_name'}],
});

for (const row of resp.data.rows ?? []) {
  console.log(row.started_at_bucket, row.agent_name, row.total_input_tokens);
}
```

<div id="defined-in">
  #### 定義箇所
</div>

[src/weaveClient.ts:621](https://github.com/wandb/weave/blob/9591aba8a5e77309ee0858e5ba94d31c1bd7e404/sdks/node/src/weaveClient.ts#L621)

***

<div id="getagentspans">
  ### getAgentSpans
</div>

▸ **getAgentSpans**(`options`): `Promise`\<[`Response`](../#response)\<[`GetAgentSpansResult`](../#getagentspansresult)>>

エージェントのスパンをクエリします。必要に応じて、エージェント名や Mongo スタイルの
クエリ式でフィルターできます。

<div id="parameters">
  #### パラメーター
</div>

| 名         | タイプ                                                          |
| :-------- | :----------------------------------------------------------- |
| `options` | [`GetAgentSpansOptions`](../interfaces/getagentspansoptions) |

<div id="returns">
  #### 戻り値
</div>

`Promise`\<[`Response`](../#response)\<[`GetAgentSpansResult`](../#getagentspansresult)>>

`例`

```ts twoslash theme={null}
// @noErrors
const client = await weave.init('entity/project');
const resp = await client.getAgentSpans({agentName: 'my-agent', limit: 20});

for (const span of resp.data.spans) {
  console.log(span.span_id, span.span_name, span.input_tokens);
}
```

`例`

```ts twoslash theme={null}
// @noErrors
const client = await weave.init('entity/project');

const resp = await client.getAgentSpans({
  agentName: 'my-agent',
  query: {
    $expr: {$gt: [{$getField: 'input_tokens'}, {$literal: 1000}]},
  },
});

for (const span of resp.data.spans) {
  console.log(span.span_id, span.span_name, span.input_tokens);
}
```

<div id="defined-in">
  #### 定義箇所
</div>

[src/weaveClient.ts:566](https://github.com/wandb/weave/blob/9591aba8a5e77309ee0858e5ba94d31c1bd7e404/sdks/node/src/weaveClient.ts#L566)

***

<div id="getagentturn">
  ### getAgentTurn
</div>

▸ **getAgentTurn**(`options`): `Promise`\<[`Response`](../#response)\<`AgentTraceChatRes`>>

traceId で指定した単一のターンのデータ (メッセージを含む) を取得します。

<div id="parameters">
  #### パラメーター
</div>

| 名         | タイプ                                                        |
| :-------- | :--------------------------------------------------------- |
| `options` | [`GetAgentTurnOptions`](../interfaces/getagentturnoptions) |

<div id="returns">
  #### 戻り値
</div>

`Promise`\<[`Response`](../#response)\<`AgentTraceChatRes`>>

`例`

```ts twoslash theme={null}
// @noErrors
const client = await weave.init('entity/project');
const resp = await client.getAgentTurn({
  traceId: '01997b8a-2c89-7c4d-9d0e-2f7e5b9a1b2c',
  includeFeedback: true,
});

console.log(resp.data.root_span_name, resp.data.total_duration_ms);

for (const message of resp.data.messages ?? []) {
  if (message.user_message) console.log('user:', message.user_message);
  if (message.assistant_message) console.log('assistant:', message.assistant_message);
}
```

<div id="defined-in">
  #### 定義箇所
</div>

[src/weaveClient.ts:655](https://github.com/wandb/weave/blob/9591aba8a5e77309ee0858e5ba94d31c1bd7e404/sdks/node/src/weaveClient.ts#L655)

***

<div id="getagentturns">
  ### getAgentTurns
</div>

▸ **getAgentTurns**(`options`): `Promise`\<[`Response`](../#response)\<[`GetAgentTurnsResult`](../#getagentturnsresult)>>

複数のターンのデータ (メッセージを含む) を conversationId ごとに取得します。

<div id="parameters">
  #### パラメーター
</div>

| 名         | タイプ                                                          |
| :-------- | :----------------------------------------------------------- |
| `options` | [`GetAgentTurnsOptions`](../interfaces/getagentturnsoptions) |

<div id="returns">
  #### 戻り値
</div>

`Promise`\<[`Response`](../#response)\<[`GetAgentTurnsResult`](../#getagentturnsresult)>>

`例`

```ts twoslash theme={null}
// @noErrors
const client = await weave.init('entity/project');
const resp = await client.getAgentTurns({
  conversationId: 'trace_c50312356de3487fa90e381c9399b5b4',
  limit: 20,
  includeFeedback: true,
});

for (const turn of resp.data.turns ?? []) {
  console.log(turn.trace_id, turn.root_span_name);
  for (const message of turn.messages ?? []) {
    if (message.user_message) console.log('user:', message.user_message);
    if (message.assistant_message) console.log('assistant:', message.assistant_message);
  }
}

console.log(`total turns: ${resp.data.total_turns}, has more: ${resp.data.has_more}`);
```

<div id="defined-in">
  #### 定義箇所
</div>

[src/weaveClient.ts:688](https://github.com/wandb/weave/blob/9591aba8a5e77309ee0858e5ba94d31c1bd7e404/sdks/node/src/weaveClient.ts#L688)

***

<div id="getagentversions">
  ### getAgentVersions
</div>

▸ **getAgentVersions**(`options`): `Promise`\<[`Response`](../#response)\<[`GetAgentVersionsResult`](../#getagentversionsresult)>>

指定したエージェントのバージョンを一覧で取得します。

<div id="parameters">
  #### パラメーター
</div>

| 名         | タイプ                                                                |
| :-------- | :----------------------------------------------------------------- |
| `options` | [`GetAgentVersionsOptions`](../interfaces/getagentversionsoptions) |

<div id="returns">
  #### 戻り値
</div>

`Promise`\<[`Response`](../#response)\<[`GetAgentVersionsResult`](../#getagentversionsresult)>>

`例`

```ts twoslash theme={null}
// @noErrors
const client = await weave.init('entity/project');
const resp = await client.getAgentVersions({agentName: 'my-agent', limit: 20});

for (const version of resp.data.versions) {
  console.log(version.agent_version, version.total_input_tokens);
}

console.log(`total count: ${resp.data.total_count}`)
```

<div id="defined-in">
  #### 定義箇所
</div>

[src/weaveClient.ts:522](https://github.com/wandb/weave/blob/9591aba8a5e77309ee0858e5ba94d31c1bd7e404/sdks/node/src/weaveClient.ts#L522)

***

<div id="getagents">
  ### getAgents
</div>

▸ **getAgents**(`options?`): `Promise`\<[`Response`](../#response)\<[`GetAgentsResult`](../#getagentsresult)>>

集計済みの統計情報とともに、エージェントの一覧を返します。

<div id="parameters">
  #### パラメーター
</div>

| 名         | タイプ                                                  |
| :-------- | :--------------------------------------------------- |
| `options` | [`GetAgentsOptions`](../interfaces/getagentsoptions) |

<div id="returns">
  #### 戻り値
</div>

`Promise`\<[`Response`](../#response)\<[`GetAgentsResult`](../#getagentsresult)>>

`例`

```ts twoslash theme={null}
// @noErrors
const client = await weave.init('entity/project');
const resp = await client.getAgents({limit: 20});

for (const agent of resp.data.agents) {
  console.log(agent.agent_name, agent.total_input_tokens);
}

console.log(`total count: ${resp.data.total_count}`)
```

<div id="defined-in">
  #### 定義箇所
</div>

[src/weaveClient.ts:488](https://github.com/wandb/weave/blob/9591aba8a5e77309ee0858e5ba94d31c1bd7e404/sdks/node/src/weaveClient.ts#L488)

***

<div id="getcall">
  ### getCall
</div>

▸ **getCall**(`callId`, `includeCosts?`): `Promise`\<`Call`>

<div id="parameters">
  #### パラメーター
</div>

| 名              | タイプ       | デフォルト値      |
| :------------- | :-------- | :---------- |
| `callId`       | `string`  | `undefined` |
| `includeCosts` | `boolean` | `false`     |

<div id="returns">
  #### 戻り値
</div>

`Promise`\<`Call`>

<div id="defined-in">
  #### 定義箇所
</div>

[src/weaveClient.ts:902](https://github.com/wandb/weave/blob/9591aba8a5e77309ee0858e5ba94d31c1bd7e404/sdks/node/src/weaveClient.ts#L902)

***

<div id="getcallstack">
  ### getCallStack
</div>

▸ **getCallStack**(): `CallStack`

<div id="returns">
  #### 戻り値
</div>

`CallStack`

<div id="defined-in">
  #### 定義箇所
</div>

[src/weaveClient.ts:1482](https://github.com/wandb/weave/blob/9591aba8a5e77309ee0858e5ba94d31c1bd7e404/sdks/node/src/weaveClient.ts#L1482)

***

<div id="getcalls">
  ### getCalls
</div>

▸ **getCalls**(`options?`): `Promise`\<`Call`\[]>

<div id="parameters">
  #### パラメーター
</div>

| 名          | タイプ                                                |
| :--------- | :------------------------------------------------- |
| `options?` | [`GetCallsOptions`](../interfaces/getcallsoptions) |

<div id="returns">
  #### 戻り値
</div>

`Promise`\<`Call`\[]>

<div id="defined-in">
  #### 定義箇所
</div>

[src/weaveClient.ts:935](https://github.com/wandb/weave/blob/9591aba8a5e77309ee0858e5ba94d31c1bd7e404/sdks/node/src/weaveClient.ts#L935)

▸ **getCalls**(`options?`, `includeCosts?`, `limit?`): `Promise`\<`Call`\[]>

<div id="parameters">
  #### パラメーター
</div>

| 名               | タイプ                                        |
| :-------------- | :----------------------------------------- |
| `options?`      | [`CallsFilter`](../interfaces/callsfilter) |
| `includeCosts?` | `boolean`                                  |
| `limit?`        | `number`                                   |

<div id="returns">
  #### 戻り値
</div>

`Promise`\<`Call`\[]>

<div id="defined-in">
  #### 定義箇所
</div>

[src/weaveClient.ts:936](https://github.com/wandb/weave/blob/9591aba8a5e77309ee0858e5ba94d31c1bd7e404/sdks/node/src/weaveClient.ts#L936)

***

<div id="getcallsiterator">
  ### getCallsIterator
</div>

▸ **getCallsIterator**(`options?`, `includeCosts?`, `limit?`): `AsyncIterableIterator`\<[`CallSchema`](../interfaces/callschema), `any`, `any`>

<div id="parameters">
  #### パラメーター
</div>

| 名               | タイプ                                        |
| :-------------- | :----------------------------------------- |
| `options?`      | [`CallsFilter`](../interfaces/callsfilter) |
| `includeCosts?` | `boolean`                                  |
| `limit?`        | `number`                                   |

<div id="returns">
  #### 戻り値
</div>

`AsyncIterableIterator`\<[`CallSchema`](../interfaces/callschema), `any`, `any`>

<div id="defined-in">
  #### 定義箇所
</div>

[src/weaveClient.ts:957](https://github.com/wandb/weave/blob/9591aba8a5e77309ee0858e5ba94d31c1bd7e404/sdks/node/src/weaveClient.ts#L957)

▸ **getCallsIterator**(`options?`): `AsyncIterableIterator`\<[`CallSchema`](../interfaces/callschema), `any`, `any`>

<div id="parameters">
  #### パラメーター
</div>

| 名          | タイプ                                                |
| :--------- | :------------------------------------------------- |
| `options?` | [`GetCallsOptions`](../interfaces/getcallsoptions) |

<div id="returns">
  #### 戻り値
</div>

`AsyncIterableIterator`\<[`CallSchema`](../interfaces/callschema), `any`, `any`>

<div id="defined-in">
  #### 定義箇所
</div>

[src/weaveClient.ts:962](https://github.com/wandb/weave/blob/9591aba8a5e77309ee0858e5ba94d31c1bd7e404/sdks/node/src/weaveClient.ts#L962)

***

<div id="getcurrentattributes">
  ### getCurrentAttributes
</div>

▸ **getCurrentAttributes**(): `Record`\<`string`, `any`>

<div id="returns">
  #### 戻り値
</div>

`Record`\<`string`, `any`>

<div id="defined-in">
  #### 定義箇所
</div>

[src/weaveClient.ts:1486](https://github.com/wandb/weave/blob/9591aba8a5e77309ee0858e5ba94d31c1bd7e404/sdks/node/src/weaveClient.ts#L1486)

***

<div id="linkprompttoregistry">
  ### linkPromptToRegistry
</div>

▸ **linkPromptToRegistry**(`prompt`, `options`): `Promise`\<`LinkAssetToRegistryRes`>

公開済みのプロンプト バージョンを Registry ポートフォリオにリンクします。

<div id="parameters">
  #### パラメーター
</div>

| 名         | タイプ                           |
| :-------- | :---------------------------- |
| `prompt`  | `RegistryLinkable`            |
| `options` | `LinkPromptToRegistryOptions` |

<div id="returns">
  #### 戻り値
</div>

`Promise`\<`LinkAssetToRegistryRes`>

<div id="defined-in">
  #### 定義箇所
</div>

[src/weaveClient.ts:1181](https://github.com/wandb/weave/blob/9591aba8a5e77309ee0858e5ba94d31c1bd7e404/sdks/node/src/weaveClient.ts#L1181)

***

<div id="publish">
  ### publish
</div>

▸ **publish**(`obj`, `objId?`): `Promise`\<[`ObjectRef`](./objectref)>

<div id="parameters">
  #### パラメーター
</div>

| 名        | タイプ      |
| :------- | :------- |
| `obj`    | `any`    |
| `objId?` | `string` |

<div id="returns">
  #### 戻り値
</div>

`Promise`\<[`ObjectRef`](./objectref)>

<div id="defined-in">
  #### 定義箇所
</div>

[src/weaveClient.ts:890](https://github.com/wandb/weave/blob/9591aba8a5e77309ee0858e5ba94d31c1bd7e404/sdks/node/src/weaveClient.ts#L890)

***

<div id="pushnewcall">
  ### pushNewCall
</div>

▸ **pushNewCall**(): `Object`

<div id="returns">
  #### 戻り値
</div>

`Object`

| 名             | タイプ              |
| :------------ | :--------------- |
| `currentCall` | `CallStackEntry` |
| `newStack`    | `CallStack`      |
| `parentCall?` | `CallStackEntry` |

<div id="defined-in">
  #### 定義箇所
</div>

[src/weaveClient.ts:1490](https://github.com/wandb/weave/blob/9591aba8a5e77309ee0858e5ba94d31c1bd7e404/sdks/node/src/weaveClient.ts#L1490)

***

<div id="runwithattributes">
  ### runWithAttributes
</div>

▸ **runWithAttributes**\<`T`>(`attributes`, `fn`): `T`

<div id="type-parameters">
  #### 型パラメーター
</div>

| 名   |
| :-- |
| `T` |

<div id="parameters">
  #### パラメーター
</div>

| 名            | タイプ                        |
| :----------- | :------------------------- |
| `attributes` | `Record`\<`string`, `any`> |
| `fn`         | () => `T`                  |

<div id="returns">
  #### 戻り値
</div>

`T`

<div id="defined-in">
  #### 定義箇所
</div>

[src/weaveClient.ts:1498](https://github.com/wandb/weave/blob/9591aba8a5e77309ee0858e5ba94d31c1bd7e404/sdks/node/src/weaveClient.ts#L1498)

***

<div id="runwithcallstack">
  ### runWithCallStack
</div>

▸ **runWithCallStack**\<`T`>(`callStack`, `fn`): `T`

<div id="type-parameters">
  #### 型パラメーター
</div>

| 名   |
| :-- |
| `T` |

<div id="parameters">
  #### パラメーター
</div>

| 名           | タイプ         |
| :---------- | :---------- |
| `callStack` | `CallStack` |
| `fn`        | () => `T`   |

<div id="returns">
  #### 戻り値
</div>

`T`

<div id="defined-in">
  #### 定義箇所
</div>

[src/weaveClient.ts:1494](https://github.com/wandb/weave/blob/9591aba8a5e77309ee0858e5ba94d31c1bd7e404/sdks/node/src/weaveClient.ts#L1494)

***

<div id="savecallend">
  ### saveCallEnd
</div>

▸ **saveCallEnd**(`callEnd`): `void`

<div id="parameters">
  #### パラメーター
</div>

| 名         | タイプ                        |
| :-------- | :------------------------- |
| `callEnd` | `EndedCallSchemaForInsert` |

<div id="returns">
  #### 戻り値
</div>

`void`

<div id="defined-in">
  #### 定義箇所
</div>

[src/weaveClient.ts:1477](https://github.com/wandb/weave/blob/9591aba8a5e77309ee0858e5ba94d31c1bd7e404/sdks/node/src/weaveClient.ts#L1477)

***

<div id="savecallstart">
  ### saveCallStart
</div>

▸ **saveCallStart**(`callStart`): `void`

<div id="parameters">
  #### パラメーター
</div>

| 名           | タイプ                          |
| :---------- | :--------------------------- |
| `callStart` | `StartedCallSchemaForInsert` |

<div id="returns">
  #### 戻り値
</div>

`void`

<div id="defined-in">
  #### 定義箇所
</div>

[src/weaveClient.ts:1472](https://github.com/wandb/weave/blob/9591aba8a5e77309ee0858e5ba94d31c1bd7e404/sdks/node/src/weaveClient.ts#L1472)

***

<div id="saveop">
  ### saveOp
</div>

▸ **saveOp**(`op`, `objId?`): `Promise`\<`OpRef`>

<div id="parameters">
  #### パラメーター
</div>

| 名        | タイプ                                             |
| :------- | :---------------------------------------------- |
| `op`     | [`Op`](../#op)\<(...`args`: `any`\[]) => `any`> |
| `objId?` | `string`                                        |

<div id="returns">
  #### 戻り値
</div>

`Promise`\<`OpRef`>

<div id="defined-in">
  #### 定義箇所
</div>

[src/weaveClient.ts:1537](https://github.com/wandb/weave/blob/9591aba8a5e77309ee0858e5ba94d31c1bd7e404/sdks/node/src/weaveClient.ts#L1537)

***

<div id="searchagents">
  ### searchAgents
</div>

▸ **searchAgents**(`options`): `Promise`\<[`Response`](../#response)\<`SearchAgentsResult`>>

project 内のエージェントメッセージ全体を対象に全文検索を実行します。結果は会話ごとに
グループ化され、一致した各メッセージのプレビューが表示されます。

`query` は全文検索の検索語です。空の文字列を渡すと、テキスト一致は行わず、
構造化フィルター (`agentName`,
`conversationId`, `traceId`) に一致するすべてのメッセージを取得できます。`limit` /
`offset` を使用して結果をページ単位で取得します。

<div id="parameters">
  #### パラメーター
</div>

| 名         | タイプ                   |
| :-------- | :-------------------- |
| `options` | `SearchAgentsOptions` |

<div id="returns">
  #### 戻り値
</div>

`Promise`\<[`Response`](../#response)\<`SearchAgentsResult`>>

`例`

```ts twoslash theme={null}
// @noErrors
const client = await weave.init('entity/project');
const resp = await client.searchAgents({
  query: 'Liverpool',
  agentName: 'Assistant',
  limit: 20,
});

for (const conversation of resp.data.results ?? []) {
  console.log(`${conversation.conversation_id} (${conversation.agent_name})`);
  for (const match of conversation.matched_messages) {
    console.log(`  [${match.role}] ${match.content_preview}`);
  }
}

console.log(`total conversations: ${resp.data.total_conversations}`);
```

<div id="defined-in">
  #### 定義箇所
</div>

[src/weaveClient.ts:730](https://github.com/wandb/weave/blob/9591aba8a5e77309ee0858e5ba94d31c1bd7e404/sdks/node/src/weaveClient.ts#L730)

***

<div id="serializeaudio">
  ### serializeAudio
</div>

▸ **serializeAudio**(`data`, `audioType?`): `Promise`\<`SerializedFileBlob`>

生のオーディオバイトを Weave のコンテンツストアにアップロードし、
Call の出力に埋め込める `CustomWeaveType` プレースホルダーを返します。

これは、`finishCall` の自動シリアライズパイプラインを使用せずに、
Call の出力を手動で構築する場合 (たとえば `saveCallEnd` 経由) に使用します。

<div id="parameters">
  #### パラメーター
</div>

| 名           | タイプ                          | 既定値                  | 説明                                   |
| :---------- | :--------------------------- | :------------------- | :----------------------------------- |
| `data`      | `Buffer`\<`ArrayBufferLike`> | `undefined`          | 生のオーディオバイト (ブラウザーとの互換性を最大限にするには WAV) |
| `audioType` | `"wav"`                      | `DEFAULT_AUDIO_TYPE` | ファイル形式 — 現在サポートされているのは 'wav' のみです    |

<div id="returns">
  #### 戻り値
</div>

`Promise`\<`SerializedFileBlob`>

<div id="defined-in">
  #### 定義箇所
</div>

[src/weaveClient.ts:1424](https://github.com/wandb/weave/blob/9591aba8a5e77309ee0858e5ba94d31c1bd7e404/sdks/node/src/weaveClient.ts#L1424)

***

<div id="updatecall">
  ### updateCall
</div>

▸ **updateCall**(`callId`, `displayName`): `Promise`\<`void`>

<div id="parameters">
  #### パラメーター
</div>

| 名             | タイプ      |
| :------------ | :------- |
| `callId`      | `string` |
| `displayName` | `string` |

<div id="returns">
  #### 戻り値
</div>

`Promise`\<`void`>

<div id="defined-in">
  #### 定義箇所
</div>

[src/weaveClient.ts:1710](https://github.com/wandb/weave/blob/9591aba8a5e77309ee0858e5ba94d31c1bd7e404/sdks/node/src/weaveClient.ts#L1710)

***

<div id="waitforbatchprocessing">
  ### waitForBatchProcessing
</div>

▸ **waitForBatchProcessing**(): `Promise`\<`void`>

<div id="returns">
  #### 戻り値
</div>

`Promise`\<`void`>

<div id="defined-in">
  #### 定義箇所
</div>

[src/weaveClient.ts:801](https://github.com/wandb/weave/blob/9591aba8a5e77309ee0858e5ba94d31c1bd7e404/sdks/node/src/weaveClient.ts#L801)
