Skip to content

armgit / letta

Public Imported from GitHub
0

Platform for stateful agents: AI with advanced memory that can learn and self-improve over time.

feat: add descriptive titles to blocks routes for docs search [LET-5756] (#5604)

cthomasc6f1a3a0b8bf
diff --git a/fern/openapi.json b/fern/openapi.json
index cde9fa4d8..e0dba5837 100644
--- a/fern/openapi.json
+++ b/fern/openapi.json
@@ -5416,7 +5416,7 @@
"/v1/agents/{agent_id}/core-memory/blocks/{block_label}": {
"get": {
"tags": ["agents"],
- "summary": "Retrieve Block",
+ "summary": "Retrieve Block For Agent",
"description": "Retrieve a core memory block from an agent.",
"operationId": "retrieve_core_memory_block",
"parameters": [
@@ -5470,7 +5470,7 @@
},
"patch": {
"tags": ["agents"],
- "summary": "Modify Block",
+ "summary": "Modify Block For Agent",
"description": "Updates a core memory block of an agent.",
"operationId": "modify_core_memory_block",
"parameters": [
@@ -5536,7 +5536,7 @@
"/v1/agents/{agent_id}/core-memory/blocks": {
"get": {
"tags": ["agents"],
- "summary": "List Blocks",
+ "summary": "List Blocks For Agent",
"description": "Retrieve the core memory blocks of a specific agent.",
"operationId": "list_core_memory_blocks",
"parameters": [
@@ -5668,7 +5668,7 @@
"/v1/agents/{agent_id}/core-memory/blocks/attach/{block_id}": {
"patch": {
"tags": ["agents"],
- "summary": "Attach Block",
+ "summary": "Attach Block To Agent",
"description": "Attach a core memory block to an agent.",
"operationId": "attach_core_memory_block",
"parameters": [
@@ -5730,7 +5730,7 @@
"/v1/agents/{agent_id}/core-memory/blocks/detach/{block_id}": {
"patch": {
"tags": ["agents"],
- "summary": "Detach Block",
+ "summary": "Detach Block From Agent",
"description": "Detach a core memory block from an agent.",
"operationId": "detach_core_memory_block",
"parameters": [
diff --git a/letta/server/rest_api/routers/v1/agents.py b/letta/server/rest_api/routers/v1/agents.py
index 0ceb15e3f..1015b82d7 100644
--- a/letta/server/rest_api/routers/v1/agents.py
+++ b/letta/server/rest_api/routers/v1/agents.py
@@ -868,7 +868,7 @@ async def retrieve_agent_memory(
@router.get("/{agent_id}/core-memory/blocks/{block_label}", response_model=Block, operation_id="retrieve_core_memory_block")
-async def retrieve_block(
+async def retrieve_block_for_agent(
block_label: str,
agent_id: str = PATH_VALIDATORS[AgentState.__id_prefix__],
server: "SyncServer" = Depends(get_letta_server),
@@ -883,7 +883,7 @@ async def retrieve_block(
@router.get("/{agent_id}/core-memory/blocks", response_model=list[Block], operation_id="list_core_memory_blocks")
-async def list_blocks(
+async def list_blocks_for_agent(
agent_id: str = PATH_VALIDATORS[AgentState.__id_prefix__],
server: "SyncServer" = Depends(get_letta_server),
headers: HeaderParams = Depends(get_headers),
@@ -915,7 +915,7 @@ async def list_blocks(
@router.patch("/{agent_id}/core-memory/blocks/{block_label}", response_model=Block, operation_id="modify_core_memory_block")
-async def modify_block(
+async def modify_block_for_agent(
block_label: str,
agent_id: str = PATH_VALIDATORS[AgentState.__id_prefix__],
block_update: BlockUpdate = Body(...),
@@ -938,7 +938,7 @@ async def modify_block(
@router.patch("/{agent_id}/core-memory/blocks/attach/{block_id}", response_model=AgentState, operation_id="attach_core_memory_block")
-async def attach_block(
+async def attach_block_to_agent(
block_id: str = PATH_VALIDATORS[BaseBlock.__id_prefix__],
agent_id: str = PATH_VALIDATORS[AgentState.__id_prefix__],
server: "SyncServer" = Depends(get_letta_server),
@@ -952,7 +952,7 @@ async def attach_block(
@router.patch("/{agent_id}/core-memory/blocks/detach/{block_id}", response_model=AgentState, operation_id="detach_core_memory_block")
-async def detach_block(
+async def detach_block_from_agent(
block_id: str = PATH_VALIDATORS[BaseBlock.__id_prefix__],
agent_id: str = PATH_VALIDATORS[AgentState.__id_prefix__],
server: "SyncServer" = Depends(get_letta_server),