Skip to content

Agent Zero AI framework

0.9.4 polishing

frdel04a50df6fcb7
diff --git a/python/helpers/fasta2a_server.py b/python/helpers/fasta2a_server.py
index 22e70286d..0dc00ebe6 100644
--- a/python/helpers/fasta2a_server.py
+++ b/python/helpers/fasta2a_server.py
@@ -351,6 +351,21 @@ class DynamicA2AProxy:
})
return
+ from python.helpers import settings
+ cfg = settings.get_settings()
+ if not cfg["a2a_server_enabled"]:
+ response = b'HTTP/1.1 403 Forbidden\r\n\r\nA2A server is disabled'
+ await send({
+ 'type': 'http.response.start',
+ 'status': 403,
+ 'headers': [[b'content-type', b'text/plain']],
+ })
+ await send({
+ 'type': 'http.response.body',
+ 'body': response,
+ })
+ return
+
# Check if reconfiguration is needed
if self._reconfigure_needed:
try:
@@ -410,11 +425,15 @@ class DynamicA2AProxy:
path = path[4:] # Remove '/a2a' prefix
# Check if path matches token pattern /t-{token}/
- if path.startswith('/t-') and '/' in path[3:]:
+ if path.startswith('/t-'):
# Extract token from path
- path_parts = path[3:].split('/', 1) # Remove '/t-' prefix
- request_token = path_parts[0]
- remaining_path = '/' + path_parts[1] if len(path_parts) > 1 else '/'
+ if '/' in path[3:]:
+ path_parts = path[3:].split('/', 1) # Remove '/t-' prefix
+ request_token = path_parts[0]
+ remaining_path = '/' + path_parts[1] if len(path_parts) > 1 else '/'
+ else:
+ request_token = path[3:]
+ remaining_path = '/'
# Validate token
cfg = settings.get_settings()
diff --git a/python/helpers/settings.py b/python/helpers/settings.py
index 12e67c7c1..aae5cc1c2 100644
--- a/python/helpers/settings.py
+++ b/python/helpers/settings.py
@@ -97,6 +97,9 @@ class Settings(TypedDict):
mcp_server_enabled: bool
mcp_server_token: str
+ a2a_server_enabled: bool
+
+
class PartialSettings(Settings, total=False):
pass
@@ -532,25 +535,6 @@ def convert_out(settings: Settings) -> SettingsOutput:
}
)
- # -------- A2A Section --------
- a2a_fields: list[SettingsField] = [
- {
- "id": "show_a2a_connection",
- "title": "Show A2A connection info",
- "description": "Display the URL (including token) other agents can use to connect via FastA2A.",
- "type": "button",
- "value": "Show",
- }
- ]
-
- a2a_section: SettingsSection = {
- "id": "a2a_server",
- "title": "A2A Connection",
- "description": "Share this connection string with other agents.",
- "fields": a2a_fields,
- "tab": "external",
- }
-
if runtime.is_dockerized():
auth_fields.append(
{
@@ -1055,7 +1039,7 @@ def convert_out(settings: Settings) -> SettingsOutput:
{
"id": "mcp_server_enabled",
"title": "Enable A0 MCP Server",
- "description": "Expose Agent Zero as an SSE MCP server. This will make this A0 instance available to MCP clients.",
+ "description": "Expose Agent Zero as an SSE/HTTP MCP server. This will make this A0 instance available to MCP clients.",
"type": "switch",
"value": settings["mcp_server_enabled"],
}
@@ -1080,6 +1064,28 @@ def convert_out(settings: Settings) -> SettingsOutput:
"tab": "mcp",
}
+ # -------- A2A Section --------
+ a2a_fields: list[SettingsField] = []
+
+ a2a_fields.append(
+ {
+ "id": "a2a_server_enabled",
+ "title": "Enable A2A server",
+ "description": "Expose Agent Zero as A2A server. This allows other agents to connect to A0 via A2A protocol.",
+ "type": "switch",
+ "value": settings["a2a_server_enabled"],
+ }
+ )
+
+ a2a_section: SettingsSection = {
+ "id": "a2a_server",
+ "title": "A0 A2A Server",
+ "description": "Agent Zero can be exposed as an A2A server. See <a href=\"javascript:openModal('settings/a2a/a2a-connection.html')\">connection example</a>.",
+ "fields": a2a_fields,
+ "tab": "mcp",
+ }
+
+
# External API section
external_api_fields: list[SettingsField] = []
@@ -1148,9 +1154,9 @@ def convert_out(settings: Settings) -> SettingsOutput:
speech_section,
api_keys_section,
auth_section,
- a2a_section,
mcp_client_section,
mcp_server_section,
+ a2a_section,
external_api_section,
backup_section,
dev_section,
@@ -1302,7 +1308,7 @@ def get_default_settings() -> Settings:
return Settings(
version=_get_version(),
chat_model_provider="openrouter",
- chat_model_name="openai/gpt-4.1",
+ chat_model_name="openai/gpt-5",
chat_model_api_base="",
chat_model_kwargs={"temperature": "0"},
chat_model_ctx_length=100000,
@@ -1312,7 +1318,7 @@ def get_default_settings() -> Settings:
chat_model_rl_input=0,
chat_model_rl_output=0,
util_model_provider="openrouter",
- util_model_name="openai/gpt-4.1-mini",
+ util_model_name="openai/gpt-5-mini",
util_model_api_base="",
util_model_ctx_length=100000,
util_model_ctx_input=0.7,
@@ -1327,7 +1333,7 @@ def get_default_settings() -> Settings:
embed_model_rl_requests=0,
embed_model_rl_input=0,
browser_model_provider="openrouter",
- browser_model_name="openai/gpt-4.1",
+ browser_model_name="openai/gpt-5",
browser_model_api_base="",
browser_model_vision=True,
browser_model_rl_requests=0,
@@ -1370,6 +1376,7 @@ def get_default_settings() -> Settings:
mcp_client_tool_timeout=120,
mcp_server_enabled=False,
mcp_server_token=create_auth_token(),
+ a2a_server_enabled=False,
)
diff --git a/webui/components/settings/external/a2a-connection.html b/webui/components/settings/a2a/a2a-connection.html
similarity index 100%
rename from webui/components/settings/external/a2a-connection.html
rename to webui/components/settings/a2a/a2a-connection.html
diff --git a/webui/index.html b/webui/index.html
index fb45a947c..c796fdd9d 100644
--- a/webui/index.html
+++ b/webui/index.html
@@ -551,7 +551,7 @@
<div class="settings-tab"
:class="{'active': activeTab === 'mcp'}"
@click="switchTab('mcp')"
- title="MCP">MCP</div>
+ title="MCP">MCP/A2A</div>
<div class="settings-tab"
:class="{'active': activeTab === 'developer'}"
@click="switchTab('developer')"
diff --git a/webui/public/a2a_server.svg b/webui/public/a2a_server.svg
index 626a60668..0e97fd5dc 100644
--- a/webui/public/a2a_server.svg
+++ b/webui/public/a2a_server.svg
@@ -1,4 +1 @@
-<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
- <path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.72"/>
- <path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.72-1.72"/>
-</svg>
+<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="#e8eaed"><path d="M280-146q-72 0-123-51t-51-123q0-55 30-98.5t78-62.5v31q-35 18-57.5 53T134-320q0 60 43 103t103 43q60 0 103-43t43-103v-14h210q5-14 17-23t27-9q19 0 32.5 13.5T726-320q0 19-13.5 32.5T680-274q-16 0-27.5-8.5T636-306H454q-8 75-59.5 117.5T280-146Zm400 0q-38 0-71.5-15.5T548-206h41q17 14 41 23t50 9q60 0 103-43t43-103q0-60-43-103t-103-43q-17 0-31.5 3.5T620-453L511-635q-21 5-39-8.5T454-680q0-19 13.5-32.5T500-726q19 0 32.5 13.5T546-680q0 8-3 16t-8 13l97 163q11-2 22.5-4t25.5-2q72 0 123 51t51 123q0 72-51 123t-123 51ZM280-274q-19 0-32.5-13.5T234-320q0-20 15.5-35t41.5-10l105-175q-35-26-52.5-62.5T326-680q0-72 51-123t123-51q72 0 123 51t51 123h-28q0-60-43-103t-103-43q-60 0-103 43t-43 103q0 42 21 75.5t59 55.5L315-350q5 6 8 14t3 16q0 19-13.5 32.5T280-274Z"/></svg>
\ No newline at end of file
diff --git a/webui/public/external_api.svg b/webui/public/external_api.svg
index 5dc4f86b2..ac1721972 100644
--- a/webui/public/external_api.svg
+++ b/webui/public/external_api.svg
@@ -1,28 +1 @@
-<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20">
- <g fill="none" stroke="#000" stroke-width="0.8" stroke-miterlimit="10">
- <!-- Central hub node -->
- <circle cx="10" cy="10" r="2.5"/>
-
- <!-- External connection nodes -->
- <circle cx="3" cy="3" r="1.5"/>
- <circle cx="17" cy="3" r="1.5"/>
- <circle cx="3" cy="17" r="1.5"/>
- <circle cx="17" cy="17" r="1.5"/>
-
- <!-- Connection lines -->
- <line x1="5.1" y1="4.9" x2="7.9" y2="7.1"/>
- <line x1="14.9" y1="4.9" x2="12.1" y2="7.1"/>
- <line x1="5.1" y1="15.1" x2="7.9" y2="12.9"/>
- <line x1="14.9" y1="15.1" x2="12.1" y2="12.9"/>
-
- <!-- API endpoints indicators -->
- <rect x="1" y="7" width="1" height="6" rx="0.5"/>
- <rect x="18" y="7" width="1" height="6" rx="0.5"/>
- <rect x="7" y="1" width="6" height="1" rx="0.5"/>
- <rect x="7" y="18" width="6" height="1" rx="0.5"/>
-
- <!-- Data flow arrows -->
- <path d="M6 8.5 L7.5 9.5 L6 10.5" fill="none" stroke-width="0.6"/>
- <path d="M14 9.5 L12.5 8.5 L14 7.5" fill="none" stroke-width="0.6"/>
- </g>
-</svg>
+<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="#e8eaed"><path d="M240.12-66Q201-66 173.5-93.38q-27.5-27.38-27.5-66.5 0-39.12 27.43-66.62 27.42-27.5 66.6-27.5 10.97 0 23.97 3.5 13 3.5 24 9.5l115-143q-20-21-27-46t-2-51l-170-56q-12 23-34.29 37-22.28 14-49.71 14-39.17 0-66.58-27.38Q26-540.76 26-579.88 26-619 53.38-646.5q27.38-27.5 66.5-27.5 39.12 0 66.62 27.42Q214-619.17 214-580q0 6-.5 9t-.5 6l169 59q11-22 32.5-39t51.5-22v-180q-38-6-59-33.5t-21-59.91q0-38.59 27.38-66.09t66.5-27.5q39.12 0 66.62 27.42Q574-879.17 574-840q0 32-21 59.5T494-747v180q30 5 51 22t33 39l169-59q-1-4-1-6.5v-8.5q0-39.17 27.38-66.58Q800.76-674 839.88-674q39.12 0 66.62 27.38 27.5 27.38 27.5 66.5 0 39.12-27.42 66.62Q879.17-486 840-486q-27.11 0-49.55-14Q768-514 756-537l-170 56q5 26-2 51t-27 45l115 143q11-5 24-8.5t23.97-3.5q39.18 0 66.6 27.38Q814-199.24 814-160.12q0 39.12-27.38 66.62Q759.24-66 720.12-66 681-66 653.5-93.42 626-120.83 626-160q0-17.19 5.5-33.1Q637-209 651-223L536-368q-23 16-55.5 16T424-368L309-223q13 14 19 29.9 6 15.91 6 33.1 0 39.17-27.38 66.58Q279.24-66 240.12-66ZM120-514q27 0 46.5-19.5T186-580q0-27-19.5-46.5T120-646q-27 0-46.5 19.5T54-580q0 27 19.5 46.5T120-514ZM240-94q27 0 46.5-19.5T306-160q0-27-19.5-46.5T240-226q-27 0-46.5 19.5T174-160q0 27 19.5 46.5T240-94Zm240-680q27 0 46.5-19.5T546-840q0-27-19.5-46.5T480-906q-27 0-46.5 19.5T414-840q0 27 19.5 46.5T480-774Zm0 394q33 0 56.5-23.5T560-460q0-33-23.5-56.5T480-540q-33 0-56.5 23.5T400-460q0 33 23.5 56.5T480-380ZM720-94q27 0 46.5-19.5T786-160q0-27-19.5-46.5T720-226q-27 0-46.5 19.5T654-160q0 27 19.5 46.5T720-94Zm120-420q27 0 46.5-19.5T906-580q0-27-19.5-46.5T840-646q-27 0-46.5 19.5T774-580q0 27 19.5 46.5T840-514ZM480-840ZM120-580Zm360 120Zm360-120ZM240-160Zm480 0Z"/></svg>
\ No newline at end of file