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
Copy file name to clipboardExpand all lines: content/workspace/developers/ai-features/custom-agent-features.md
+30-37Lines changed: 30 additions & 37 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,11 +3,11 @@ title: Custom agent features
3
3
sidebar_position: 8
4
4
description: Configure and manage custom agent features based on workspace options
5
5
keywords:
6
-
- features
7
-
- configuration
8
-
- workspace options
9
-
- custom agents
10
-
- SSE
6
+
- features
7
+
- configuration
8
+
- workspace options
9
+
- custom agents
10
+
- SSE
11
11
---
12
12
13
13
import HeadTitle from '@site/src/components/General/HeadTitle.tsx';
@@ -22,7 +22,6 @@ Reference implementation in [this GitHub repository](https://github.com/OpenBB-f
22
22
23
23
<imgclassName="pro-border-gradient"width="500"alt="Custom agent features - on and off"src="https://openbb-cms.directus.app/assets/b7b268df-e576-4cc7-837d-d7358fef23bb.png" />
24
24
25
-
26
25
## Architecture
27
26
28
27
Configure custom features in your agent's descriptor and access them through the query request payload. Features can have default states, descriptions, and labels.
@@ -92,10 +91,10 @@ return JSONResponse(content={
92
91
93
92
### OpenBB AI SDK
94
93
95
-
-`QueryRequest.workspace_options`: List of enabled feature entries
94
+
-`QueryRequest.workspace_options`: Dictionary of option values keyed by option id
96
95
-`message_chunk(text)`: Streams response content with feature-aware messaging
97
-
- Boolean features appear as bare names: `"feature-name" in workspace_options`
98
-
- Text and select features appear as `"key=value"` strings: `"model=gpt-4o"`, `"agent-name=My Bot"`
96
+
- Boolean features appear as `true` or `false`: `workspace_options["web-search"]`
97
+
- Text and select features appear as string values: `workspace_options["model"]`
99
98
100
99
## Core logic
101
100
@@ -108,24 +107,16 @@ from sse_starlette.sse import EventSourceResponse
0 commit comments