aip_sdk.topology
Topology-graph fetch for agent-trace dataset versions.
The topology graph is an aggregate structural summary pooled across a dataset version's traces: which semantic components (agents, tools, retrievers, ...) were observed, and which direct parent→child relationships occurred between them, each with occurrence counts. It is a structure summary, not an execution/flow view.
aip_sdk.topology.TopologyEdge
aip_sdk.topology.TopologyEdge
A directed relationship between two entities, with occurrence counts.
span_count is the number of child-span occurrences on this direct edge;
trace_count is the number of distinct traces the edge was observed in.
aip_sdk.topology.TopologyEdge.kind
aip_sdk.topology.TopologyEdge.kind: str = 'call'
No docstring is defined in the source.
aip_sdk.topology.TopologyEdge.model_config
aip_sdk.topology.TopologyEdge.model_config = ConfigDict(extra='allow')
No docstring is defined in the source.
aip_sdk.topology.TopologyEdge.source
aip_sdk.topology.TopologyEdge.source: Entity
No docstring is defined in the source.
aip_sdk.topology.TopologyEdge.span_count
aip_sdk.topology.TopologyEdge.span_count: int = 1
No docstring is defined in the source.
aip_sdk.topology.TopologyEdge.target
aip_sdk.topology.TopologyEdge.target: Entity
No docstring is defined in the source.
aip_sdk.topology.TopologyEdge.trace_count
aip_sdk.topology.TopologyEdge.trace_count: int = 1
No docstring is defined in the source.
aip_sdk.topology.TopologyGraph
aip_sdk.topology.TopologyGraph
An aggregate structural summary of a dataset version's agent traces.
aip_sdk.topology.TopologyGraph.edges
aip_sdk.topology.TopologyGraph.edges: list[TopologyEdge] = Field(default_factory=list[TopologyEdge])
No docstring is defined in the source.
aip_sdk.topology.TopologyGraph.model_config
aip_sdk.topology.TopologyGraph.model_config = ConfigDict(extra='allow')
No docstring is defined in the source.
aip_sdk.topology.TopologyGraph.node_for
aip_sdk.topology.TopologyGraph.node_for(entity: Entity) -> TopologyNode | None
Return the node whose entity matches entity, or None.
Parameters
entityEntity: The entity identity to look up.
Returns
TopologyNode | None: The matching node, orNoneif no node has that entity.
aip_sdk.topology.TopologyGraph.nodes
aip_sdk.topology.TopologyGraph.nodes: list[TopologyNode] = Field(default_factory=list[TopologyNode])
No docstring is defined in the source.
aip_sdk.topology.TopologyNode
aip_sdk.topology.TopologyNode
One logical component in the topology graph, with how often it was observed.
aip_sdk.topology.TopologyNode.entity
aip_sdk.topology.TopologyNode.entity: Entity
No docstring is defined in the source.
aip_sdk.topology.TopologyNode.model_config
aip_sdk.topology.TopologyNode.model_config = ConfigDict(extra='allow')
No docstring is defined in the source.
aip_sdk.topology.TopologyNode.span_count
aip_sdk.topology.TopologyNode.span_count: int = 1
No docstring is defined in the source.
aip_sdk.topology.get_topology
aip_sdk.topology.get_topology(dataset_id: str, version_id: str, *, client: APIClient | None = None) -> TopologyGraph
Fetch the topology graph for an agent-trace dataset version.
Parameters
dataset_idstr: Dataset ID.version_idstr: Dataset version ID.clientAPIClient | None: Optional API client.
Returns
TopologyGraph: The version's topology graph.
Raises
AuthError: If credentials are missing or invalid.NotFoundError: If the dataset version does not exist, or belongs to a workspace the caller is not a member of.UnprocessableEntityError: If the version is not an agent-trace version.