You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
`Agora` generates the required ConvoAI REST auth and RTC join tokens automatically when you provide `app_id` and `app_certificate`. For supported Agora-managed models, leave vendor API keys unset; provide keys when you want BYOK.
98
98
99
+
## AI Studio pipeline IDs
100
+
101
+
Use `pipeline_id` when you want a published AI Studio pipeline to provide the base agent configuration:
102
+
103
+
```python
104
+
agent = Agent(
105
+
name="support",
106
+
pipeline_id="studio-pipeline-id",
107
+
)
108
+
109
+
session = agent.create_session(
110
+
client,
111
+
channel="support-room",
112
+
agent_uid="1",
113
+
remote_uids=["100"],
114
+
)
115
+
```
116
+
117
+
You can override it per session:
118
+
119
+
```python
120
+
session = agent.create_session(
121
+
client,
122
+
channel="support-room",
123
+
agent_uid="1",
124
+
remote_uids=["100"],
125
+
pipeline_id="session-pipeline-id",
126
+
)
127
+
```
128
+
129
+
AgentKit sends the resolved value as the top-level `/join` field `pipeline_id`, not inside `properties`. Explicit Agent config such as `with_llm()`, `with_tts()`, `with_stt()`, `with_mllm()`, and `advanced_features` may send `properties` fields that override the saved pipeline settings.
130
+
99
131
### BYOK version
100
132
101
133
Use the same `Agent` builder shape, but provide credentials explicitly when you want vendor-managed billing and routing instead of Agora-managed models.
Copy file name to clipboardExpand all lines: docs/reference/agent.md
+10Lines changed: 10 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -27,12 +27,14 @@ Agent(
27
27
labels: Optional[Dict[str, str]] =None,
28
28
rtc: Optional[RtcConfig] =None,
29
29
filler_words: Optional[FillerWordsConfig] =None,
30
+
pipeline_id: Optional[str] =None,
30
31
)
31
32
```
32
33
33
34
| Parameter | Type | Default | Description |
34
35
|---|---|---|---|
35
36
|`name`|`Optional[str]`|`None`| Agent name, used as default session name |
37
+
|`pipeline_id`|`Optional[str]`|`None`| Published AI Studio pipeline ID used as this agent's base configuration |
36
38
|`instructions`|`Optional[str]`|`None`| Deprecated. Use LLM vendor `system_messages` instead. |
37
39
|`turn_detection`|`Optional[TurnDetectionConfig]`|`None`| Interaction language and turn detection configuration |
38
40
|`interruption`|`Optional[InterruptionConfig]`|`None`| Unified interruption control configuration |
@@ -47,6 +49,8 @@ Agent(
47
49
|`rtc`|`Optional[RtcConfig]`|`None`| RTC media encryption |
48
50
|`filler_words`|`Optional[FillerWordsConfig]`|`None`| Filler words while waiting for LLM |
49
51
52
+
`pipeline_id` is an AI Studio base configuration. Explicit Agent config such as `with_llm()`, `with_tts()`, `with_stt()`, `with_mllm()`, `advanced_features`, and other builder options may send fields in `properties` that override the saved pipeline settings. Session-level `pipeline_id` overrides the agent-level value.
53
+
50
54
The Agent-level `instructions`, `greeting`, `failure_message`, `max_history`, and `greeting_configs` fields are compatibility shims. New code should configure those values on the LLM or MLLM vendor because that matches the core request schema.
@@ -219,6 +225,10 @@ Creates an `AgentSession` bound to the given client and channel.
219
225
|`expires_in`|`Optional[int]`| No | Token lifetime in seconds (default: `86400` = 24 h, Agora max). Only applies when the token is auto-generated. Use `expires_in_hours()` or `expires_in_minutes()` for clarity. Valid range: 1–86400. |
220
226
|`idle_timeout`|`Optional[int]`| No | Idle timeout in seconds |
221
227
|`enable_string_uid`|`Optional[bool]`| No | Enable string UIDs |
228
+
|`preset`|`Optional[Union[str, Sequence[str]]]`| No | Advanced preset value for project-specific routing |
229
+
|`pipeline_id`|`Optional[str]`| No | Published AI Studio pipeline ID for this session. Overrides `agent.pipeline_id`. |
230
+
231
+
`pipeline_id` is sent as the top-level `/join` field `pipeline_id`, not inside `properties`.
|`token`|`Optional[str]`| No | Pre-built RTC token |
52
57
|`idle_timeout`|`Optional[int]`| No | Idle timeout in seconds |
53
58
|`enable_string_uid`|`Optional[bool]`| No | Enable string UIDs |
59
+
|`preset`|`Optional[Union[str, Sequence[str]]]`| No | Advanced preset value for project-specific routing |
60
+
|`pipeline_id`|`Optional[str]`| No | Published AI Studio pipeline ID for this session. Overrides `agent.pipeline_id`. |
61
+
|`expires_in`|`Optional[int]`| No | Auto-generated token lifetime in seconds |
62
+
|`debug`|`Optional[bool]`| No | Enable debug logging of the start request |
63
+
|`warn`|`Optional[Callable[[str], None]]`| No | Custom warning sink |
64
+
65
+
`pipeline_id` is sent as the top-level `/join` field `pipeline_id`, not inside `properties`. If unset, `AgentSession.start()` uses the agent-level value from `Agent(..., pipeline_id=...)`.
0 commit comments