Remote Agents#

This page presents all APIs and classes related to Remote Agents in PyAgentSpec.

Remote Agent class#

class pyagentspec.remoteagent.RemoteAgent(*, id=<factory>, name, description=None, metadata=<factory>, min_agentspec_version=AgentSpecVersionEnum.v25_4_1, max_agentspec_version=AgentSpecVersionEnum.v26_1_0, inputs=None, outputs=None)#

Bases: AgenticComponent

Represents an agent that is defined and created remotely.

Parameters:
  • id (str) – A unique identifier for this Component

  • name (str) – Name of this Component

  • description (str | None) – Optional description of this Component

  • metadata (Dict[str, Any] | None) – Optional, additional metadata related to this Component

  • min_agentspec_version (AgentSpecVersionEnum) –

  • max_agentspec_version (AgentSpecVersionEnum) –

  • inputs (List[Property] | None) – List of inputs accepted by this component

  • outputs (List[Property] | None) – List of outputs exposed by this component

OCI Agent class#

class pyagentspec.ociagent.OciAgent(*, id=<factory>, name, description=None, metadata=<factory>, min_agentspec_version=AgentSpecVersionEnum.v25_4_1, max_agentspec_version=AgentSpecVersionEnum.v26_1_0, inputs=None, outputs=None, agent_endpoint_id, client_config)#

Bases: RemoteAgent

An agent is a component that can do several rounds of conversation to solve a task.

The agent is defined on the OCI console and this is only a wrapper to connect to it. It can be executed by itself, or be executed in a flow using an AgentNode.

Parameters:
  • id (str) – A unique identifier for this Component

  • name (str) – Name of this Component

  • description (str | None) – Optional description of this Component

  • metadata (Dict[str, Any] | None) – Optional, additional metadata related to this Component

  • min_agentspec_version (AgentSpecVersionEnum) –

  • max_agentspec_version (AgentSpecVersionEnum) –

  • inputs (List[Property] | None) – List of inputs accepted by this component

  • outputs (List[Property] | None) – List of outputs exposed by this component

  • agent_endpoint_id (str) –

  • client_config (OciClientConfig) –

agent_endpoint_id: str#
client_config: OciClientConfig#

A2A Agent class#

class pyagentspec.a2aagent.A2AAgent(*, id=<factory>, name, description=None, metadata=<factory>, min_agentspec_version=AgentSpecVersionEnum.v25_4_2, max_agentspec_version=AgentSpecVersionEnum.v26_1_0, inputs=None, outputs=None, agent_url, connection_config, session_parameters=A2ASessionParameters(timeout=60.0, poll_interval=2.0, max_retries=5))#

Bases: RemoteAgent

Component which communicates with a remote server agent using the A2A Protocol.

Parameters:
  • id (str) – A unique identifier for this Component

  • name (str) – Name of this Component

  • description (str | None) – Optional description of this Component

  • metadata (Dict[str, Any] | None) – Optional, additional metadata related to this Component

  • min_agentspec_version (AgentSpecVersionEnum) –

  • max_agentspec_version (AgentSpecVersionEnum) –

  • inputs (List[Property] | None) – List of inputs accepted by this component

  • outputs (List[Property] | None) – List of outputs exposed by this component

  • agent_url (str) – The URL of the remote server agent to connect to.

  • connection_config (A2AConnectionConfig) – Configuration settings for establishing HTTP connections, including timeout and security parameters.

  • session_parameters (A2ASessionParameters) – Parameters controlling session behavior such as polling timeouts and retry logic.

agent_url: str#

The URL of the remote server agent to connect to.

connection_config: A2AConnectionConfig#

Configuration settings for establishing HTTP connections, including timeout and security parameters.

session_parameters: A2ASessionParameters#

Parameters controlling session behavior such as polling timeouts and retry logic.