-
Notifications
You must be signed in to change notification settings - Fork 24
agents: document response wait, max wait, ignore phrases, and speculative response #203
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -41,19 +41,26 @@ | |
|
|
||
| ### Turn-taking | ||
|
|
||
| `conversation.eagerness` controls how quickly the agent starts talking after the caller stops: | ||
| `conversation.response_wait_ms` (300–2000, default `550`) is how long the agent waits after the caller pauses before it starts talking. In the Builder this is the **Response wait** slider, with Fast (0.45 s), Balanced (0.55 s), and Patient (0.9 s) shortcuts. | ||
|
|
||
| - `relaxed`: Waits longer, never talks over the caller. | ||
| - `balanced` (default): Waits for a natural pause. | ||
| - `eager`: Jumps in quickly. | ||
| When the agent thinks the caller is mid-sentence it waits longer, up to `conversation.response_max_wait_ms` (600–4000). Leave it `null` (the default) to follow the response wait plus 0.5 s; send `0` to clear an explicit value back to automatic. A max wait below the response wait is rejected with `422`. | ||
|
|
||
| `conversation.eagerness` is the same setting as a preset and still works: writing `relaxed`, `balanced`, or `eager` sets the response wait to 900, 550, or 450 ms, and reads report the preset that matches the current wait. | ||
|
|
||
| <Note> | ||
| A short answer such as "yes" normally lands on the fast path. When the agent asks for digits or a spelled-out name, the wait is widened automatically so the caller can pause between groups. | ||
| </Note> | ||
|
|
||
| `conversation.speculative_response` (default `true`) lets the agent start preparing its reply while the caller may still be speaking; the draft is discarded if they continue, and tools never run before the caller's turn is confirmed. Turn it off if your [custom LLM](/agents/build/custom-llm) bills per token and you would rather not pay for discarded drafts. With it off, the response wait is added directly to every reply. | ||
|
|
||
| ### Interruptions | ||
|
|
||
| - `conversation.interruptible` (default `true`): Whether the caller can barge in while the agent is speaking. | ||
| - `conversation.interruption_sensitivity` sets how much caller speech counts as an interruption: | ||
| - `low`: The agent stops less readily, talking through background noise and short acknowledgements. | ||
| - `low` (**Hard to interrupt** in the Builder): The agent stops only for a firm, worded interjection, talking through background noise and short acknowledgements. | ||
| - `balanced` (default): Interrupts on normal speech. | ||
| - `high`: The agent stops more readily when the caller speaks, even on brief utterances. | ||
| - `high` (**Easy to interrupt**): The agent stops on the caller's first word. | ||
| - `conversation.interruption_ignore_phrases` (up to 50 entries of 40 characters): Backchannels such as `"uh-huh"` or `"okay"` that never interrupt the agent when the caller says only them. Matching ignores case and punctuation. Send `[]` to clear the list. | ||
|
|
||
| ### Call duration | ||
|
|
||
|
|
@@ -71,7 +78,7 @@ | |
|
|
||
| `conversation.timezone` is the default IANA timezone (like `Asia/Tokyo`) the agent uses for dates and times in conversation. Leave it empty for **automatic**: each session follows the caller's device or phone number, falling back to UTC. Set one when your agent serves a single region regardless of who calls. A per-session `timezone` on the [session request](/agents/build/time-timezone) overrides this. See [Time & timezone](/agents/build/time-timezone) for the full resolution order. | ||
|
|
||
| ## Autosave and publishing | ||
|
|
||
| There is no Save button. Each change is written to the agent's draft moments after you stop editing, and the **Saving… / Saved** indicator at the bottom-left of the page shows the current state. If a save fails, the Builder tells you and keeps your pending edits so nothing is lost. | ||
|
|
||
|
|
@@ -102,9 +109,13 @@ | |
| }, | ||
| "conversation": { | ||
| "max_duration_seconds": 1800, | ||
| "response_wait_ms": 550, | ||
| "response_max_wait_ms": null, | ||
| "eagerness": "balanced", | ||
| "interruptible": true, | ||
| "interruption_sensitivity": "balanced", | ||
| "interruption_ignore_phrases": [], | ||
| "speculative_response": true, | ||
| "timezone": "" | ||
| } | ||
| } | ||
|
|
@@ -122,7 +133,7 @@ | |
| --header "Content-Type: application/json" \ | ||
| --data '{ | ||
| "prompt": { "system_prompt": "You are Aria, a concise support agent for Acme." }, | ||
| "conversation": { "eagerness": "relaxed" } | ||
| "conversation": { "response_wait_ms": 900 } | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🗄️ Data Integrity & Integration | 🟠 Major | 🏗️ Heavy lift 🔎 Supported by static analysis🏁 Script executed: #!/bin/bash
set -eu
printf '%s\n' '--- changed file diff ---'
git diff --no-ext-diff --unified=30 4ef5fb1706a3d7ec9835cbc7635c55442b372824 10feed5ea10b108e39c40216a98f7ccd5fccb31f -- agents/build/configuration.mdx
printf '%s\n' '--- candidate schema/config files ---'
git ls-files | rg -i '(^|/)(openapi|swagger|schema|api|configuration|agent|conversation)' | head -200
printf '%s\n' '--- relevant identifiers ---'
rg -n -S 'PublicAgentConversationPatch|AgentConversationConfig|response_wait_ms|response_max_wait_ms|speculative_response|interruption_ignore_phrases' . --glob '!node_modules' --glob '!dist' --glob '!build' | head -300
printf '%s\n' '--- status and revision availability ---'
git cat-file -t 4ef5fb1706a3d7ec9835cbc7635c55442b372824
git cat-file -t 10feed5ea10b108e39c40216a98f7ccd5fccb31fRepository: fishaudio/docs Length of output: 15635 🤖 get_repo_knowledge executed:
Length of output: 43806 🏁 Script executed: #!/bin/bash
set -eu
git diff --no-ext-diff --unified=30 4ef5fb1706a3d7ec9835cbc7635c55442b372824 10feed5ea10b108e39c40216a98f7ccd5fccb31f -- agents/build/configuration.mdx
rg -n -S 'PublicAgentConversationPatch|AgentConversationConfig|response_wait_ms|response_max_wait_ms|speculative_response|interruption_ignore_phrases' . --glob '!node_modules' --glob '!dist' --glob '!build'Repository: fishaudio/docs Length of output: 11216 🏁 Script executed: #!/bin/bash
set -eu
python3 - <<'PY'
import json
import subprocess
revisions = {
"base": "4ef5fb1706a3d7ec9835cbc7635c55442b372824",
"head": "10feed5ea10b108e39c40216a98f7ccd5fccb31f",
}
for label, rev in revisions.items():
raw = subprocess.check_output(
["git", "show", f"{rev}:api-reference/openapi.json"], text=True
)
doc = json.loads(raw)
schemas = doc["components"]["schemas"]
print(f"--- {label} ---")
for name in ("PublicAgentConversationPatch", "AgentConversationConfig"):
schema = schemas[name]
print(name)
print("additionalProperties:", schema.get("additionalProperties", "<omitted>"))
print("properties:", ", ".join(schema.get("properties", {}).keys()))
print("required:", ", ".join(schema.get("required", [])))
print("openapi diff:")
diff = subprocess.check_output(
["git", "diff", "--no-ext-diff", "--unified=3", f"{revisions['base']}", f"{revisions['head']}", "--", "api-reference/openapi.json"],
text=True,
)
print(diff or "<no changes>")
PY
printf '%s\n' '--- schema source excerpts at reviewed head ---'
sed -n '16030,16205p' api-reference/openapi.json
sed -n '17005,17105p' api-reference/openapi.jsonRepository: fishaudio/docs Length of output: 8444 🏁 Script executed: python3 - <<'PY'
import json, subprocess
for rev in ("4ef5fb1706a3d7ec9835cbc7635c55442b372824","10feed5ea10b108e39c40216a98f7ccd5fccb31f"):
doc=json.loads(subprocess.check_output(["git","show",f"{rev}:api-reference/openapi.json"],text=True))
print(rev)
for name in ("PublicAgentConversationPatch","AgentConversationConfig"):
s=doc["components"]["schemas"][name]
print(name, s.get("additionalProperties"), list(s.get("properties",{})))
print(subprocess.check_output(["git","diff","--no-ext-diff","--unified=3","4ef5fb1706a3d7ec9835cbc7635c55442b372824","10feed5ea10b108e39c40216a98f7ccd5fccb31f","--","api-reference/openapi.json"],text=True) or "<no OpenAPI changes>")
PYRepository: fishaudio/docs Length of output: 1259 Align the conversation examples with the OpenAPI contract.
If these fields are supported, add their exact types, limits, and defaults to both schemas. Otherwise, remove them from the examples. Keep the OpenAPI contract and generated clients aligned with this page. 🤖 Prompt for AI Agents |
||
| }' | ||
| ``` | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win
🔎 Supported by static analysis
🏁 Script executed:
Repository: fishaudio/docs
Length of output: 19632
🤖 get_repo_knowledge executed:
get_repo_knowledge fishaudio/docs /tmp/coderabbit-repo-knowledge/fishaudio-docs-fc775093/architectureLength of output: 44683
Document the read behavior for non-preset response waits.
response_wait_msaccepts 300–2000 ms, butconversation.eagernessmaps only 900, 550, and 450 ms. If a caller setsresponse_wait_msto 700, no preset matches. State the actualGETvalue or fallback for a non-preset wait.🤖 Prompt for AI Agents