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
"""Connect to a remote agent on the VeFaaS platform.
38
38
39
-
This class provides an interface to remotely connect with an agent deployed on the VeFaaS platform. It automatically fetches the agent card (metadata) and configures an HTTP client for secure communication. Authentication can be handled either via a bearer token in the HTTP header or via a query string parameter.
39
+
This class provides an interface to remotely connect with an agent deployed on the
40
+
VeFaaS platform. It automatically fetches the agent card (metadata) and configures
41
+
an HTTP client for secure communication.
40
42
41
-
The class extends `RemoteA2aAgent` to provide compatibility with the A2A (Agent-to-Agent) communication layer.
43
+
The class extends `RemoteA2aAgent` to provide compatibility with the A2A
44
+
(Agent-to-Agent) communication layer.
42
45
43
-
This constructor connects to a remote VeFaaS agent endpoint, retrieves its metadata (`agent_card`), and sets up an asynchronous HTTP client (`httpx.AsyncClient`) for subsequent communication. Depending on the provided authentication parameters, it supports three connection modes:
44
-
- **No authentication:** Directly fetches the agent card.
45
-
- **Header authentication:** Sends a bearer token in the `Authorization` header.
46
-
- **Query string authentication:** Appends the token to the URL query.
46
+
This constructor handles agent discovery and HTTP client setup. It determines the
47
+
agent's URL, fetches its metadata (`agent_card`), and prepares an
48
+
`httpx.AsyncClient` for subsequent communication. You can either provide a URL
49
+
directly, or pass a pre-configured `httpx.AsyncClient` with a `base_url`.
50
+
51
+
Authentication can be handled via a bearer token in the HTTP header or via a
52
+
query string parameter. If a custom `httpx_client` is provided, authentication
53
+
details will be added to it.
47
54
48
55
Attributes:
49
56
name (str):
50
57
A unique name identifying this remote agent instance.
51
-
url (str):
52
-
The base URL of the remote agent on the VeFaaS platform.
53
-
auth_token (str | None):
54
-
Optional authentication token used for secure access.
55
-
If not provided, the agent will be accessed without authentication.
58
+
url (Optional[str]):
59
+
The base URL of the remote agent. This is optional if an `httpx_client`
60
+
with a configured `base_url` is provided. If both are given, they must
61
+
not conflict.
62
+
auth_token (Optional[str]):
63
+
Optional authentication token used for secure access. If not provided,
64
+
the agent will be accessed without authentication.
0 commit comments