Skip to content

Commit f36d9e5

Browse files
Agents - AI Hub, make agents discoverable on model hub page for internal discovery (#16678)
* feat: initial commit adding agent hub to ui * feat: add viewable agent hub * feat: working support for making both config + db agents public via new 'public_agent_groups' list * fix: agents.py fix types * feat: working PATCH endpoint for UI changes * feat: add new agents panel with working crud * refactor: refactor to show created_at on be/fe * style: align new page with the agents table * style: more style alignment logic * feat: return if agent is public or not in /v1/agents * feat: initial commit adding ui flow for making agents discoverable * feat: new batch make public endpoint * feat(public_model_hub.tsx): show public agents on public model hub table page * fix(public_model_hub.tsx): add code examples for using the agent in a2a * fix: fix indicating if agent has already been made public * docs: document expected spec for agents is A2A * docs: add agent hub docs * docs: document making agents discoverable * docs: add demo video to docs * fix: fix ui linting errors * fix: update tests
1 parent e45655a commit f36d9e5

File tree

34 files changed

+3697
-335
lines changed

34 files changed

+3697
-335
lines changed
Lines changed: 240 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,240 @@
1+
import Image from '@theme/IdealImage';
2+
import Tabs from '@theme/Tabs';
3+
import TabItem from '@theme/TabItem';
4+
5+
# AI Hub
6+
7+
Share models and agents with your organization. Show developers what's available without needing to rebuild them.
8+
9+
This feature is **available in v1.74.3-stable and above**.
10+
11+
## Overview
12+
13+
Admin can select models/agents to expose on public AI hub → Users go to the public url and see what's available.
14+
15+
<Image img={require('../../img/final_public_model_hub_view.png')} />
16+
17+
## Models
18+
19+
### How to use
20+
21+
#### 1. Go to the Admin UI
22+
23+
Navigate to the Model Hub page in the Admin UI (`PROXY_BASE_URL/ui/?login=success&page=model-hub-table`)
24+
25+
<Image img={require('../../img/model_hub_admin_view.png')} />
26+
27+
#### 2. Select the models you want to expose
28+
29+
Click on `Select Models to Make Public` and select the models you want to expose.
30+
31+
<Image img={require('../../img/make_public_modal.png')} />
32+
33+
#### 3. Confirm the changes
34+
35+
<Image img={require('../../img/make_public_modal_confirmation.png')} />
36+
37+
#### 4. Success!
38+
39+
Go to the public url (`PROXY_BASE_URL/ui/model_hub_table`) and see available models.
40+
41+
<Image img={require('../../img/final_public_model_hub_view.png')} />
42+
43+
### API Endpoints
44+
45+
- `GET /public/model_hub` – returns the list of public model groups. Requires a valid user API key.
46+
- `GET /public/model_hub/info` – returns metadata (docs title, version, useful links) for the public model hub.
47+
48+
## Agents
49+
50+
:::info
51+
Agents are only available in v1.79.4-stable and above.
52+
:::
53+
54+
Share pre-built agents (A2A spec) across your organization. Users can discover and use agents without rebuilding them.
55+
56+
[**Demo Video**](https://drive.google.com/file/d/1r-_Rtiu04RW5Fwwu3_eshtA1oZtC3_DH/view?usp=sharing)
57+
58+
### 1. Create an agent
59+
60+
Create an agent that follows the [A2A spec](https://a2a.dev/).
61+
62+
<Tabs>
63+
<TabItem value="ui" label="UI">
64+
65+
<Image img={require('../../img/add_agent.png')} />
66+
67+
</TabItem>
68+
<TabItem value="api" label="API">
69+
```bash
70+
curl -X POST 'http://0.0.0.0:4000/v1/agents' \
71+
--header 'Authorization: Bearer <your-master-key>' \
72+
--header 'Content-Type: application/json' \
73+
--data '{
74+
"agent_name": "hello-world-agent",
75+
"agent_card_params": {
76+
"protocolVersion": "1.0",
77+
"name": "Hello World Agent",
78+
"description": "Just a hello world agent",
79+
"url": "http://localhost:9999/",
80+
"version": "1.0.0",
81+
"defaultInputModes": ["text"],
82+
"defaultOutputModes": ["text"],
83+
"capabilities": {
84+
"streaming": true
85+
},
86+
"skills": [
87+
{
88+
"id": "hello_world",
89+
"name": "Returns hello world",
90+
"description": "just returns hello world",
91+
"tags": ["hello world"],
92+
"examples": ["hi", "hello world"]
93+
}
94+
]
95+
}
96+
}'
97+
```
98+
99+
**Expected Response**
100+
101+
```json
102+
{
103+
"agent_id": "123e4567-e89b-12d3-a456-426614174000",
104+
"agent_name": "hello-world-agent",
105+
"agent_card_params": {
106+
"protocolVersion": "1.0",
107+
"name": "Hello World Agent",
108+
"description": "Just a hello world agent",
109+
"url": "http://localhost:9999/",
110+
"version": "1.0.0",
111+
"defaultInputModes": ["text"],
112+
"defaultOutputModes": ["text"],
113+
"capabilities": {
114+
"streaming": true
115+
},
116+
"skills": [
117+
{
118+
"id": "hello_world",
119+
"name": "Returns hello world",
120+
"description": "just returns hello world",
121+
"tags": ["hello world"],
122+
"examples": ["hi", "hello world"]
123+
}
124+
]
125+
},
126+
"created_at": "2025-11-15T10:30:00Z",
127+
"created_by": "user123"
128+
}
129+
```
130+
131+
</TabItem>
132+
</Tabs>
133+
134+
### 2. Make agent public
135+
136+
Make the agent discoverable on the AI Hub.
137+
138+
<Tabs>
139+
<TabItem value="ui" label="UI">
140+
141+
Navigate to the Agents Tab on the AI Hub page
142+
143+
<Image img={require('../../img/ai_hub_with_agents.png')} />
144+
145+
Select the agents you want to make public and click on `Make Public` button.
146+
147+
<Image img={require('../../img/make_agents_public.png')} />
148+
149+
</TabItem>
150+
<TabItem value="api" label="API">
151+
152+
**Option 1: Make single agent public**
153+
154+
```bash
155+
curl -X POST 'http://0.0.0.0:4000/v1/agents/123e4567-e89b-12d3-a456-426614174000/make_public' \
156+
--header 'Authorization: Bearer <your-master-key>' \
157+
--header 'Content-Type: application/json'
158+
```
159+
160+
**Option 2: Make multiple agents public**
161+
162+
163+
```bash
164+
curl -X POST 'http://0.0.0.0:4000/v1/agents/make_public' \
165+
--header 'Authorization: Bearer <your-master-key>' \
166+
--header 'Content-Type: application/json' \
167+
--data '{
168+
"agent_ids": [
169+
"123e4567-e89b-12d3-a456-426614174000",
170+
"123e4567-e89b-12d3-a456-426614174001"
171+
]
172+
}'
173+
```
174+
175+
**Expected Response**
176+
177+
```json
178+
{
179+
"message": "Successfully updated public agent groups",
180+
"public_agent_groups": [
181+
"123e4567-e89b-12d3-a456-426614174000"
182+
],
183+
"updated_by": "user123"
184+
}
185+
```
186+
187+
</TabItem>
188+
189+
</Tabs>
190+
191+
192+
193+
### 3. View public agents
194+
195+
Users can now discover the agent via the public endpoint.
196+
197+
<Tabs>
198+
<TabItem value="ui" label="UI">
199+
200+
<Image img={require('../../img/public_agent_hub.png')} />
201+
202+
</TabItem>
203+
<TabItem value="api" label="API">
204+
205+
```bash
206+
curl -X GET 'http://0.0.0.0:4000/public/agent_hub' \
207+
--header 'Authorization: Bearer <user-api-key>'
208+
```
209+
210+
**Expected Response**
211+
212+
```json
213+
[
214+
{
215+
"protocolVersion": "1.0",
216+
"name": "Hello World Agent",
217+
"description": "Just a hello world agent",
218+
"url": "http://localhost:9999/",
219+
"version": "1.0.0",
220+
"defaultInputModes": ["text"],
221+
"defaultOutputModes": ["text"],
222+
"capabilities": {
223+
"streaming": true
224+
},
225+
"skills": [
226+
{
227+
"id": "hello_world",
228+
"name": "Returns hello world",
229+
"description": "just returns hello world",
230+
"tags": ["hello world"],
231+
"examples": ["hi", "hello world"]
232+
}
233+
]
234+
}
235+
]
236+
```
237+
238+
</TabItem>
239+
</Tabs>
240+

docs/my-website/docs/proxy/enterprise.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -901,9 +901,11 @@ curl --location 'http://0.0.0.0:4000/chat/completions' \
901901
'
902902
```
903903
904-
## Public Model Hub
904+
## Public AI Hub
905905
906-
Share a public page of available models for users
906+
Share a public page of available models and agents for users
907+
908+
[Learn more](./ai_hub.md)
907909
908910
<Image img={require('../../img/model_hub.png')} style={{ width: '900px', height: 'auto' }}/>
909911

docs/my-website/docs/proxy/model_hub.md

Lines changed: 0 additions & 53 deletions
This file was deleted.

docs/my-website/docs/proxy/ui.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,13 @@ Allow others to create/delete their own keys.
5959
The Admin UI provides comprehensive model management capabilities:
6060

6161
- **Add Models**: Add new models through the UI without restarting the proxy
62-
- **Model Hub**: Make models public for developers to discover available models
62+
- **AI Hub**: Make models and agents public for developers to discover what's available
6363
- **Price Data Sync**: Keep model pricing data up to date by syncing from GitHub
6464

6565
For detailed information on model management, see [Model Management](./model_management.md).
6666

67+
For information on sharing models and agents, see [AI Hub](./ai_hub.md).
68+
6769
:::tip Sync Model Pricing Data
6870
[Sync model pricing data from GitHub](./sync_models_github.md) to keep your model cost information current.
6971
:::

docs/my-website/img/add_agent.png

616 KB
Loading
626 KB
Loading
647 KB
Loading
445 KB
Loading

docs/my-website/sidebars.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ const sidebars = {
149149
"proxy/admin_ui_sso",
150150
"proxy/custom_root_ui",
151151
"proxy/custom_sso",
152-
"proxy/model_hub",
152+
"proxy/ai_hub",
153153
"proxy/public_teams",
154154
"proxy/self_serve",
155155
"proxy/ui",
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
-- This is an empty migration.
2+

0 commit comments

Comments
 (0)