@voicethere/agent 0.32.0 → 0.33.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/templates/llm-store-support/agent.js +60550 -0
- package/dist/templates/registry.d.ts.map +1 -1
- package/dist/templates/registry.js +30 -0
- package/dist/templates/registry.js.map +1 -1
- package/eject/llm/loop.ts +1 -1
- package/package.json +1 -1
- package/templates/README.md +1 -0
- package/templates/llm-store-support/README.md +37 -0
- package/templates/llm-store-support/agent.ts +35 -0
- package/templates/llm-store-support/knowledge/products.md +25 -0
- package/templates/llm-store-support/knowledge/returns.md +17 -0
- package/templates/llm-store-support/knowledge/shipping.md +17 -0
- package/templates/llm-store-support/knowledge/sizing.md +17 -0
- package/templates/llm-store-support/knowledge/store.md +13 -0
- package/templates/llm-store-support/knowledge/warranty.md +13 -0
- package/templates/llm-store-support/md.d.ts +4 -0
- package/templates/llm-store-support/prompt.md +9 -0
- package/templates/llm-store-support/voicethere.llm.json +50 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../src/templates/registry.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,YAAY,GAAG,SAAS,GAAG,KAAK,CAAC;AAE7C,MAAM,MAAM,gBAAgB,GAC1B,OAAO,GAAG,MAAM,GAAG,YAAY,GAAG,aAAa,GAAG,OAAO,CAAC;AAE5D,MAAM,WAAW,uBAAuB;IACtC,EAAE,EAAE,MAAM,CAAC;IACX,mFAAmF;IACnF,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,YAAY,CAAC;IACnB,mFAAmF;IACnF,YAAY,EAAE,OAAO,CAAC;IACtB,wCAAwC;IACxC,KAAK,EAAE,MAAM,CAAC;IACd,4EAA4E;IAC5E,OAAO,EAAE,MAAM,CAAC;IAChB,uBAAuB;IACvB,QAAQ,EAAE,gBAAgB,CAAC;IAC3B,WAAW,EAAE,MAAM,CAAC;IACpB,gGAAgG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
@@ -233,6 +233,36 @@ export const AGENT_TEMPLATES = [
|
|
|
233
233
|
ioredis: "^5.11.1",
|
|
234
234
|
},
|
|
235
235
|
},
|
|
236
|
+
{
|
|
237
|
+
id: "llm-store-support",
|
|
238
|
+
entry: "llm-store-support/agent.ts",
|
|
239
|
+
kind: "product",
|
|
240
|
+
seedOnCreate: true,
|
|
241
|
+
title: "Store support (LLM + knowledge + MCP)",
|
|
242
|
+
summary: "Phone support for a sample outdoor store: answers from Markdown knowledge and looks up prices with an MCP tool.",
|
|
243
|
+
category: "voice-data",
|
|
244
|
+
description: "An LLM support assistant for the fictional Kestrel Outdoor store. It answers shipping, returns, warranty, sizing and store questions from knowledge/*.md through search_knowledge and calls get_product_price on a project service (the mcp-example-service image) for every price. Needs Project Redis, the AGENT_OPENROUTER_API_KEY secret and the example service.",
|
|
245
|
+
sourceFiles: [
|
|
246
|
+
"llm-store-support/agent.ts",
|
|
247
|
+
"llm-store-support/voicethere.llm.json",
|
|
248
|
+
"llm-store-support/prompt.md",
|
|
249
|
+
"llm-store-support/md.d.ts",
|
|
250
|
+
"llm-store-support/README.md",
|
|
251
|
+
"llm-store-support/knowledge/shipping.md",
|
|
252
|
+
"llm-store-support/knowledge/returns.md",
|
|
253
|
+
"llm-store-support/knowledge/warranty.md",
|
|
254
|
+
"llm-store-support/knowledge/sizing.md",
|
|
255
|
+
"llm-store-support/knowledge/store.md",
|
|
256
|
+
"llm-store-support/knowledge/products.md",
|
|
257
|
+
],
|
|
258
|
+
npmDependencies: {
|
|
259
|
+
openai: "^7.43.0",
|
|
260
|
+
"@anthropic-ai/sdk": "^1.3.0",
|
|
261
|
+
"@google/genai": "^2.31.0",
|
|
262
|
+
"@modelcontextprotocol/sdk": "^1.32.2",
|
|
263
|
+
ioredis: "^5.11.1",
|
|
264
|
+
},
|
|
265
|
+
},
|
|
236
266
|
{
|
|
237
267
|
id: "llm-board",
|
|
238
268
|
entry: "llm-board/agent.ts",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry.js","sourceRoot":"","sources":["../../src/templates/registry.ts"],"names":[],"mappings":"AAyBA,MAAM,CAAC,MAAM,eAAe,GAAuC;IACjE;QACE,EAAE,EAAE,MAAM;QACV,KAAK,EAAE,eAAe;QACtB,IAAI,EAAE,SAAS;QACf,YAAY,EAAE,IAAI;QAClB,KAAK,EAAE,qBAAqB;QAC5B,OAAO,EAAE,0DAA0D;QACnE,QAAQ,EAAE,OAAO;QACjB,WAAW,EACT,8EAA8E;QAChF,WAAW,EAAE,CAAC,eAAe,CAAC;KAC/B;IACD;QACE,EAAE,EAAE,SAAS;QACb,KAAK,EAAE,kBAAkB;QACzB,IAAI,EAAE,SAAS;QACf,YAAY,EAAE,IAAI;QAClB,KAAK,EAAE,6BAA6B;QACpC,OAAO,EAAE,2CAA2C;QACpD,QAAQ,EAAE,OAAO;QACjB,WAAW,EACT,qEAAqE;QACvE,WAAW,EAAE,CAAC,kBAAkB,CAAC;KAClC;IACD;QACE,EAAE,EAAE,iBAAiB;QACrB,KAAK,EAAE,0BAA0B;QACjC,IAAI,EAAE,SAAS;QACf,YAAY,EAAE,IAAI;QAClB,KAAK,EAAE,iBAAiB;QACxB,OAAO,EACL,qIAAqI;QACvI,QAAQ,EAAE,OAAO;QACjB,WAAW,EACT,qVAAqV;QACvV,WAAW,EAAE,CAAC,0BAA0B,CAAC;KAC1C;IACD;QACE,EAAE,EAAE,cAAc;QAClB,KAAK,EAAE,uBAAuB;QAC9B,IAAI,EAAE,SAAS;QACf,YAAY,EAAE,IAAI;QAClB,KAAK,EAAE,cAAc;QACrB,OAAO,EACL,sGAAsG;QACxG,QAAQ,EAAE,OAAO;QACjB,WAAW,EACT,2ZAA2Z;QAC7Z,WAAW,EAAE,CAAC,uBAAuB,CAAC;KACvC;IACD;QACE,EAAE,EAAE,eAAe;QACnB,KAAK,EAAE,wBAAwB;QAC/B,IAAI,EAAE,SAAS;QACf,YAAY,EAAE,IAAI;QAClB,KAAK,EAAE,eAAe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C;AAIX,MAAM,cAAc,GAAG,IAAI,GAAG,CAC5B,eAAe,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,QAAQ,CAAC,EAAE,EAAE,QAAQ,CAAC,CAAC,CAC3D,CAAC;AAEF,MAAM,UAAU,iBAAiB,CAAC,EAAU;IAC1C,OAAO,cAAc,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;AAChC,CAAC;AAED,MAAM,UAAU,eAAe,CAAC,EAAU;IACxC,MAAM,QAAQ,GAAG,cAAc,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IACxC,IAAI,CAAC,QAAQ,EAAE,CAAC;QACd,MAAM,IAAI,KAAK,CAAC,8BAA8B,EAAE,EAAE,CAAC,CAAC;IACtD,CAAC;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC;AAED,MAAM,UAAU,yBAAyB;IACvC,OAAO,eAAe,CAAC,MAAM,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAC;AACrE,CAAC"}
|
package/eject/llm/loop.ts
CHANGED
package/package.json
CHANGED
package/templates/README.md
CHANGED
|
@@ -77,6 +77,7 @@ Each folder has its own README. Summary:
|
|
|
77
77
|
| `webhooks-redis` | `webhooks-redis/` | Webhooks plus Redis counter |
|
|
78
78
|
| `llm-agent` | `llm-agent/` | LLM voice and chat agent, tools, MCP, optional knowledge (RAG) |
|
|
79
79
|
| `llm-language-tutor` | `llm-language-tutor/` | English practice partner: `llm-agent` plus a lessons knowledge base (Redis) |
|
|
80
|
+
| `llm-store-support` | `llm-store-support/` | Support assistant for a sample store: Markdown knowledge (Redis) plus an MCP price tool on a project service |
|
|
80
81
|
| `llm-board` | `llm-board/` | Shared sticky-note board over the data channel with an LLM facilitator (no Redis) |
|
|
81
82
|
| `llm-mcp-service` | `llm-mcp-service/` | `llm-agent` plus a project service that serves MCP tools |
|
|
82
83
|
| `llm-docs-rag` | `llm-docs-rag/` | `llm-agent` answering from your docs via the `docs-rag-mcp` image |
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# llm-store-support
|
|
2
|
+
|
|
3
|
+
A phone support assistant for a fictional outdoor store, Kestrel Outdoor. It answers questions about shipping, returns, warranty, sizing, store hours and products from Markdown files through `search_knowledge`, and looks up every price with a tool on a project service. Source: `templates/llm-store-support/agent.ts`.
|
|
4
|
+
|
|
5
|
+
Prices never live in the knowledge files. The prompt tells the model to call `get_product_price` for any price and not to estimate one, so a price change happens in one place: the service.
|
|
6
|
+
|
|
7
|
+
## What you need
|
|
8
|
+
|
|
9
|
+
- **Project Redis** turned on. The agent indexes the files in `knowledge/` in Redis when it starts and skips the work when they have not changed.
|
|
10
|
+
- A project secret named `AGENT_OPENROUTER_API_KEY` (a key from openrouter.ai). The same key serves the chat model and the embeddings.
|
|
11
|
+
- A project service that runs the public image `ghcr.io/voicethere/mcp-example-service:<version>` (or `latest`), port `8080`, HTTP health check `/healthz`. It offers `list_products` and `get_product_price` over a sample Kestrel Outdoor catalog. The prices are sample data.
|
|
12
|
+
|
|
13
|
+
Without Redis or the key the agent still answers, but `search_knowledge` is off. Without the service it cannot give a price.
|
|
14
|
+
|
|
15
|
+
## Files
|
|
16
|
+
|
|
17
|
+
- `agent.ts` wires the pieces together.
|
|
18
|
+
- `voicethere.llm.json` holds the model (`amazon/nova-micro-v1` on OpenRouter), the greeting, `toolChoice: "required-first-round"`, the service tool source limited to `list_products` and `get_product_price`, and the `knowledge` block (`store: "redis"`, `topK: 3`, namespace `store-support`).
|
|
19
|
+
- `prompt.md` is the system prompt.
|
|
20
|
+
- `knowledge/` has one file per topic: `shipping.md`, `returns.md`, `warranty.md`, `sizing.md`, `store.md` and `products.md`. Each `##` heading starts a retrievable chunk.
|
|
21
|
+
- `md.d.ts` lets TypeScript accept `import x from "./x.md"`.
|
|
22
|
+
|
|
23
|
+
`toolChoice: "required-first-round"` makes every turn start with a tool call, so an answer comes from the knowledge or the price tool and not from the model's memory. A greeting such as "thanks" also triggers a call.
|
|
24
|
+
|
|
25
|
+
## Use your own store
|
|
26
|
+
|
|
27
|
+
1. Replace the files in `knowledge/` with your own policies, keeping `##` headings that name the topic, and update the imports in `agent.ts`.
|
|
28
|
+
2. Run your own MCP server as the project service. It needs to serve MCP over streamable HTTP at `/mcp` and answer `GET /healthz`, and its tools must match the names in `toolSources[].allow`. The source of the example server is in `services/mcp-example/` in the `@voicethere/agent` repository.
|
|
29
|
+
3. Edit `prompt.md` so the name, tone and rules fit your store.
|
|
30
|
+
|
|
31
|
+
## Embeddings model
|
|
32
|
+
|
|
33
|
+
The template uses `openai/text-embedding-3-small` through OpenRouter, with the agent's default of 512 dimensions. See the `llm-language-tutor` README for the details.
|
|
34
|
+
|
|
35
|
+
## Cost
|
|
36
|
+
|
|
37
|
+
Measured on VoiceThere's demo: see the use-case page.
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { defineAgent } from "@voicethere/agent";
|
|
2
|
+
import { createLlmAgent } from "@voicethere/agent/llm";
|
|
3
|
+
import { openai } from "@voicethere/agent/llm/openai";
|
|
4
|
+
import config from "./voicethere.llm.json";
|
|
5
|
+
import systemPrompt from "./prompt.md";
|
|
6
|
+
import shipping from "./knowledge/shipping.md";
|
|
7
|
+
import returns from "./knowledge/returns.md";
|
|
8
|
+
import warranty from "./knowledge/warranty.md";
|
|
9
|
+
import sizing from "./knowledge/sizing.md";
|
|
10
|
+
import store from "./knowledge/store.md";
|
|
11
|
+
import products from "./knowledge/products.md";
|
|
12
|
+
|
|
13
|
+
// Needs Project Redis (the knowledge files are indexed there at start), a
|
|
14
|
+
// project service that runs the mcp-example-service image (prices come from
|
|
15
|
+
// its get_product_price tool), and the project secret AGENT_OPENROUTER_API_KEY,
|
|
16
|
+
// which serves both the chat model and the embeddings. To support your own
|
|
17
|
+
// store, replace the files in knowledge/ and point the service at your own MCP
|
|
18
|
+
// server (see README.md).
|
|
19
|
+
defineAgent(
|
|
20
|
+
createLlmAgent({
|
|
21
|
+
config,
|
|
22
|
+
systemPrompt,
|
|
23
|
+
providers: [openai],
|
|
24
|
+
knowledge: {
|
|
25
|
+
documents: [
|
|
26
|
+
{ id: "shipping", title: "Shipping", text: shipping },
|
|
27
|
+
{ id: "returns", title: "Returns", text: returns },
|
|
28
|
+
{ id: "warranty", title: "Warranty", text: warranty },
|
|
29
|
+
{ id: "sizing", title: "Sizing", text: sizing },
|
|
30
|
+
{ id: "store", title: "Store hours and contact", text: store },
|
|
31
|
+
{ id: "products", title: "Products", text: products },
|
|
32
|
+
],
|
|
33
|
+
},
|
|
34
|
+
}),
|
|
35
|
+
);
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# Products overview
|
|
2
|
+
|
|
3
|
+
## Tents and shelters
|
|
4
|
+
|
|
5
|
+
The Ridgeline 2 is a two-person three-season backpacking tent. The Basecamp 4 is a four-person tent for car camping with a tall ceiling and two doors.
|
|
6
|
+
|
|
7
|
+
## Sleep and packs
|
|
8
|
+
|
|
9
|
+
The Summit 20 is a 20 degree down sleeping bag. The Trailhead 45 is a 45 liter backpack with an adjustable torso.
|
|
10
|
+
|
|
11
|
+
## Footwear
|
|
12
|
+
|
|
13
|
+
The Talus Mid is a waterproof mid-height hiking boot.
|
|
14
|
+
|
|
15
|
+
## Cooking and water
|
|
16
|
+
|
|
17
|
+
The Ember Stove is a compact canister stove. The Clearflow Filter is a hollow-fiber water filter.
|
|
18
|
+
|
|
19
|
+
## Lighting
|
|
20
|
+
|
|
21
|
+
The Beacon Headlamp is a rechargeable headlamp with a red night mode.
|
|
22
|
+
|
|
23
|
+
## Prices
|
|
24
|
+
|
|
25
|
+
Prices are not listed here. Ask the price tool for the current price of any product.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Returns and exchanges
|
|
2
|
+
|
|
3
|
+
## Return window
|
|
4
|
+
|
|
5
|
+
You can return unused gear within 60 days of delivery for a refund to the original payment method. Items must be clean, unworn and in the original packaging, with tags attached. Tents must be clean and dry.
|
|
6
|
+
|
|
7
|
+
## How to start a return
|
|
8
|
+
|
|
9
|
+
Open the order on the website and choose Start a return, or contact support with the order number. We email a prepaid return label for orders shipped within the United States. Refunds are issued within five business days after the warehouse receives the package.
|
|
10
|
+
|
|
11
|
+
## Exchanges
|
|
12
|
+
|
|
13
|
+
For a different size or color, start a return and place a new order. We do not hold stock for exchanges, so ordering the new item first avoids a sellout.
|
|
14
|
+
|
|
15
|
+
## What cannot be returned
|
|
16
|
+
|
|
17
|
+
Used fuel canisters, opened water treatment tablets, socks and base layers that have been worn, and gift cards cannot be returned. Items damaged on arrival are replaced at no cost; send photos to support within seven days.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Shipping at Kestrel Outdoor
|
|
2
|
+
|
|
3
|
+
## Delivery times and carriers
|
|
4
|
+
|
|
5
|
+
Orders placed before 2 pm on a business day leave our warehouse the same day. Standard shipping takes three to five business days within the continental United States. Express shipping takes one to two business days. Orders to Alaska, Hawaii and US territories take up to ten business days.
|
|
6
|
+
|
|
7
|
+
## Shipping costs
|
|
8
|
+
|
|
9
|
+
Larger orders ship standard for free. The free-shipping threshold and the flat rates for smaller orders and for express are shown at checkout.
|
|
10
|
+
|
|
11
|
+
## Tracking and delivery problems
|
|
12
|
+
|
|
13
|
+
Every order gets a tracking link by email when it ships. If a package shows as delivered but did not arrive, wait one business day and check with neighbors, then contact support. We open a carrier claim and send a replacement once the claim is filed.
|
|
14
|
+
|
|
15
|
+
## International orders
|
|
16
|
+
|
|
17
|
+
We ship to Canada. Duties and import taxes are charged by the carrier on delivery. We do not ship to other countries yet.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Sizing guide
|
|
2
|
+
|
|
3
|
+
## Footwear
|
|
4
|
+
|
|
5
|
+
Boots and trail shoes run true to US sizing. If you are between sizes, order the larger one and wear the socks you hike in. A thumb's width of space in front of your longest toe is right for hiking boots. Wide fits are marked with a W.
|
|
6
|
+
|
|
7
|
+
## Jackets and base layers
|
|
8
|
+
|
|
9
|
+
Our jackets are cut with room for a fleece underneath. If you plan to wear only a base layer under the jacket, take your usual size. For a layering setup with a thick mid layer, size up. Base layers fit close to the body, so choose your normal size for a snug fit.
|
|
10
|
+
|
|
11
|
+
## Backpacks
|
|
12
|
+
|
|
13
|
+
Pack sizes are measured by torso length, not by height. Measure from the bump at the base of your neck to the top of your hip bones. A torso of 16 to 18 inches fits a small, 18 to 20 inches a medium and over 20 inches a large.
|
|
14
|
+
|
|
15
|
+
## Sleeping bags and tents
|
|
16
|
+
|
|
17
|
+
Regular sleeping bags fit people up to six feet tall. Long sizes fit up to six feet six inches. A tent's person count is a tight fit, so most people pick one size larger than the number of sleepers.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# Store hours and contact
|
|
2
|
+
|
|
3
|
+
## Phone and email support
|
|
4
|
+
|
|
5
|
+
Phone support is open Monday to Friday, 8 am to 6 pm Mountain Time, and Saturday, 9 am to 2 pm. Email support at help@kestrel-outdoor.example gets an answer within one business day. The phone number is 555-0142.
|
|
6
|
+
|
|
7
|
+
## Showroom
|
|
8
|
+
|
|
9
|
+
Our showroom is at 214 Ridge Road in Boulder, Colorado. It is open Monday to Saturday, 10 am to 7 pm, and Sunday, 11 am to 5 pm. You can try on boots and pack a loaded backpack there. The showroom is closed on Thanksgiving and Christmas Day.
|
|
10
|
+
|
|
11
|
+
## About this store
|
|
12
|
+
|
|
13
|
+
Kestrel Outdoor is a fictional store made up for this demo. The products, policies and contact details in these files are sample text.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# Warranty
|
|
2
|
+
|
|
3
|
+
## What the warranty covers
|
|
4
|
+
|
|
5
|
+
Kestrel Outdoor own-brand gear carries a limited lifetime warranty against defects in materials and workmanship. This covers broken zippers, failed seams, delaminated soles and cracked poles. Gear from other brands carries that brand's warranty, and we help you file the claim.
|
|
6
|
+
|
|
7
|
+
## What it does not cover
|
|
8
|
+
|
|
9
|
+
Normal wear, UV fading, damage from fire or misuse, and modifications are not covered. Waterproof coatings wear off with use; the care card in the package explains how to re-treat them.
|
|
10
|
+
|
|
11
|
+
## Making a claim
|
|
12
|
+
|
|
13
|
+
Contact support with the order number or a photo of the item and a description of the problem. We repair the item, replace it, or issue store credit, whichever fits the damage. Repairs take about two weeks plus shipping time.
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
You are the phone support assistant for Kestrel Outdoor, an online store for camping and hiking gear. Customers talk to you by voice, so everything you say is read aloud.
|
|
2
|
+
|
|
3
|
+
Keep replies to one to three short sentences, in plain words. Do not use markdown, lists, emoji or special characters. Say prices as words, for example "one hundred and twenty-nine dollars".
|
|
4
|
+
|
|
5
|
+
Answer questions about shipping, returns, warranty, sizing, store hours, contact details and what the store sells from search_knowledge. Search before you answer such a question: do not give a guess or a filler sentence first. If the search has nothing, say you are not sure and offer to connect the customer with the support team at the address or number in the store information.
|
|
6
|
+
|
|
7
|
+
For any price, call get_product_price with the product name or id. If the customer asks what the store sells and you need exact names, call list_products. Never state a price that did not come from get_product_price, never estimate one and never work out a total from memory. If the tool says it does not know the product, say so and offer to look up a similar one.
|
|
8
|
+
|
|
9
|
+
Be friendly and patient. Ask one question at a time.
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "./node_modules/@voicethere/agent/schema/voicethere.llm.schema.json",
|
|
3
|
+
"version": 1,
|
|
4
|
+
"provider": "openrouter",
|
|
5
|
+
"model": "amazon/nova-micro-v1",
|
|
6
|
+
"apiKeySecret": "AGENT_OPENROUTER_API_KEY",
|
|
7
|
+
"maxOutputTokens": 1024,
|
|
8
|
+
"greeting": {
|
|
9
|
+
"text": "Hi, this is Kestrel Outdoor support. How can I help?",
|
|
10
|
+
"interruptible": true
|
|
11
|
+
},
|
|
12
|
+
"bargeIn": { "mode": "project" },
|
|
13
|
+
"history": { "turns": 20, "interruptionNote": true },
|
|
14
|
+
"fillers": {
|
|
15
|
+
"thinking": {
|
|
16
|
+
"phrases": ["Okay.", "Right.", "Let me check."],
|
|
17
|
+
"afterMs": 1500
|
|
18
|
+
},
|
|
19
|
+
"toolCall": {
|
|
20
|
+
"phrases": ["Let me check that for you.", "One moment."]
|
|
21
|
+
},
|
|
22
|
+
"toolWait": {
|
|
23
|
+
"phrases": ["Still checking, one moment.", "Almost there."],
|
|
24
|
+
"afterMs": 4000
|
|
25
|
+
},
|
|
26
|
+
"interruptible": true
|
|
27
|
+
},
|
|
28
|
+
"toolChoice": "required-first-round",
|
|
29
|
+
"tools": {
|
|
30
|
+
"maxRounds": 4,
|
|
31
|
+
"timeoutMs": 15000
|
|
32
|
+
},
|
|
33
|
+
"toolSources": [
|
|
34
|
+
{
|
|
35
|
+
"kind": "service",
|
|
36
|
+
"path": "/mcp",
|
|
37
|
+
"allow": ["list_products", "get_product_price"]
|
|
38
|
+
}
|
|
39
|
+
],
|
|
40
|
+
"knowledge": {
|
|
41
|
+
"store": "redis",
|
|
42
|
+
"topK": 3,
|
|
43
|
+
"embeddings": {
|
|
44
|
+
"provider": "openrouter",
|
|
45
|
+
"model": "openai/text-embedding-3-small"
|
|
46
|
+
},
|
|
47
|
+
"redis": { "namespace": "store-support" }
|
|
48
|
+
},
|
|
49
|
+
"interruptPolicy": "cancel"
|
|
50
|
+
}
|