MCPcopy Create free account
hub / github.com/AQ-MedAI/MedMemoryBench / detach_source

Method detach_source

methods/letta/client/client.py:1480–1487  ·  view source on GitHub ↗

Detach a source from an agent

(self, source_id: str, agent_id: str)

Source from the content-addressed store, hash-verified

1478 return AgentState(**response.json())
1479
1480 def detach_source(self, source_id: str, agent_id: str) -> AgentState:
1481 """Detach a source from an agent"""
1482 params = {"agent_id": str(agent_id)}
1483 response = requests.patch(
1484 f"{self.base_url}/{self.api_prefix}/agents/{agent_id}/sources/detach/{source_id}", params=params, headers=self.headers
1485 )
1486 assert response.status_code == 200, f"Failed to detach source from agent: {response.text}"
1487 return AgentState(**response.json())
1488
1489 # tools
1490

Callers 1

detach_sourceMethod · 0.45

Calls 3

AgentStateClass · 0.90
patchMethod · 0.80
jsonMethod · 0.45

Tested by

no test coverage detected