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
Describe the bug
I am trying to delete an agent from the ADE and it fails with message "There was an error deleting this agent, try again or contact support." Stack trace shows indexerror.
Please describe your setup
How did you install letta?
letta server docker setup
Describe your setup
What's your OS (Windows/MacOS/Linux)? Windows
How are you running letta? (cmd.exe/Powershell/Anaconda Shell/Terminal) ADE
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
Add any other context about the problem here. Adding stacktrace here:
2024-12-17 23:11:33 ERROR: Unhandled error: list index out of range
2024-12-17 23:11:33 Traceback (most recent call last):
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/middleware/errors.py", line 165, in call
2024-12-17 23:11:33 await self.app(scope, receive, _send)
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/middleware/cors.py", line 93, in call
2024-12-17 23:11:33 await self.simple_response(scope, receive, send, request_headers=headers)
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/middleware/cors.py", line 144, in simple_response
2024-12-17 23:11:33 await self.app(scope, receive, send)
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/middleware/exceptions.py", line 62, in call
2024-12-17 23:11:33 await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
2024-12-17 23:11:33 raise exc
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 42, in wrapped_app
2024-12-17 23:11:33 await app(scope, receive, sender)
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/routing.py", line 715, in call
2024-12-17 23:11:33 await self.middleware_stack(scope, receive, send)
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/routing.py", line 735, in app
2024-12-17 23:11:33 await route.handle(scope, receive, send)
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/routing.py", line 288, in handle
2024-12-17 23:11:33 await self.app(scope, receive, send)
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/routing.py", line 76, in app
2024-12-17 23:11:33 await wrap_app_handling_exceptions(app, request)(scope, receive, send)
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
2024-12-17 23:11:33 raise exc
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 42, in wrapped_app
2024-12-17 23:11:33 await app(scope, receive, sender)
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/routing.py", line 73, in app
2024-12-17 23:11:33 response = await f(request)
2024-12-17 23:11:33 ^^^^^^^^^^^^^^^^
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/fastapi/routing.py", line 301, in app
2024-12-17 23:11:33 raw_response = await run_endpoint_function(
2024-12-17 23:11:33 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/fastapi/routing.py", line 214, in run_endpoint_function
2024-12-17 23:11:33 return await run_in_threadpool(dependant.call, **values)
2024-12-17 23:11:33 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/concurrency.py", line 39, in run_in_threadpool
2024-12-17 23:11:33 return await anyio.to_thread.run_sync(func, *args)
2024-12-17 23:11:33 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/anyio/to_thread.py", line 56, in run_sync
2024-12-17 23:11:33 return await get_async_backend().run_sync_in_worker_thread(
2024-12-17 23:11:33 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 2505, in run_sync_in_worker_thread
2024-12-17 23:11:33 return await future
2024-12-17 23:11:33 ^^^^^^^^^^^^
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 1005, in run
2024-12-17 23:11:33 result = context.run(func, *args)
2024-12-17 23:11:33 ^^^^^^^^^^^^^^^^^^^^^^^^
2024-12-17 23:11:33 File "/app/letta/server/rest_api/routers/v1/agents.py", line 88, in get_agent_context_window
2024-12-17 23:11:33 return server.get_agent_context_window(user_id=actor.id, agent_id=agent_id)
2024-12-17 23:11:33 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-12-17 23:11:33 Stack trace: <traceback object at 0x7ff8e71c2a40>
2024-12-17 23:11:33 INFO: 172.17.0.1:41818 - "GET /v1/agents/agent-38b15714-91dc-46c5-83bb-b66299f804d7/context HTTP/1.1" 500 Internal Server Error
2024-12-17 23:11:33 File "/app/letta/server/server.py", line 1833, in get_agent_context_window
2024-12-17 23:11:33 letta_agent = self.load_agent(agent_id=agent_id)
2024-12-17 23:11:33 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-12-17 23:11:33 File "/app/letta/server/server.py", line 476, in load_agent
2024-12-17 23:11:33 agent.rebuild_system_prompt()
2024-12-17 23:11:33 File "/app/letta/agent.py", line 1284, in rebuild_system_prompt
2024-12-17 23:11:33 curr_system_message = self.messages[0] # this is the system + memory bank, not just the system prompt
2024-12-17 23:11:33 ~~~~~~~~~~~~~^^^
2024-12-17 23:11:33 IndexError: list index out of range
2024-12-17 23:11:33 ERROR: Exception in ASGI application
2024-12-17 23:11:33 Traceback (most recent call last):
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/uvicorn/protocols/http/h11_impl.py", line 408, in run_asgi
2024-12-17 23:11:33 result = await app( # type: ignore[func-returns-value]
2024-12-17 23:11:33 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/uvicorn/middleware/proxy_headers.py", line 84, in call
2024-12-17 23:11:33 return await self.app(scope, receive, send)
2024-12-17 23:11:33 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/fastapi/applications.py", line 1054, in call
2024-12-17 23:11:33 await super().call(scope, receive, send)
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/applications.py", line 113, in call
2024-12-17 23:11:33 await self.middleware_stack(scope, receive, send)
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/middleware/errors.py", line 187, in call
2024-12-17 23:11:33 raise exc
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/middleware/errors.py", line 165, in call
2024-12-17 23:11:33 await self.app(scope, receive, _send)
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/middleware/cors.py", line 93, in call
2024-12-17 23:11:33 await self.simple_response(scope, receive, send, request_headers=headers)
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/middleware/cors.py", line 144, in simple_response
2024-12-17 23:11:33 await self.app(scope, receive, send)
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/middleware/exceptions.py", line 62, in call
2024-12-17 23:11:33 await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
2024-12-17 23:11:33 raise exc
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 42, in wrapped_app
2024-12-17 23:11:33 await app(scope, receive, sender)
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/routing.py", line 715, in call
2024-12-17 23:11:33 await self.middleware_stack(scope, receive, send)
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/routing.py", line 735, in app
2024-12-17 23:11:33 await route.handle(scope, receive, send)
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/routing.py", line 288, in handle
2024-12-17 23:11:33 await self.app(scope, receive, send)
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/routing.py", line 76, in app
2024-12-17 23:11:33 await wrap_app_handling_exceptions(app, request)(scope, receive, send)
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
2024-12-17 23:11:33 raise exc
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 42, in wrapped_app
2024-12-17 23:11:33 await app(scope, receive, sender)
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/routing.py", line 73, in app
2024-12-17 23:11:33 response = await f(request)
2024-12-17 23:11:33 ^^^^^^^^^^^^^^^^
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/fastapi/routing.py", line 301, in app
2024-12-17 23:11:33 raw_response = await run_endpoint_function(
2024-12-17 23:11:33 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/fastapi/routing.py", line 214, in run_endpoint_function
2024-12-17 23:11:33 return await run_in_threadpool(dependant.call, **values)
2024-12-17 23:11:33 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/concurrency.py", line 39, in run_in_threadpool
2024-12-17 23:11:33 return await anyio.to_thread.run_sync(func, *args)
2024-12-17 23:11:33 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/anyio/to_thread.py", line 56, in run_sync
2024-12-17 23:11:33 return await get_async_backend().run_sync_in_worker_thread(
2024-12-17 23:11:33 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 2505, in run_sync_in_worker_thread
2024-12-17 23:11:33 return await future
2024-12-17 23:11:33 ^^^^^^^^^^^^
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 1005, in run
2024-12-17 23:11:33 result = context.run(func, *args)
2024-12-17 23:11:33 ^^^^^^^^^^^^^^^^^^^^^^^^
2024-12-17 23:11:33 File "/app/letta/server/rest_api/routers/v1/agents.py", line 88, in get_agent_context_window
2024-12-17 23:11:33 return server.get_agent_context_window(user_id=actor.id, agent_id=agent_id)
2024-12-17 23:11:33 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-12-17 23:11:33 File "/app/letta/server/server.py", line 1833, in get_agent_context_window
2024-12-17 23:11:33 letta_agent = self.load_agent(agent_id=agent_id)
2024-12-17 23:11:33 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-12-17 23:11:33 File "/app/letta/server/server.py", line 476, in load_agent
2024-12-17 23:11:33 agent.rebuild_system_prompt()
2024-12-17 23:11:33 File "/app/letta/agent.py", line 1284, in rebuild_system_prompt
2024-12-17 23:11:33 curr_system_message = self.messages[0] # this is the system + memory bank, not just the system prompt
2024-12-17 23:11:33 ~~~~~~~~~~~~~^^^
2024-12-17 23:11:33 IndexError: list index out of range
2024-12-17 23:11:33 ERROR: Unhandled error: list index out of range
2024-12-17 23:11:33 Traceback (most recent call last):
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/middleware/errors.py", line 165, in call
2024-12-17 23:11:33 await self.app(scope, receive, _send)
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/middleware/cors.py", line 93, in call
2024-12-17 23:11:33 await self.simple_response(scope, receive, send, request_headers=headers)
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/middleware/cors.py", line 144, in simple_response
2024-12-17 23:11:33 await self.app(scope, receive, send)
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/middleware/exceptions.py", line 62, in call
2024-12-17 23:11:33 await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
2024-12-17 23:11:33 raise exc
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 42, in wrapped_app
2024-12-17 23:11:33 await app(scope, receive, sender)
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/routing.py", line 715, in call
2024-12-17 23:11:33 await self.middleware_stack(scope, receive, send)
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/routing.py", line 735, in app
2024-12-17 23:11:33 await route.handle(scope, receive, send)
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/routing.py", line 288, in handle
2024-12-17 23:11:33 await self.app(scope, receive, send)
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/routing.py", line 76, in app
2024-12-17 23:11:33 await wrap_app_handling_exceptions(app, request)(scope, receive, send)
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
2024-12-17 23:11:33 raise exc
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 42, in wrapped_app
2024-12-17 23:11:33 await app(scope, receive, sender)
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/routing.py", line 73, in app
2024-12-17 23:11:33 response = await f(request)
2024-12-17 23:11:33 ^^^^^^^^^^^^^^^^
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/fastapi/routing.py", line 301, in app
2024-12-17 23:11:33 raw_response = await run_endpoint_function(
2024-12-17 23:11:33 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/fastapi/routing.py", line 214, in run_endpoint_function
2024-12-17 23:11:33 return await run_in_threadpool(dependant.call, **values)
2024-12-17 23:11:33 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/concurrency.py", line 39, in run_in_threadpool
2024-12-17 23:11:33 return await anyio.to_thread.run_sync(func, *args)
2024-12-17 23:11:33 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/anyio/to_thread.py", line 56, in run_sync
2024-12-17 23:11:33 return await get_async_backend().run_sync_in_worker_thread(
2024-12-17 23:11:33 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 2505, in run_sync_in_worker_thread
2024-12-17 23:11:33 return await future
2024-12-17 23:11:33 ^^^^^^^^^^^^
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 1005, in run
2024-12-17 23:11:33 result = context.run(func, *args)
2024-12-17 23:11:33 ^^^^^^^^^^^^^^^^^^^^^^^^
2024-12-17 23:11:33 File "/app/letta/server/rest_api/routers/v1/agents.py", line 434, in get_agent_messages
2024-12-17 23:11:33 return server.get_agent_recall_cursor(
2024-12-17 23:11:33 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-12-17 23:11:33 File "/app/letta/server/server.py", line 1389, in get_agent_recall_cursor
2024-12-17 23:11:33 letta_agent = self.load_agent(agent_id=agent_id)
2024-12-17 23:11:33 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-12-17 23:11:33 File "/app/letta/server/server.py", line 476, in load_agent
2024-12-17 23:11:33 agent.rebuild_system_prompt()
2024-12-17 23:11:33 File "/app/letta/agent.py", line 1284, in rebuild_system_prompt
2024-12-17 23:11:33 curr_system_message = self.messages[0] # this is the system + memory bank, not just the system prompt
2024-12-17 23:11:33 ~~~~~~~~~~~~~^^^
2024-12-17 23:11:33 IndexError: list index out of range
2024-12-17 23:11:33 Stack trace: <traceback object at 0x7ff8e651a7c0>
2024-12-17 23:11:33 INFO: 172.17.0.1:41804 - "GET /v1/agents/agent-38b15714-91dc-46c5-83bb-b66299f804d7/messages?limit=50 HTTP/1.1" 500 Internal Server Error
2024-12-17 23:11:33 ERROR: Exception in ASGI application
2024-12-17 23:11:33 Traceback (most recent call last):
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/uvicorn/protocols/http/h11_impl.py", line 408, in run_asgi
2024-12-17 23:11:33 result = await app( # type: ignore[func-returns-value]
2024-12-17 23:11:33 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/uvicorn/middleware/proxy_headers.py", line 84, in call
2024-12-17 23:11:33 return await self.app(scope, receive, send)
2024-12-17 23:11:33 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/fastapi/applications.py", line 1054, in call
2024-12-17 23:11:33 await super().call(scope, receive, send)
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/applications.py", line 113, in call
2024-12-17 23:11:33 await self.middleware_stack(scope, receive, send)
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/middleware/errors.py", line 187, in call
2024-12-17 23:11:33 raise exc
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/middleware/errors.py", line 165, in call
2024-12-17 23:11:33 await self.app(scope, receive, _send)
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/middleware/cors.py", line 93, in call
2024-12-17 23:11:33 await self.simple_response(scope, receive, send, request_headers=headers)
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/middleware/cors.py", line 144, in simple_response
2024-12-17 23:11:33 await self.app(scope, receive, send)
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/middleware/exceptions.py", line 62, in call
2024-12-17 23:11:33 await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
2024-12-17 23:11:33 raise exc
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 42, in wrapped_app
2024-12-17 23:11:33 await app(scope, receive, sender)
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/routing.py", line 715, in call
2024-12-17 23:11:33 await self.middleware_stack(scope, receive, send)
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/routing.py", line 735, in app
2024-12-17 23:11:33 await route.handle(scope, receive, send)
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/routing.py", line 288, in handle
2024-12-17 23:11:33 await self.app(scope, receive, send)
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/routing.py", line 76, in app
2024-12-17 23:11:33 await wrap_app_handling_exceptions(app, request)(scope, receive, send)
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
2024-12-17 23:11:33 raise exc
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 42, in wrapped_app
2024-12-17 23:11:33 await app(scope, receive, sender)
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/routing.py", line 73, in app
2024-12-17 23:11:33 response = await f(request)
2024-12-17 23:11:33 ^^^^^^^^^^^^^^^^
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/fastapi/routing.py", line 301, in app
2024-12-17 23:11:33 raw_response = await run_endpoint_function(
2024-12-17 23:11:33 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/fastapi/routing.py", line 214, in run_endpoint_function
2024-12-17 23:11:33 return await run_in_threadpool(dependant.call, **values)
2024-12-17 23:11:33 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/concurrency.py", line 39, in run_in_threadpool
2024-12-17 23:11:33 return await anyio.to_thread.run_sync(func, *args)
2024-12-17 23:11:33 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/anyio/to_thread.py", line 56, in run_sync
2024-12-17 23:11:33 return await get_async_backend().run_sync_in_worker_thread(
2024-12-17 23:11:33 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 2505, in run_sync_in_worker_thread
2024-12-17 23:11:33 return await future
2024-12-17 23:11:33 ^^^^^^^^^^^^
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 1005, in run
2024-12-17 23:11:33 result = context.run(func, *args)
2024-12-17 23:11:33 ^^^^^^^^^^^^^^^^^^^^^^^^
2024-12-17 23:11:33 File "/app/letta/server/rest_api/routers/v1/agents.py", line 434, in get_agent_messages
2024-12-17 23:11:33 return server.get_agent_recall_cursor(
2024-12-17 23:11:33 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-12-17 23:11:33 File "/app/letta/server/server.py", line 1389, in get_agent_recall_cursor
2024-12-17 23:11:33 letta_agent = self.load_agent(agent_id=agent_id)
2024-12-17 23:11:33 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-12-17 23:11:33 File "/app/letta/server/server.py", line 476, in load_agent
2024-12-17 23:11:33 agent.rebuild_system_prompt()
2024-12-17 23:11:33 File "/app/letta/agent.py", line 1284, in rebuild_system_prompt
2024-12-17 23:11:33 curr_system_message = self.messages[0] # this is the system + memory bank, not just the system prompt
2024-12-17 23:11:33 ~~~~~~~~~~~~~^^^
2024-12-17 23:11:33 IndexError: list index out of range
2024-12-17 23:11:33 ERROR: Unhandled error: list index out of range
2024-12-17 23:11:33 Traceback (most recent call last):
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/middleware/errors.py", line 165, in call
2024-12-17 23:11:33 await self.app(scope, receive, _send)
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/middleware/cors.py", line 93, in call
2024-12-17 23:11:33 await self.simple_response(scope, receive, send, request_headers=headers)
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/middleware/cors.py", line 144, in simple_response
2024-12-17 23:11:33 await self.app(scope, receive, send)
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/middleware/exceptions.py", line 62, in call
2024-12-17 23:11:33 await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
2024-12-17 23:11:33 raise exc
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 42, in wrapped_app
2024-12-17 23:11:33 await app(scope, receive, sender)
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/routing.py", line 715, in call
2024-12-17 23:11:33 await self.middleware_stack(scope, receive, send)
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/routing.py", line 735, in app
2024-12-17 23:11:33 await route.handle(scope, receive, send)
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/routing.py", line 288, in handle
2024-12-17 23:11:33 await self.app(scope, receive, send)
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/routing.py", line 76, in app
2024-12-17 23:11:33 await wrap_app_handling_exceptions(app, request)(scope, receive, send)
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
2024-12-17 23:11:33 raise exc
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 42, in wrapped_app
2024-12-17 23:11:33 await app(scope, receive, sender)
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/routing.py", line 73, in app
2024-12-17 23:11:33 response = await f(request)
2024-12-17 23:11:33 ^^^^^^^^^^^^^^^^
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/fastapi/routing.py", line 301, in app
2024-12-17 23:11:33 raw_response = await run_endpoint_function(
2024-12-17 23:11:33 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/fastapi/routing.py", line 214, in run_endpoint_function
2024-12-17 23:11:33 return await run_in_threadpool(dependant.call, **values)
2024-12-17 23:11:33 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/concurrency.py", line 39, in run_in_threadpool
2024-12-17 23:11:33 return await anyio.to_thread.run_sync(func, *args)
2024-12-17 23:11:33 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/anyio/to_thread.py", line 56, in run_sync
2024-12-17 23:11:33 return await get_async_backend().run_sync_in_worker_thread(
2024-12-17 23:11:33 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 2505, in run_sync_in_worker_thread
2024-12-17 23:11:33 return await future
2024-12-17 23:11:33 ^^^^^^^^^^^^
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 1005, in run
2024-12-17 23:11:33 result = context.run(func, *args)
2024-12-17 23:11:33 ^^^^^^^^^^^^^^^^^^^^^^^^
2024-12-17 23:11:33 File "/app/letta/server/rest_api/routers/v1/agents.py", line 369, in get_agent_archival_memory
2024-12-17 23:11:33 return server.get_agent_archival_cursor(
2024-12-17 23:11:33 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-12-17 23:11:33 File "/app/letta/server/server.py", line 1326, in get_agent_archival_cursor
2024-12-17 23:11:33 letta_agent = self.load_agent(agent_id=agent_id)
2024-12-17 23:11:33 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-12-17 23:11:33 Stack trace: <traceback object at 0x7ff8e6581ac0>
2024-12-17 23:11:33 INFO: 172.17.0.1:41820 - "GET /v1/agents/agent-38b15714-91dc-46c5-83bb-b66299f804d7/archival HTTP/1.1" 500 Internal Server Error
2024-12-17 23:11:33 File "/app/letta/server/server.py", line 476, in load_agent
2024-12-17 23:11:33 agent.rebuild_system_prompt()
2024-12-17 23:11:33 File "/app/letta/agent.py", line 1284, in rebuild_system_prompt
2024-12-17 23:11:33 curr_system_message = self.messages[0] # this is the system + memory bank, not just the system prompt
2024-12-17 23:11:33 ~~~~~~~~~~~~~^^^
2024-12-17 23:11:33 IndexError: list index out of range
2024-12-17 23:11:33 ERROR: Exception in ASGI application
2024-12-17 23:11:33 Traceback (most recent call last):
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/uvicorn/protocols/http/h11_impl.py", line 408, in run_asgi
2024-12-17 23:11:33 result = await app( # type: ignore[func-returns-value]
2024-12-17 23:11:33 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/uvicorn/middleware/proxy_headers.py", line 84, in call
2024-12-17 23:11:33 return await self.app(scope, receive, send)
2024-12-17 23:11:33 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/fastapi/applications.py", line 1054, in call
2024-12-17 23:11:33 await super().call(scope, receive, send)
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/applications.py", line 113, in call
2024-12-17 23:11:33 await self.middleware_stack(scope, receive, send)
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/middleware/errors.py", line 187, in call
2024-12-17 23:11:33 raise exc
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/middleware/errors.py", line 165, in call
2024-12-17 23:11:33 await self.app(scope, receive, _send)
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/middleware/cors.py", line 93, in call
2024-12-17 23:11:33 await self.simple_response(scope, receive, send, request_headers=headers)
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/middleware/cors.py", line 144, in simple_response
2024-12-17 23:11:33 await self.app(scope, receive, send)
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/middleware/exceptions.py", line 62, in call
2024-12-17 23:11:33 await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
2024-12-17 23:11:33 raise exc
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 42, in wrapped_app
2024-12-17 23:11:33 await app(scope, receive, sender)
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/routing.py", line 715, in call
2024-12-17 23:11:33 await self.middleware_stack(scope, receive, send)
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/routing.py", line 735, in app
2024-12-17 23:11:33 await route.handle(scope, receive, send)
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/routing.py", line 288, in handle
2024-12-17 23:11:33 await self.app(scope, receive, send)
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/routing.py", line 76, in app
2024-12-17 23:11:33 await wrap_app_handling_exceptions(app, request)(scope, receive, send)
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
2024-12-17 23:11:33 raise exc
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 42, in wrapped_app
2024-12-17 23:11:33 await app(scope, receive, sender)
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/routing.py", line 73, in app
2024-12-17 23:11:33 response = await f(request)
2024-12-17 23:11:33 ^^^^^^^^^^^^^^^^
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/fastapi/routing.py", line 301, in app
2024-12-17 23:11:33 raw_response = await run_endpoint_function(
2024-12-17 23:11:33 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/fastapi/routing.py", line 214, in run_endpoint_function
2024-12-17 23:11:33 return await run_in_threadpool(dependant.call, **values)
2024-12-17 23:11:33 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/concurrency.py", line 39, in run_in_threadpool
2024-12-17 23:11:33 return await anyio.to_thread.run_sync(func, *args)
2024-12-17 23:11:33 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/anyio/to_thread.py", line 56, in run_sync
2024-12-17 23:11:33 return await get_async_backend().run_sync_in_worker_thread(
2024-12-17 23:11:33 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 2505, in run_sync_in_worker_thread
2024-12-17 23:11:33 return await future
2024-12-17 23:11:33 ^^^^^^^^^^^^
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 1005, in run
2024-12-17 23:11:33 result = context.run(func, *args)
2024-12-17 23:11:33 ^^^^^^^^^^^^^^^^^^^^^^^^
2024-12-17 23:11:33 File "/app/letta/server/rest_api/routers/v1/agents.py", line 369, in get_agent_archival_memory
2024-12-17 23:11:33 return server.get_agent_archival_cursor(
2024-12-17 23:11:33 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-12-17 23:11:33 File "/app/letta/server/server.py", line 1326, in get_agent_archival_cursor
2024-12-17 23:11:33 letta_agent = self.load_agent(agent_id=agent_id)
2024-12-17 23:11:33 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-12-17 23:11:33 File "/app/letta/server/server.py", line 476, in load_agent
2024-12-17 23:11:33 agent.rebuild_system_prompt()
2024-12-17 23:11:33 File "/app/letta/agent.py", line 1284, in rebuild_system_prompt
2024-12-17 23:11:33 curr_system_message = self.messages[0] # this is the system + memory bank, not just the system prompt
2024-12-17 23:11:33 ~~~~~~~~~~~~~^^^
2024-12-17 23:11:33 IndexError: list index out of range
2024-12-17 23:11:34 2024-12-17 19:11:34.971 UTC [318] ERROR: update or delete on table "agents" violates foreign key constraint "passages_agent_id_fkey" on table "passages"
2024-12-17 23:11:34 2024-12-17 19:11:34.971 UTC [318] DETAIL: Key (id)=(agent-38b15714-91dc-46c5-83bb-b66299f804d7) is still referenced from table "passages".
2024-12-17 23:11:34 2024-12-17 19:11:34.971 UTC [318] STATEMENT: DELETE FROM agents WHERE agents.id = 'agent-38b15714-91dc-46c5-83bb-b66299f804d7'
2024-12-17 23:11:34 Letta.letta.server.server - ERROR - Failed to delete agent agent-38b15714-91dc-46c5-83bb-b66299f804d7 via ID with:
2024-12-17 23:11:34 (psycopg2.errors.ForeignKeyViolation) update or delete on table "agents" violates foreign key constraint "passages_agent_id_fkey" on table "passages"
2024-12-17 23:11:34 DETAIL: Key (id)=(agent-38b15714-91dc-46c5-83bb-b66299f804d7) is still referenced from table "passages".
2024-12-17 23:11:34
2024-12-17 23:11:34 [SQL: DELETE FROM agents WHERE agents.id = %(id_1)s]
2024-12-17 23:11:34 [parameters: {'id_1': 'agent-38b15714-91dc-46c5-83bb-b66299f804d7'}]
2024-12-17 23:11:34 (Background on this error at: https://sqlalche.me/e/20/gkpj)
2024-12-17 23:11:34 Traceback (most recent call last):
2024-12-17 23:11:34 File "/app/.venv/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 1967, in _exec_single_context
2024-12-17 23:11:34 self.dialect.do_execute(
2024-12-17 23:11:34 File "/app/.venv/lib/python3.11/site-packages/sqlalchemy/engine/default.py", line 941, in do_execute
2024-12-17 23:11:34 cursor.execute(statement, parameters)
2024-12-17 23:11:34 psycopg2.errors.ForeignKeyViolation: update or delete on table "agents" violates foreign key constraint "passages_agent_id_fkey" on table "passages"
2024-12-17 23:11:34 DETAIL: Key (id)=(agent-38b15714-91dc-46c5-83bb-b66299f804d7) is still referenced from table "passages".
2024-12-17 23:11:34
2024-12-17 23:11:34
2024-12-17 23:11:34 The above exception was the direct cause of the following exception:
2024-12-17 23:11:34
2024-12-17 23:11:34 Traceback (most recent call last):
2024-12-17 23:11:34 File "/app/letta/server/server.py", line 1528, in delete_agent
2024-12-17 23:11:34 self.ms.delete_agent(agent_id=agent_id, per_agent_lock_manager=self.per_agent_lock_manager)
2024-12-17 23:11:34 File "/app/letta/utils.py", line 559, in wrapper
2024-12-17 23:11:34 return func(*args, **kwargs)
2024-12-17 23:11:34 ^^^^^^^^^^^^^^^^^^^^^
2024-12-17 23:11:34 File "/app/letta/metadata.py", line 331, in delete_agent
2024-12-17 23:11:34 session.query(AgentModel).filter(AgentModel.id == agent_id).delete()
2024-12-17 23:11:34 File "/app/.venv/lib/python3.11/site-packages/sqlalchemy/orm/query.py", line 3162, in delete
2024-12-17 23:11:34 result: CursorResult[Any] = self.session.execute(
2024-12-17 23:11:34 ^^^^^^^^^^^^^^^^^^^^^
2024-12-17 23:11:34 File "/app/.venv/lib/python3.11/site-packages/sqlalchemy/orm/session.py", line 2362, in execute
2024-12-17 23:11:34 return self._execute_internal(
2024-12-17 23:11:34 ^^^^^^^^^^^^^^^^^^^^^^^
2024-12-17 23:11:34 File "/app/.venv/lib/python3.11/site-packages/sqlalchemy/orm/session.py", line 2247, in _execute_internal
2024-12-17 23:11:34 result: Result[Any] = compile_state_cls.orm_execute_statement(
2024-12-17 23:11:34 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-12-17 23:11:34 File "/app/.venv/lib/python3.11/site-packages/sqlalchemy/orm/bulk_persistence.py", line 2021, in orm_execute_statement
2024-12-17 23:11:34 return super().orm_execute_statement(
2024-12-17 23:11:34 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-12-17 23:11:34 File "/app/.venv/lib/python3.11/site-packages/sqlalchemy/orm/context.py", line 305, in orm_execute_statement
2024-12-17 23:11:34 result = conn.execute(
2024-12-17 23:11:34 ^^^^^^^^^^^^^
2024-12-17 23:11:34 File "/app/.venv/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 1418, in execute
2024-12-17 23:11:34 return meth(
2024-12-17 23:11:34 ^^^^^
2024-12-17 23:11:34 File "/app/.venv/lib/python3.11/site-packages/sqlalchemy/sql/elements.py", line 515, in _execute_on_connection
2024-12-17 23:11:34 return connection._execute_clauseelement(
2024-12-17 23:11:34 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-12-17 23:11:34 File "/app/.venv/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 1640, in _execute_clauseelement
2024-12-17 23:11:34 ret = self._execute_context(
2024-12-17 23:11:34 ^^^^^^^^^^^^^^^^^^^^^^
2024-12-17 23:11:34 File "/app/.venv/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 1846, in _execute_context
2024-12-17 23:11:34 return self._exec_single_context(
2024-12-17 23:11:34 ^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-12-17 23:11:34 File "/app/.venv/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 1986, in _exec_single_context
2024-12-17 23:11:34 self._handle_dbapi_exception(
2024-12-17 23:11:34 File "/app/.venv/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 2355, in _handle_dbapi_exception
2024-12-17 23:11:34 raise sqlalchemy_exception.with_traceback(exc_info[2]) from e
2024-12-17 23:11:34 File "/app/.venv/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 1967, in _exec_single_context
2024-12-17 23:11:34 self.dialect.do_execute(
2024-12-17 23:11:34 File "/app/.venv/lib/python3.11/site-packages/sqlalchemy/engine/default.py", line 941, in do_execute
2024-12-17 23:11:34 cursor.execute(statement, parameters)
2024-12-17 23:11:34 sqlalchemy.exc.IntegrityError: (psycopg2.errors.ForeignKeyViolation) update or delete on table "agents" violates foreign key constraint "passages_agent_id_fkey" on table "passages"
2024-12-17 23:11:34 DETAIL: Key (id)=(agent-38b15714-91dc-46c5-83bb-b66299f804d7) is still referenced from table "passages".
2024-12-17 23:11:34
2024-12-17 23:11:34 [SQL: DELETE FROM agents WHERE agents.id = %(id_1)s]
2024-12-17 23:11:34 [parameters: {'id_1': 'agent-38b15714-91dc-46c5-83bb-b66299f804d7'}]
2024-12-17 23:11:34 (Background on this error at: https://sqlalche.me/e/20/gkpj)
2024-12-17 23:11:34 INFO: 172.17.0.1:41826 - "DELETE /v1/agents/agent-38b15714-91dc-46c5-83bb-b66299f804d7 HTTP/1.1" 400 Bad Request
2024-12-17 23:11:35 INFO: 172.17.0.1:41826 - "GET /v1/jobs/active HTTP/1.1" 200 OK
2024-12-17 23:11:35 ERROR: Unhandled error: list index out of range
2024-12-17 23:11:35 Traceback (most recent call last):
2024-12-17 23:11:35 File "/app/.venv/lib/python3.11/site-packages/starlette/middleware/errors.py", line 165, in call
2024-12-17 23:11:35 await self.app(scope, receive, _send)
2024-12-17 23:11:35 File "/app/.venv/lib/python3.11/site-packages/starlette/middleware/cors.py", line 93, in call
2024-12-17 23:11:35 await self.simple_response(scope, receive, send, request_headers=headers)
2024-12-17 23:11:35 File "/app/.venv/lib/python3.11/site-packages/starlette/middleware/cors.py", line 144, in simple_response
2024-12-17 23:11:35 await self.app(scope, receive, send)
2024-12-17 23:11:35 File "/app/.venv/lib/python3.11/site-packages/starlette/middleware/exceptions.py", line 62, in call
2024-12-17 23:11:35 await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
2024-12-17 23:11:35 File "/app/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
2024-12-17 23:11:35 raise exc
2024-12-17 23:11:35 File "/app/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 42, in wrapped_app
2024-12-17 23:11:35 await app(scope, receive, sender)
2024-12-17 23:11:35 File "/app/.venv/lib/python3.11/site-packages/starlette/routing.py", line 715, in call
2024-12-17 23:11:35 await self.middleware_stack(scope, receive, send)
2024-12-17 23:11:35 File "/app/.venv/lib/python3.11/site-packages/starlette/routing.py", line 735, in app
2024-12-17 23:11:35 await route.handle(scope, receive, send)
2024-12-17 23:11:35 File "/app/.venv/lib/python3.11/site-packages/starlette/routing.py", line 288, in handle
2024-12-17 23:11:35 await self.app(scope, receive, send)
2024-12-17 23:11:35 File "/app/.venv/lib/python3.11/site-packages/starlette/routing.py", line 76, in app
2024-12-17 23:11:35 await wrap_app_handling_exceptions(app, request)(scope, receive, send)
2024-12-17 23:11:35 File "/app/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
2024-12-17 23:11:35 raise exc
2024-12-17 23:11:35 File "/app/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 42, in wrapped_app
2024-12-17 23:11:35 await app(scope, receive, sender)
2024-12-17 23:11:35 File "/app/.venv/lib/python3.11/site-packages/starlette/routing.py", line 73, in app
2024-12-17 23:11:35 response = await f(request)
2024-12-17 23:11:35 ^^^^^^^^^^^^^^^^
2024-12-17 23:11:35 File "/app/.venv/lib/python3.11/site-packages/fastapi/routing.py", line 301, in app
2024-12-17 23:11:35 raw_response = await run_endpoint_function(
2024-12-17 23:11:35 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-12-17 23:11:35 File "/app/.venv/lib/python3.11/site-packages/fastapi/routing.py", line 214, in run_endpoint_function
2024-12-17 23:11:35 return await run_in_threadpool(dependant.call, **values)
2024-12-17 23:11:35 Stack trace: <traceback object at 0x7ff8e6503580>
2024-12-17 23:11:35 INFO: 172.17.0.1:41826 - "GET /v1/agents/agent-38b15714-91dc-46c5-83bb-b66299f804d7/context HTTP/1.1" 500 Internal Server Error
2024-12-17 23:11:35 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-12-17 23:11:35 File "/app/.venv/lib/python3.11/site-packages/starlette/concurrency.py", line 39, in run_in_threadpool
2024-12-17 23:11:35 return await anyio.to_thread.run_sync(func, *args)
2024-12-17 23:11:35 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-12-17 23:11:35 File "/app/.venv/lib/python3.11/site-packages/anyio/to_thread.py", line 56, in run_sync
2024-12-17 23:11:35 return await get_async_backend().run_sync_in_worker_thread(
2024-12-17 23:11:35 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-12-17 23:11:35 File "/app/.venv/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 2505, in run_sync_in_worker_thread
2024-12-17 23:11:35 return await future
2024-12-17 23:11:35 ^^^^^^^^^^^^
2024-12-17 23:11:35 File "/app/.venv/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 1005, in run
2024-12-17 23:11:35 result = context.run(func, *args)
2024-12-17 23:11:35 ^^^^^^^^^^^^^^^^^^^^^^^^
2024-12-17 23:11:35 File "/app/letta/server/rest_api/routers/v1/agents.py", line 88, in get_agent_context_window
2024-12-17 23:11:35 return server.get_agent_context_window(user_id=actor.id, agent_id=agent_id)
2024-12-17 23:11:35 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-12-17 23:11:35 File "/app/letta/server/server.py", line 1833, in get_agent_context_window
2024-12-17 23:11:35 letta_agent = self.load_agent(agent_id=agent_id)
2024-12-17 23:11:35 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-12-17 23:11:35 File "/app/letta/server/server.py", line 476, in load_agent
2024-12-17 23:11:35 agent.rebuild_system_prompt()
2024-12-17 23:11:35 File "/app/letta/agent.py", line 1284, in rebuild_system_prompt
2024-12-17 23:11:35 curr_system_message = self.messages[0] # this is the system + memory bank, not just the system prompt
2024-12-17 23:11:35 ~~~~~~~~~~~~~^^^
2024-12-17 23:11:35 IndexError: list index out of range
2024-12-17 23:11:35 ERROR: Exception in ASGI application
2024-12-17 23:11:35 Traceback (most recent call last):
2024-12-17 23:11:35 File "/app/.venv/lib/python3.11/site-packages/uvicorn/protocols/http/h11_impl.py", line 408, in run_asgi
2024-12-17 23:11:35 result = await app( # type: ignore[func-returns-value]
2024-12-17 23:11:35 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-12-17 23:11:35 File "/app/.venv/lib/python3.11/site-packages/uvicorn/middleware/proxy_headers.py", line 84, in call
2024-12-17 23:11:35 return await self.app(scope, receive, send)
2024-12-17 23:11:35 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-12-17 23:11:35 File "/app/.venv/lib/python3.11/site-packages/fastapi/applications.py", line 1054, in call
2024-12-17 23:11:35 await super().call(scope, receive, send)
2024-12-17 23:11:35 File "/app/.venv/lib/python3.11/site-packages/starlette/applications.py", line 113, in call
2024-12-17 23:11:35 await self.middleware_stack(scope, receive, send)
2024-12-17 23:11:35 File "/app/.venv/lib/python3.11/site-packages/starlette/middleware/errors.py", line 187, in call
2024-12-17 23:11:35 raise exc
2024-12-17 23:11:35 File "/app/.venv/lib/python3.11/site-packages/starlette/middleware/errors.py", line 165, in call
2024-12-17 23:11:35 await self.app(scope, receive, _send)
2024-12-17 23:11:35 File "/app/.venv/lib/python3.11/site-packages/starlette/middleware/cors.py", line 93, in call
2024-12-17 23:11:35 await self.simple_response(scope, receive, send, request_headers=headers)
2024-12-17 23:11:35 File "/app/.venv/lib/python3.11/site-packages/starlette/middleware/cors.py", line 144, in simple_response
2024-12-17 23:11:35 await self.app(scope, receive, send)
2024-12-17 23:11:35 File "/app/.venv/lib/python3.11/site-packages/starlette/middleware/exceptions.py", line 62, in call
2024-12-17 23:11:35 await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
2024-12-17 23:11:35 File "/app/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
2024-12-17 23:11:35 raise exc
2024-12-17 23:11:35 File "/app/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 42, in wrapped_app
2024-12-17 23:11:35 await app(scope, receive, sender)
2024-12-17 23:11:35 File "/app/.venv/lib/python3.11/site-packages/starlette/routing.py", line 715, in call
2024-12-17 23:11:35 await self.middleware_stack(scope, receive, send)
2024-12-17 23:11:35 File "/app/.venv/lib/python3.11/site-packages/starlette/routing.py", line 735, in app
2024-12-17 23:11:35 await route.handle(scope, receive, send)
2024-12-17 23:11:35 File "/app/.venv/lib/python3.11/site-packages/starlette/routing.py", line 288, in handle
2024-12-17 23:11:35 await self.app(scope, receive, send)
2024-12-17 23:11:35 File "/app/.venv/lib/python3.11/site-packages/starlette/routing.py", line 76, in app
2024-12-17 23:11:35 await wrap_app_handling_exceptions(app, request)(scope, receive, send)
2024-12-17 23:11:35 File "/app/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
2024-12-17 23:11:35 raise exc
2024-12-17 23:11:35 File "/app/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 42, in wrapped_app
2024-12-17 23:11:35 await app(scope, receive, sender)
2024-12-17 23:11:35 File "/app/.venv/lib/python3.11/site-packages/starlette/routing.py", line 73, in app
2024-12-17 23:11:35 response = await f(request)
2024-12-17 23:11:35 ^^^^^^^^^^^^^^^^
2024-12-17 23:11:35 File "/app/.venv/lib/python3.11/site-packages/fastapi/routing.py", line 301, in app
2024-12-17 23:11:35 raw_response = await run_endpoint_function(
2024-12-17 23:11:35 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-12-17 23:11:35 File "/app/.venv/lib/python3.11/site-packages/fastapi/routing.py", line 214, in run_endpoint_function
2024-12-17 23:11:35 return await run_in_threadpool(dependant.call, **values)
2024-12-17 23:11:35 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-12-17 23:11:35 File "/app/.venv/lib/python3.11/site-packages/starlette/concurrency.py", line 39, in run_in_threadpool
2024-12-17 23:11:35 return await anyio.to_thread.run_sync(func, *args)
2024-12-17 23:11:35 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-12-17 23:11:35 File "/app/.venv/lib/python3.11/site-packages/anyio/to_thread.py", line 56, in run_sync
2024-12-17 23:11:35 return await get_async_backend().run_sync_in_worker_thread(
2024-12-17 23:11:35 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-12-17 23:11:35 File "/app/.venv/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 2505, in run_sync_in_worker_thread
2024-12-17 23:11:35 return await future
2024-12-17 23:11:35 ^^^^^^^^^^^^
2024-12-17 23:11:35 File "/app/.venv/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 1005, in run
2024-12-17 23:11:35 result = context.run(func, *args)
2024-12-17 23:11:35 ^^^^^^^^^^^^^^^^^^^^^^^^
2024-12-17 23:11:35 File "/app/letta/server/rest_api/routers/v1/agents.py", line 88, in get_agent_context_window
2024-12-17 23:11:35 return server.get_agent_context_window(user_id=actor.id, agent_id=agent_id)
2024-12-17 23:11:35 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-12-17 23:11:35 File "/app/letta/server/server.py", line 1833, in get_agent_context_window
2024-12-17 23:11:35 letta_agent = self.load_agent(agent_id=agent_id)
2024-12-17 23:11:35 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-12-17 23:11:35 File "/app/letta/server/server.py", line 476, in load_agent
2024-12-17 23:11:35 agent.rebuild_system_prompt()
2024-12-17 23:11:35 File "/app/letta/agent.py", line 1284, in rebuild_system_prompt
2024-12-17 23:11:35 curr_system_message = self.messages[0] # this is the system + memory bank, not just the system prompt
2024-12-17 23:11:35 ~~~~~~~~~~~~~^^^
2024-12-17 23:11:35 IndexError: list index out of range
2024-12-17 23:11:36 INFO: 172.17.0.1:41832 - "GET /v1/agents/agent-38b15714-91dc-46c5-83bb-b66299f804d7 HTTP/1.1" 200 OK
Letta Config
Please attach your ~/.letta/config file or copy paste it below.
[defaults]
preset = memgpt_chat
persona = sam_pov
human = basic
[archival_storage]
type = postgres
path = /root/.letta
uri = postgresql://letta:letta@localhost:5432/letta
[recall_storage]
type = postgres
path = /root/.letta
uri = postgresql://letta:letta@localhost:5432/letta
[metadata_storage]
type = sqlite
path = /root/.letta
[version]
letta_version = 0.6.4
If you're not using OpenAI, please provide additional information on your local LLM setup:
Local LLM details
If you are trying to run Letta with local LLMs, please provide the following information:
The exact model you're trying to use (e.g. dolphin-2.1-mistral-7b.Q6_K.gguf)
The local LLM backend you are using (web UI? LM Studio?)
Your hardware for the local LLM backend (local computer? operating system? remote RunPod?)
The text was updated successfully, but these errors were encountered:
Lamiv
changed the title
Delete Agent broken
ADE: Delete Agent broken
Dec 17, 2024
Hi @Lamiv, could you share some details about your agent? Would like to know if you had any sources attached to this agent, etc. Also, are you using the local development server?
Describe the bug
I am trying to delete an agent from the ADE and it fails with message "There was an error deleting this agent, try again or contact support." Stack trace shows indexerror.
Please describe your setup
letta
? (cmd.exe
/Powershell/Anaconda Shell/Terminal) ADEScreenshots
If applicable, add screenshots to help explain your problem.
Additional context
Add any other context about the problem here. Adding stacktrace here:
2024-12-17 23:11:33 ERROR: Unhandled error: list index out of range
2024-12-17 23:11:33 Traceback (most recent call last):
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/middleware/errors.py", line 165, in call
2024-12-17 23:11:33 await self.app(scope, receive, _send)
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/middleware/cors.py", line 93, in call
2024-12-17 23:11:33 await self.simple_response(scope, receive, send, request_headers=headers)
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/middleware/cors.py", line 144, in simple_response
2024-12-17 23:11:33 await self.app(scope, receive, send)
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/middleware/exceptions.py", line 62, in call
2024-12-17 23:11:33 await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
2024-12-17 23:11:33 raise exc
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 42, in wrapped_app
2024-12-17 23:11:33 await app(scope, receive, sender)
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/routing.py", line 715, in call
2024-12-17 23:11:33 await self.middleware_stack(scope, receive, send)
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/routing.py", line 735, in app
2024-12-17 23:11:33 await route.handle(scope, receive, send)
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/routing.py", line 288, in handle
2024-12-17 23:11:33 await self.app(scope, receive, send)
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/routing.py", line 76, in app
2024-12-17 23:11:33 await wrap_app_handling_exceptions(app, request)(scope, receive, send)
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
2024-12-17 23:11:33 raise exc
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 42, in wrapped_app
2024-12-17 23:11:33 await app(scope, receive, sender)
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/routing.py", line 73, in app
2024-12-17 23:11:33 response = await f(request)
2024-12-17 23:11:33 ^^^^^^^^^^^^^^^^
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/fastapi/routing.py", line 301, in app
2024-12-17 23:11:33 raw_response = await run_endpoint_function(
2024-12-17 23:11:33 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/fastapi/routing.py", line 214, in run_endpoint_function
2024-12-17 23:11:33 return await run_in_threadpool(dependant.call, **values)
2024-12-17 23:11:33 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/concurrency.py", line 39, in run_in_threadpool
2024-12-17 23:11:33 return await anyio.to_thread.run_sync(func, *args)
2024-12-17 23:11:33 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/anyio/to_thread.py", line 56, in run_sync
2024-12-17 23:11:33 return await get_async_backend().run_sync_in_worker_thread(
2024-12-17 23:11:33 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 2505, in run_sync_in_worker_thread
2024-12-17 23:11:33 return await future
2024-12-17 23:11:33 ^^^^^^^^^^^^
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 1005, in run
2024-12-17 23:11:33 result = context.run(func, *args)
2024-12-17 23:11:33 ^^^^^^^^^^^^^^^^^^^^^^^^
2024-12-17 23:11:33 File "/app/letta/server/rest_api/routers/v1/agents.py", line 88, in get_agent_context_window
2024-12-17 23:11:33 return server.get_agent_context_window(user_id=actor.id, agent_id=agent_id)
2024-12-17 23:11:33 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-12-17 23:11:33 Stack trace: <traceback object at 0x7ff8e71c2a40>
2024-12-17 23:11:33 INFO: 172.17.0.1:41818 - "GET /v1/agents/agent-38b15714-91dc-46c5-83bb-b66299f804d7/context HTTP/1.1" 500 Internal Server Error
2024-12-17 23:11:33 File "/app/letta/server/server.py", line 1833, in get_agent_context_window
2024-12-17 23:11:33 letta_agent = self.load_agent(agent_id=agent_id)
2024-12-17 23:11:33 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-12-17 23:11:33 File "/app/letta/server/server.py", line 476, in load_agent
2024-12-17 23:11:33 agent.rebuild_system_prompt()
2024-12-17 23:11:33 File "/app/letta/agent.py", line 1284, in rebuild_system_prompt
2024-12-17 23:11:33 curr_system_message = self.messages[0] # this is the system + memory bank, not just the system prompt
2024-12-17 23:11:33 ~~~~~~~~~~~~~^^^
2024-12-17 23:11:33 IndexError: list index out of range
2024-12-17 23:11:33 ERROR: Exception in ASGI application
2024-12-17 23:11:33 Traceback (most recent call last):
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/uvicorn/protocols/http/h11_impl.py", line 408, in run_asgi
2024-12-17 23:11:33 result = await app( # type: ignore[func-returns-value]
2024-12-17 23:11:33 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/uvicorn/middleware/proxy_headers.py", line 84, in call
2024-12-17 23:11:33 return await self.app(scope, receive, send)
2024-12-17 23:11:33 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/fastapi/applications.py", line 1054, in call
2024-12-17 23:11:33 await super().call(scope, receive, send)
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/applications.py", line 113, in call
2024-12-17 23:11:33 await self.middleware_stack(scope, receive, send)
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/middleware/errors.py", line 187, in call
2024-12-17 23:11:33 raise exc
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/middleware/errors.py", line 165, in call
2024-12-17 23:11:33 await self.app(scope, receive, _send)
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/middleware/cors.py", line 93, in call
2024-12-17 23:11:33 await self.simple_response(scope, receive, send, request_headers=headers)
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/middleware/cors.py", line 144, in simple_response
2024-12-17 23:11:33 await self.app(scope, receive, send)
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/middleware/exceptions.py", line 62, in call
2024-12-17 23:11:33 await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
2024-12-17 23:11:33 raise exc
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 42, in wrapped_app
2024-12-17 23:11:33 await app(scope, receive, sender)
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/routing.py", line 715, in call
2024-12-17 23:11:33 await self.middleware_stack(scope, receive, send)
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/routing.py", line 735, in app
2024-12-17 23:11:33 await route.handle(scope, receive, send)
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/routing.py", line 288, in handle
2024-12-17 23:11:33 await self.app(scope, receive, send)
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/routing.py", line 76, in app
2024-12-17 23:11:33 await wrap_app_handling_exceptions(app, request)(scope, receive, send)
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
2024-12-17 23:11:33 raise exc
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 42, in wrapped_app
2024-12-17 23:11:33 await app(scope, receive, sender)
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/routing.py", line 73, in app
2024-12-17 23:11:33 response = await f(request)
2024-12-17 23:11:33 ^^^^^^^^^^^^^^^^
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/fastapi/routing.py", line 301, in app
2024-12-17 23:11:33 raw_response = await run_endpoint_function(
2024-12-17 23:11:33 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/fastapi/routing.py", line 214, in run_endpoint_function
2024-12-17 23:11:33 return await run_in_threadpool(dependant.call, **values)
2024-12-17 23:11:33 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/concurrency.py", line 39, in run_in_threadpool
2024-12-17 23:11:33 return await anyio.to_thread.run_sync(func, *args)
2024-12-17 23:11:33 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/anyio/to_thread.py", line 56, in run_sync
2024-12-17 23:11:33 return await get_async_backend().run_sync_in_worker_thread(
2024-12-17 23:11:33 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 2505, in run_sync_in_worker_thread
2024-12-17 23:11:33 return await future
2024-12-17 23:11:33 ^^^^^^^^^^^^
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 1005, in run
2024-12-17 23:11:33 result = context.run(func, *args)
2024-12-17 23:11:33 ^^^^^^^^^^^^^^^^^^^^^^^^
2024-12-17 23:11:33 File "/app/letta/server/rest_api/routers/v1/agents.py", line 88, in get_agent_context_window
2024-12-17 23:11:33 return server.get_agent_context_window(user_id=actor.id, agent_id=agent_id)
2024-12-17 23:11:33 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-12-17 23:11:33 File "/app/letta/server/server.py", line 1833, in get_agent_context_window
2024-12-17 23:11:33 letta_agent = self.load_agent(agent_id=agent_id)
2024-12-17 23:11:33 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-12-17 23:11:33 File "/app/letta/server/server.py", line 476, in load_agent
2024-12-17 23:11:33 agent.rebuild_system_prompt()
2024-12-17 23:11:33 File "/app/letta/agent.py", line 1284, in rebuild_system_prompt
2024-12-17 23:11:33 curr_system_message = self.messages[0] # this is the system + memory bank, not just the system prompt
2024-12-17 23:11:33 ~~~~~~~~~~~~~^^^
2024-12-17 23:11:33 IndexError: list index out of range
2024-12-17 23:11:33 ERROR: Unhandled error: list index out of range
2024-12-17 23:11:33 Traceback (most recent call last):
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/middleware/errors.py", line 165, in call
2024-12-17 23:11:33 await self.app(scope, receive, _send)
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/middleware/cors.py", line 93, in call
2024-12-17 23:11:33 await self.simple_response(scope, receive, send, request_headers=headers)
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/middleware/cors.py", line 144, in simple_response
2024-12-17 23:11:33 await self.app(scope, receive, send)
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/middleware/exceptions.py", line 62, in call
2024-12-17 23:11:33 await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
2024-12-17 23:11:33 raise exc
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 42, in wrapped_app
2024-12-17 23:11:33 await app(scope, receive, sender)
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/routing.py", line 715, in call
2024-12-17 23:11:33 await self.middleware_stack(scope, receive, send)
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/routing.py", line 735, in app
2024-12-17 23:11:33 await route.handle(scope, receive, send)
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/routing.py", line 288, in handle
2024-12-17 23:11:33 await self.app(scope, receive, send)
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/routing.py", line 76, in app
2024-12-17 23:11:33 await wrap_app_handling_exceptions(app, request)(scope, receive, send)
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
2024-12-17 23:11:33 raise exc
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 42, in wrapped_app
2024-12-17 23:11:33 await app(scope, receive, sender)
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/routing.py", line 73, in app
2024-12-17 23:11:33 response = await f(request)
2024-12-17 23:11:33 ^^^^^^^^^^^^^^^^
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/fastapi/routing.py", line 301, in app
2024-12-17 23:11:33 raw_response = await run_endpoint_function(
2024-12-17 23:11:33 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/fastapi/routing.py", line 214, in run_endpoint_function
2024-12-17 23:11:33 return await run_in_threadpool(dependant.call, **values)
2024-12-17 23:11:33 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/concurrency.py", line 39, in run_in_threadpool
2024-12-17 23:11:33 return await anyio.to_thread.run_sync(func, *args)
2024-12-17 23:11:33 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/anyio/to_thread.py", line 56, in run_sync
2024-12-17 23:11:33 return await get_async_backend().run_sync_in_worker_thread(
2024-12-17 23:11:33 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 2505, in run_sync_in_worker_thread
2024-12-17 23:11:33 return await future
2024-12-17 23:11:33 ^^^^^^^^^^^^
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 1005, in run
2024-12-17 23:11:33 result = context.run(func, *args)
2024-12-17 23:11:33 ^^^^^^^^^^^^^^^^^^^^^^^^
2024-12-17 23:11:33 File "/app/letta/server/rest_api/routers/v1/agents.py", line 434, in get_agent_messages
2024-12-17 23:11:33 return server.get_agent_recall_cursor(
2024-12-17 23:11:33 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-12-17 23:11:33 File "/app/letta/server/server.py", line 1389, in get_agent_recall_cursor
2024-12-17 23:11:33 letta_agent = self.load_agent(agent_id=agent_id)
2024-12-17 23:11:33 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-12-17 23:11:33 File "/app/letta/server/server.py", line 476, in load_agent
2024-12-17 23:11:33 agent.rebuild_system_prompt()
2024-12-17 23:11:33 File "/app/letta/agent.py", line 1284, in rebuild_system_prompt
2024-12-17 23:11:33 curr_system_message = self.messages[0] # this is the system + memory bank, not just the system prompt
2024-12-17 23:11:33 ~~~~~~~~~~~~~^^^
2024-12-17 23:11:33 IndexError: list index out of range
2024-12-17 23:11:33 Stack trace: <traceback object at 0x7ff8e651a7c0>
2024-12-17 23:11:33 INFO: 172.17.0.1:41804 - "GET /v1/agents/agent-38b15714-91dc-46c5-83bb-b66299f804d7/messages?limit=50 HTTP/1.1" 500 Internal Server Error
2024-12-17 23:11:33 ERROR: Exception in ASGI application
2024-12-17 23:11:33 Traceback (most recent call last):
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/uvicorn/protocols/http/h11_impl.py", line 408, in run_asgi
2024-12-17 23:11:33 result = await app( # type: ignore[func-returns-value]
2024-12-17 23:11:33 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/uvicorn/middleware/proxy_headers.py", line 84, in call
2024-12-17 23:11:33 return await self.app(scope, receive, send)
2024-12-17 23:11:33 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/fastapi/applications.py", line 1054, in call
2024-12-17 23:11:33 await super().call(scope, receive, send)
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/applications.py", line 113, in call
2024-12-17 23:11:33 await self.middleware_stack(scope, receive, send)
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/middleware/errors.py", line 187, in call
2024-12-17 23:11:33 raise exc
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/middleware/errors.py", line 165, in call
2024-12-17 23:11:33 await self.app(scope, receive, _send)
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/middleware/cors.py", line 93, in call
2024-12-17 23:11:33 await self.simple_response(scope, receive, send, request_headers=headers)
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/middleware/cors.py", line 144, in simple_response
2024-12-17 23:11:33 await self.app(scope, receive, send)
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/middleware/exceptions.py", line 62, in call
2024-12-17 23:11:33 await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
2024-12-17 23:11:33 raise exc
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 42, in wrapped_app
2024-12-17 23:11:33 await app(scope, receive, sender)
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/routing.py", line 715, in call
2024-12-17 23:11:33 await self.middleware_stack(scope, receive, send)
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/routing.py", line 735, in app
2024-12-17 23:11:33 await route.handle(scope, receive, send)
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/routing.py", line 288, in handle
2024-12-17 23:11:33 await self.app(scope, receive, send)
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/routing.py", line 76, in app
2024-12-17 23:11:33 await wrap_app_handling_exceptions(app, request)(scope, receive, send)
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
2024-12-17 23:11:33 raise exc
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 42, in wrapped_app
2024-12-17 23:11:33 await app(scope, receive, sender)
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/routing.py", line 73, in app
2024-12-17 23:11:33 response = await f(request)
2024-12-17 23:11:33 ^^^^^^^^^^^^^^^^
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/fastapi/routing.py", line 301, in app
2024-12-17 23:11:33 raw_response = await run_endpoint_function(
2024-12-17 23:11:33 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/fastapi/routing.py", line 214, in run_endpoint_function
2024-12-17 23:11:33 return await run_in_threadpool(dependant.call, **values)
2024-12-17 23:11:33 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/concurrency.py", line 39, in run_in_threadpool
2024-12-17 23:11:33 return await anyio.to_thread.run_sync(func, *args)
2024-12-17 23:11:33 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/anyio/to_thread.py", line 56, in run_sync
2024-12-17 23:11:33 return await get_async_backend().run_sync_in_worker_thread(
2024-12-17 23:11:33 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 2505, in run_sync_in_worker_thread
2024-12-17 23:11:33 return await future
2024-12-17 23:11:33 ^^^^^^^^^^^^
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 1005, in run
2024-12-17 23:11:33 result = context.run(func, *args)
2024-12-17 23:11:33 ^^^^^^^^^^^^^^^^^^^^^^^^
2024-12-17 23:11:33 File "/app/letta/server/rest_api/routers/v1/agents.py", line 434, in get_agent_messages
2024-12-17 23:11:33 return server.get_agent_recall_cursor(
2024-12-17 23:11:33 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-12-17 23:11:33 File "/app/letta/server/server.py", line 1389, in get_agent_recall_cursor
2024-12-17 23:11:33 letta_agent = self.load_agent(agent_id=agent_id)
2024-12-17 23:11:33 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-12-17 23:11:33 File "/app/letta/server/server.py", line 476, in load_agent
2024-12-17 23:11:33 agent.rebuild_system_prompt()
2024-12-17 23:11:33 File "/app/letta/agent.py", line 1284, in rebuild_system_prompt
2024-12-17 23:11:33 curr_system_message = self.messages[0] # this is the system + memory bank, not just the system prompt
2024-12-17 23:11:33 ~~~~~~~~~~~~~^^^
2024-12-17 23:11:33 IndexError: list index out of range
2024-12-17 23:11:33 ERROR: Unhandled error: list index out of range
2024-12-17 23:11:33 Traceback (most recent call last):
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/middleware/errors.py", line 165, in call
2024-12-17 23:11:33 await self.app(scope, receive, _send)
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/middleware/cors.py", line 93, in call
2024-12-17 23:11:33 await self.simple_response(scope, receive, send, request_headers=headers)
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/middleware/cors.py", line 144, in simple_response
2024-12-17 23:11:33 await self.app(scope, receive, send)
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/middleware/exceptions.py", line 62, in call
2024-12-17 23:11:33 await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
2024-12-17 23:11:33 raise exc
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 42, in wrapped_app
2024-12-17 23:11:33 await app(scope, receive, sender)
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/routing.py", line 715, in call
2024-12-17 23:11:33 await self.middleware_stack(scope, receive, send)
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/routing.py", line 735, in app
2024-12-17 23:11:33 await route.handle(scope, receive, send)
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/routing.py", line 288, in handle
2024-12-17 23:11:33 await self.app(scope, receive, send)
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/routing.py", line 76, in app
2024-12-17 23:11:33 await wrap_app_handling_exceptions(app, request)(scope, receive, send)
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
2024-12-17 23:11:33 raise exc
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 42, in wrapped_app
2024-12-17 23:11:33 await app(scope, receive, sender)
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/routing.py", line 73, in app
2024-12-17 23:11:33 response = await f(request)
2024-12-17 23:11:33 ^^^^^^^^^^^^^^^^
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/fastapi/routing.py", line 301, in app
2024-12-17 23:11:33 raw_response = await run_endpoint_function(
2024-12-17 23:11:33 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/fastapi/routing.py", line 214, in run_endpoint_function
2024-12-17 23:11:33 return await run_in_threadpool(dependant.call, **values)
2024-12-17 23:11:33 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/concurrency.py", line 39, in run_in_threadpool
2024-12-17 23:11:33 return await anyio.to_thread.run_sync(func, *args)
2024-12-17 23:11:33 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/anyio/to_thread.py", line 56, in run_sync
2024-12-17 23:11:33 return await get_async_backend().run_sync_in_worker_thread(
2024-12-17 23:11:33 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 2505, in run_sync_in_worker_thread
2024-12-17 23:11:33 return await future
2024-12-17 23:11:33 ^^^^^^^^^^^^
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 1005, in run
2024-12-17 23:11:33 result = context.run(func, *args)
2024-12-17 23:11:33 ^^^^^^^^^^^^^^^^^^^^^^^^
2024-12-17 23:11:33 File "/app/letta/server/rest_api/routers/v1/agents.py", line 369, in get_agent_archival_memory
2024-12-17 23:11:33 return server.get_agent_archival_cursor(
2024-12-17 23:11:33 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-12-17 23:11:33 File "/app/letta/server/server.py", line 1326, in get_agent_archival_cursor
2024-12-17 23:11:33 letta_agent = self.load_agent(agent_id=agent_id)
2024-12-17 23:11:33 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-12-17 23:11:33 Stack trace: <traceback object at 0x7ff8e6581ac0>
2024-12-17 23:11:33 INFO: 172.17.0.1:41820 - "GET /v1/agents/agent-38b15714-91dc-46c5-83bb-b66299f804d7/archival HTTP/1.1" 500 Internal Server Error
2024-12-17 23:11:33 File "/app/letta/server/server.py", line 476, in load_agent
2024-12-17 23:11:33 agent.rebuild_system_prompt()
2024-12-17 23:11:33 File "/app/letta/agent.py", line 1284, in rebuild_system_prompt
2024-12-17 23:11:33 curr_system_message = self.messages[0] # this is the system + memory bank, not just the system prompt
2024-12-17 23:11:33 ~~~~~~~~~~~~~^^^
2024-12-17 23:11:33 IndexError: list index out of range
2024-12-17 23:11:33 ERROR: Exception in ASGI application
2024-12-17 23:11:33 Traceback (most recent call last):
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/uvicorn/protocols/http/h11_impl.py", line 408, in run_asgi
2024-12-17 23:11:33 result = await app( # type: ignore[func-returns-value]
2024-12-17 23:11:33 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/uvicorn/middleware/proxy_headers.py", line 84, in call
2024-12-17 23:11:33 return await self.app(scope, receive, send)
2024-12-17 23:11:33 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/fastapi/applications.py", line 1054, in call
2024-12-17 23:11:33 await super().call(scope, receive, send)
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/applications.py", line 113, in call
2024-12-17 23:11:33 await self.middleware_stack(scope, receive, send)
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/middleware/errors.py", line 187, in call
2024-12-17 23:11:33 raise exc
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/middleware/errors.py", line 165, in call
2024-12-17 23:11:33 await self.app(scope, receive, _send)
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/middleware/cors.py", line 93, in call
2024-12-17 23:11:33 await self.simple_response(scope, receive, send, request_headers=headers)
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/middleware/cors.py", line 144, in simple_response
2024-12-17 23:11:33 await self.app(scope, receive, send)
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/middleware/exceptions.py", line 62, in call
2024-12-17 23:11:33 await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
2024-12-17 23:11:33 raise exc
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 42, in wrapped_app
2024-12-17 23:11:33 await app(scope, receive, sender)
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/routing.py", line 715, in call
2024-12-17 23:11:33 await self.middleware_stack(scope, receive, send)
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/routing.py", line 735, in app
2024-12-17 23:11:33 await route.handle(scope, receive, send)
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/routing.py", line 288, in handle
2024-12-17 23:11:33 await self.app(scope, receive, send)
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/routing.py", line 76, in app
2024-12-17 23:11:33 await wrap_app_handling_exceptions(app, request)(scope, receive, send)
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
2024-12-17 23:11:33 raise exc
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 42, in wrapped_app
2024-12-17 23:11:33 await app(scope, receive, sender)
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/routing.py", line 73, in app
2024-12-17 23:11:33 response = await f(request)
2024-12-17 23:11:33 ^^^^^^^^^^^^^^^^
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/fastapi/routing.py", line 301, in app
2024-12-17 23:11:33 raw_response = await run_endpoint_function(
2024-12-17 23:11:33 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/fastapi/routing.py", line 214, in run_endpoint_function
2024-12-17 23:11:33 return await run_in_threadpool(dependant.call, **values)
2024-12-17 23:11:33 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/starlette/concurrency.py", line 39, in run_in_threadpool
2024-12-17 23:11:33 return await anyio.to_thread.run_sync(func, *args)
2024-12-17 23:11:33 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/anyio/to_thread.py", line 56, in run_sync
2024-12-17 23:11:33 return await get_async_backend().run_sync_in_worker_thread(
2024-12-17 23:11:33 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 2505, in run_sync_in_worker_thread
2024-12-17 23:11:33 return await future
2024-12-17 23:11:33 ^^^^^^^^^^^^
2024-12-17 23:11:33 File "/app/.venv/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 1005, in run
2024-12-17 23:11:33 result = context.run(func, *args)
2024-12-17 23:11:33 ^^^^^^^^^^^^^^^^^^^^^^^^
2024-12-17 23:11:33 File "/app/letta/server/rest_api/routers/v1/agents.py", line 369, in get_agent_archival_memory
2024-12-17 23:11:33 return server.get_agent_archival_cursor(
2024-12-17 23:11:33 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-12-17 23:11:33 File "/app/letta/server/server.py", line 1326, in get_agent_archival_cursor
2024-12-17 23:11:33 letta_agent = self.load_agent(agent_id=agent_id)
2024-12-17 23:11:33 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-12-17 23:11:33 File "/app/letta/server/server.py", line 476, in load_agent
2024-12-17 23:11:33 agent.rebuild_system_prompt()
2024-12-17 23:11:33 File "/app/letta/agent.py", line 1284, in rebuild_system_prompt
2024-12-17 23:11:33 curr_system_message = self.messages[0] # this is the system + memory bank, not just the system prompt
2024-12-17 23:11:33 ~~~~~~~~~~~~~^^^
2024-12-17 23:11:33 IndexError: list index out of range
2024-12-17 23:11:34 2024-12-17 19:11:34.971 UTC [318] ERROR: update or delete on table "agents" violates foreign key constraint "passages_agent_id_fkey" on table "passages"
2024-12-17 23:11:34 2024-12-17 19:11:34.971 UTC [318] DETAIL: Key (id)=(agent-38b15714-91dc-46c5-83bb-b66299f804d7) is still referenced from table "passages".
2024-12-17 23:11:34 2024-12-17 19:11:34.971 UTC [318] STATEMENT: DELETE FROM agents WHERE agents.id = 'agent-38b15714-91dc-46c5-83bb-b66299f804d7'
2024-12-17 23:11:34 Letta.letta.server.server - ERROR - Failed to delete agent agent-38b15714-91dc-46c5-83bb-b66299f804d7 via ID with:
2024-12-17 23:11:34 (psycopg2.errors.ForeignKeyViolation) update or delete on table "agents" violates foreign key constraint "passages_agent_id_fkey" on table "passages"
2024-12-17 23:11:34 DETAIL: Key (id)=(agent-38b15714-91dc-46c5-83bb-b66299f804d7) is still referenced from table "passages".
2024-12-17 23:11:34
2024-12-17 23:11:34 [SQL: DELETE FROM agents WHERE agents.id = %(id_1)s]
2024-12-17 23:11:34 [parameters: {'id_1': 'agent-38b15714-91dc-46c5-83bb-b66299f804d7'}]
2024-12-17 23:11:34 (Background on this error at: https://sqlalche.me/e/20/gkpj)
2024-12-17 23:11:34 Traceback (most recent call last):
2024-12-17 23:11:34 File "/app/.venv/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 1967, in _exec_single_context
2024-12-17 23:11:34 self.dialect.do_execute(
2024-12-17 23:11:34 File "/app/.venv/lib/python3.11/site-packages/sqlalchemy/engine/default.py", line 941, in do_execute
2024-12-17 23:11:34 cursor.execute(statement, parameters)
2024-12-17 23:11:34 psycopg2.errors.ForeignKeyViolation: update or delete on table "agents" violates foreign key constraint "passages_agent_id_fkey" on table "passages"
2024-12-17 23:11:34 DETAIL: Key (id)=(agent-38b15714-91dc-46c5-83bb-b66299f804d7) is still referenced from table "passages".
2024-12-17 23:11:34
2024-12-17 23:11:34
2024-12-17 23:11:34 The above exception was the direct cause of the following exception:
2024-12-17 23:11:34
2024-12-17 23:11:34 Traceback (most recent call last):
2024-12-17 23:11:34 File "/app/letta/server/server.py", line 1528, in delete_agent
2024-12-17 23:11:34 self.ms.delete_agent(agent_id=agent_id, per_agent_lock_manager=self.per_agent_lock_manager)
2024-12-17 23:11:34 File "/app/letta/utils.py", line 559, in wrapper
2024-12-17 23:11:34 return func(*args, **kwargs)
2024-12-17 23:11:34 ^^^^^^^^^^^^^^^^^^^^^
2024-12-17 23:11:34 File "/app/letta/metadata.py", line 331, in delete_agent
2024-12-17 23:11:34 session.query(AgentModel).filter(AgentModel.id == agent_id).delete()
2024-12-17 23:11:34 File "/app/.venv/lib/python3.11/site-packages/sqlalchemy/orm/query.py", line 3162, in delete
2024-12-17 23:11:34 result: CursorResult[Any] = self.session.execute(
2024-12-17 23:11:34 ^^^^^^^^^^^^^^^^^^^^^
2024-12-17 23:11:34 File "/app/.venv/lib/python3.11/site-packages/sqlalchemy/orm/session.py", line 2362, in execute
2024-12-17 23:11:34 return self._execute_internal(
2024-12-17 23:11:34 ^^^^^^^^^^^^^^^^^^^^^^^
2024-12-17 23:11:34 File "/app/.venv/lib/python3.11/site-packages/sqlalchemy/orm/session.py", line 2247, in _execute_internal
2024-12-17 23:11:34 result: Result[Any] = compile_state_cls.orm_execute_statement(
2024-12-17 23:11:34 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-12-17 23:11:34 File "/app/.venv/lib/python3.11/site-packages/sqlalchemy/orm/bulk_persistence.py", line 2021, in orm_execute_statement
2024-12-17 23:11:34 return super().orm_execute_statement(
2024-12-17 23:11:34 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-12-17 23:11:34 File "/app/.venv/lib/python3.11/site-packages/sqlalchemy/orm/context.py", line 305, in orm_execute_statement
2024-12-17 23:11:34 result = conn.execute(
2024-12-17 23:11:34 ^^^^^^^^^^^^^
2024-12-17 23:11:34 File "/app/.venv/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 1418, in execute
2024-12-17 23:11:34 return meth(
2024-12-17 23:11:34 ^^^^^
2024-12-17 23:11:34 File "/app/.venv/lib/python3.11/site-packages/sqlalchemy/sql/elements.py", line 515, in _execute_on_connection
2024-12-17 23:11:34 return connection._execute_clauseelement(
2024-12-17 23:11:34 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-12-17 23:11:34 File "/app/.venv/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 1640, in _execute_clauseelement
2024-12-17 23:11:34 ret = self._execute_context(
2024-12-17 23:11:34 ^^^^^^^^^^^^^^^^^^^^^^
2024-12-17 23:11:34 File "/app/.venv/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 1846, in _execute_context
2024-12-17 23:11:34 return self._exec_single_context(
2024-12-17 23:11:34 ^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-12-17 23:11:34 File "/app/.venv/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 1986, in _exec_single_context
2024-12-17 23:11:34 self._handle_dbapi_exception(
2024-12-17 23:11:34 File "/app/.venv/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 2355, in _handle_dbapi_exception
2024-12-17 23:11:34 raise sqlalchemy_exception.with_traceback(exc_info[2]) from e
2024-12-17 23:11:34 File "/app/.venv/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 1967, in _exec_single_context
2024-12-17 23:11:34 self.dialect.do_execute(
2024-12-17 23:11:34 File "/app/.venv/lib/python3.11/site-packages/sqlalchemy/engine/default.py", line 941, in do_execute
2024-12-17 23:11:34 cursor.execute(statement, parameters)
2024-12-17 23:11:34 sqlalchemy.exc.IntegrityError: (psycopg2.errors.ForeignKeyViolation) update or delete on table "agents" violates foreign key constraint "passages_agent_id_fkey" on table "passages"
2024-12-17 23:11:34 DETAIL: Key (id)=(agent-38b15714-91dc-46c5-83bb-b66299f804d7) is still referenced from table "passages".
2024-12-17 23:11:34
2024-12-17 23:11:34 [SQL: DELETE FROM agents WHERE agents.id = %(id_1)s]
2024-12-17 23:11:34 [parameters: {'id_1': 'agent-38b15714-91dc-46c5-83bb-b66299f804d7'}]
2024-12-17 23:11:34 (Background on this error at: https://sqlalche.me/e/20/gkpj)
2024-12-17 23:11:34 INFO: 172.17.0.1:41826 - "DELETE /v1/agents/agent-38b15714-91dc-46c5-83bb-b66299f804d7 HTTP/1.1" 400 Bad Request
2024-12-17 23:11:35 INFO: 172.17.0.1:41826 - "GET /v1/jobs/active HTTP/1.1" 200 OK
2024-12-17 23:11:35 ERROR: Unhandled error: list index out of range
2024-12-17 23:11:35 Traceback (most recent call last):
2024-12-17 23:11:35 File "/app/.venv/lib/python3.11/site-packages/starlette/middleware/errors.py", line 165, in call
2024-12-17 23:11:35 await self.app(scope, receive, _send)
2024-12-17 23:11:35 File "/app/.venv/lib/python3.11/site-packages/starlette/middleware/cors.py", line 93, in call
2024-12-17 23:11:35 await self.simple_response(scope, receive, send, request_headers=headers)
2024-12-17 23:11:35 File "/app/.venv/lib/python3.11/site-packages/starlette/middleware/cors.py", line 144, in simple_response
2024-12-17 23:11:35 await self.app(scope, receive, send)
2024-12-17 23:11:35 File "/app/.venv/lib/python3.11/site-packages/starlette/middleware/exceptions.py", line 62, in call
2024-12-17 23:11:35 await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
2024-12-17 23:11:35 File "/app/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
2024-12-17 23:11:35 raise exc
2024-12-17 23:11:35 File "/app/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 42, in wrapped_app
2024-12-17 23:11:35 await app(scope, receive, sender)
2024-12-17 23:11:35 File "/app/.venv/lib/python3.11/site-packages/starlette/routing.py", line 715, in call
2024-12-17 23:11:35 await self.middleware_stack(scope, receive, send)
2024-12-17 23:11:35 File "/app/.venv/lib/python3.11/site-packages/starlette/routing.py", line 735, in app
2024-12-17 23:11:35 await route.handle(scope, receive, send)
2024-12-17 23:11:35 File "/app/.venv/lib/python3.11/site-packages/starlette/routing.py", line 288, in handle
2024-12-17 23:11:35 await self.app(scope, receive, send)
2024-12-17 23:11:35 File "/app/.venv/lib/python3.11/site-packages/starlette/routing.py", line 76, in app
2024-12-17 23:11:35 await wrap_app_handling_exceptions(app, request)(scope, receive, send)
2024-12-17 23:11:35 File "/app/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
2024-12-17 23:11:35 raise exc
2024-12-17 23:11:35 File "/app/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 42, in wrapped_app
2024-12-17 23:11:35 await app(scope, receive, sender)
2024-12-17 23:11:35 File "/app/.venv/lib/python3.11/site-packages/starlette/routing.py", line 73, in app
2024-12-17 23:11:35 response = await f(request)
2024-12-17 23:11:35 ^^^^^^^^^^^^^^^^
2024-12-17 23:11:35 File "/app/.venv/lib/python3.11/site-packages/fastapi/routing.py", line 301, in app
2024-12-17 23:11:35 raw_response = await run_endpoint_function(
2024-12-17 23:11:35 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-12-17 23:11:35 File "/app/.venv/lib/python3.11/site-packages/fastapi/routing.py", line 214, in run_endpoint_function
2024-12-17 23:11:35 return await run_in_threadpool(dependant.call, **values)
2024-12-17 23:11:35 Stack trace: <traceback object at 0x7ff8e6503580>
2024-12-17 23:11:35 INFO: 172.17.0.1:41826 - "GET /v1/agents/agent-38b15714-91dc-46c5-83bb-b66299f804d7/context HTTP/1.1" 500 Internal Server Error
2024-12-17 23:11:35 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-12-17 23:11:35 File "/app/.venv/lib/python3.11/site-packages/starlette/concurrency.py", line 39, in run_in_threadpool
2024-12-17 23:11:35 return await anyio.to_thread.run_sync(func, *args)
2024-12-17 23:11:35 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-12-17 23:11:35 File "/app/.venv/lib/python3.11/site-packages/anyio/to_thread.py", line 56, in run_sync
2024-12-17 23:11:35 return await get_async_backend().run_sync_in_worker_thread(
2024-12-17 23:11:35 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-12-17 23:11:35 File "/app/.venv/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 2505, in run_sync_in_worker_thread
2024-12-17 23:11:35 return await future
2024-12-17 23:11:35 ^^^^^^^^^^^^
2024-12-17 23:11:35 File "/app/.venv/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 1005, in run
2024-12-17 23:11:35 result = context.run(func, *args)
2024-12-17 23:11:35 ^^^^^^^^^^^^^^^^^^^^^^^^
2024-12-17 23:11:35 File "/app/letta/server/rest_api/routers/v1/agents.py", line 88, in get_agent_context_window
2024-12-17 23:11:35 return server.get_agent_context_window(user_id=actor.id, agent_id=agent_id)
2024-12-17 23:11:35 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-12-17 23:11:35 File "/app/letta/server/server.py", line 1833, in get_agent_context_window
2024-12-17 23:11:35 letta_agent = self.load_agent(agent_id=agent_id)
2024-12-17 23:11:35 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-12-17 23:11:35 File "/app/letta/server/server.py", line 476, in load_agent
2024-12-17 23:11:35 agent.rebuild_system_prompt()
2024-12-17 23:11:35 File "/app/letta/agent.py", line 1284, in rebuild_system_prompt
2024-12-17 23:11:35 curr_system_message = self.messages[0] # this is the system + memory bank, not just the system prompt
2024-12-17 23:11:35 ~~~~~~~~~~~~~^^^
2024-12-17 23:11:35 IndexError: list index out of range
2024-12-17 23:11:35 ERROR: Exception in ASGI application
2024-12-17 23:11:35 Traceback (most recent call last):
2024-12-17 23:11:35 File "/app/.venv/lib/python3.11/site-packages/uvicorn/protocols/http/h11_impl.py", line 408, in run_asgi
2024-12-17 23:11:35 result = await app( # type: ignore[func-returns-value]
2024-12-17 23:11:35 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-12-17 23:11:35 File "/app/.venv/lib/python3.11/site-packages/uvicorn/middleware/proxy_headers.py", line 84, in call
2024-12-17 23:11:35 return await self.app(scope, receive, send)
2024-12-17 23:11:35 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-12-17 23:11:35 File "/app/.venv/lib/python3.11/site-packages/fastapi/applications.py", line 1054, in call
2024-12-17 23:11:35 await super().call(scope, receive, send)
2024-12-17 23:11:35 File "/app/.venv/lib/python3.11/site-packages/starlette/applications.py", line 113, in call
2024-12-17 23:11:35 await self.middleware_stack(scope, receive, send)
2024-12-17 23:11:35 File "/app/.venv/lib/python3.11/site-packages/starlette/middleware/errors.py", line 187, in call
2024-12-17 23:11:35 raise exc
2024-12-17 23:11:35 File "/app/.venv/lib/python3.11/site-packages/starlette/middleware/errors.py", line 165, in call
2024-12-17 23:11:35 await self.app(scope, receive, _send)
2024-12-17 23:11:35 File "/app/.venv/lib/python3.11/site-packages/starlette/middleware/cors.py", line 93, in call
2024-12-17 23:11:35 await self.simple_response(scope, receive, send, request_headers=headers)
2024-12-17 23:11:35 File "/app/.venv/lib/python3.11/site-packages/starlette/middleware/cors.py", line 144, in simple_response
2024-12-17 23:11:35 await self.app(scope, receive, send)
2024-12-17 23:11:35 File "/app/.venv/lib/python3.11/site-packages/starlette/middleware/exceptions.py", line 62, in call
2024-12-17 23:11:35 await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
2024-12-17 23:11:35 File "/app/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
2024-12-17 23:11:35 raise exc
2024-12-17 23:11:35 File "/app/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 42, in wrapped_app
2024-12-17 23:11:35 await app(scope, receive, sender)
2024-12-17 23:11:35 File "/app/.venv/lib/python3.11/site-packages/starlette/routing.py", line 715, in call
2024-12-17 23:11:35 await self.middleware_stack(scope, receive, send)
2024-12-17 23:11:35 File "/app/.venv/lib/python3.11/site-packages/starlette/routing.py", line 735, in app
2024-12-17 23:11:35 await route.handle(scope, receive, send)
2024-12-17 23:11:35 File "/app/.venv/lib/python3.11/site-packages/starlette/routing.py", line 288, in handle
2024-12-17 23:11:35 await self.app(scope, receive, send)
2024-12-17 23:11:35 File "/app/.venv/lib/python3.11/site-packages/starlette/routing.py", line 76, in app
2024-12-17 23:11:35 await wrap_app_handling_exceptions(app, request)(scope, receive, send)
2024-12-17 23:11:35 File "/app/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
2024-12-17 23:11:35 raise exc
2024-12-17 23:11:35 File "/app/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 42, in wrapped_app
2024-12-17 23:11:35 await app(scope, receive, sender)
2024-12-17 23:11:35 File "/app/.venv/lib/python3.11/site-packages/starlette/routing.py", line 73, in app
2024-12-17 23:11:35 response = await f(request)
2024-12-17 23:11:35 ^^^^^^^^^^^^^^^^
2024-12-17 23:11:35 File "/app/.venv/lib/python3.11/site-packages/fastapi/routing.py", line 301, in app
2024-12-17 23:11:35 raw_response = await run_endpoint_function(
2024-12-17 23:11:35 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-12-17 23:11:35 File "/app/.venv/lib/python3.11/site-packages/fastapi/routing.py", line 214, in run_endpoint_function
2024-12-17 23:11:35 return await run_in_threadpool(dependant.call, **values)
2024-12-17 23:11:35 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-12-17 23:11:35 File "/app/.venv/lib/python3.11/site-packages/starlette/concurrency.py", line 39, in run_in_threadpool
2024-12-17 23:11:35 return await anyio.to_thread.run_sync(func, *args)
2024-12-17 23:11:35 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-12-17 23:11:35 File "/app/.venv/lib/python3.11/site-packages/anyio/to_thread.py", line 56, in run_sync
2024-12-17 23:11:35 return await get_async_backend().run_sync_in_worker_thread(
2024-12-17 23:11:35 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-12-17 23:11:35 File "/app/.venv/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 2505, in run_sync_in_worker_thread
2024-12-17 23:11:35 return await future
2024-12-17 23:11:35 ^^^^^^^^^^^^
2024-12-17 23:11:35 File "/app/.venv/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 1005, in run
2024-12-17 23:11:35 result = context.run(func, *args)
2024-12-17 23:11:35 ^^^^^^^^^^^^^^^^^^^^^^^^
2024-12-17 23:11:35 File "/app/letta/server/rest_api/routers/v1/agents.py", line 88, in get_agent_context_window
2024-12-17 23:11:35 return server.get_agent_context_window(user_id=actor.id, agent_id=agent_id)
2024-12-17 23:11:35 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-12-17 23:11:35 File "/app/letta/server/server.py", line 1833, in get_agent_context_window
2024-12-17 23:11:35 letta_agent = self.load_agent(agent_id=agent_id)
2024-12-17 23:11:35 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-12-17 23:11:35 File "/app/letta/server/server.py", line 476, in load_agent
2024-12-17 23:11:35 agent.rebuild_system_prompt()
2024-12-17 23:11:35 File "/app/letta/agent.py", line 1284, in rebuild_system_prompt
2024-12-17 23:11:35 curr_system_message = self.messages[0] # this is the system + memory bank, not just the system prompt
2024-12-17 23:11:35 ~~~~~~~~~~~~~^^^
2024-12-17 23:11:35 IndexError: list index out of range
2024-12-17 23:11:36 INFO: 172.17.0.1:41832 - "GET /v1/agents/agent-38b15714-91dc-46c5-83bb-b66299f804d7 HTTP/1.1" 200 OK
Letta Config
Please attach your
~/.letta/config
file or copy paste it below.[defaults]
preset = memgpt_chat
persona = sam_pov
human = basic
[archival_storage]
type = postgres
path = /root/.letta
uri = postgresql://letta:letta@localhost:5432/letta
[recall_storage]
type = postgres
path = /root/.letta
uri = postgresql://letta:letta@localhost:5432/letta
[metadata_storage]
type = sqlite
path = /root/.letta
[version]
letta_version = 0.6.4
If you're not using OpenAI, please provide additional information on your local LLM setup:
Local LLM details
If you are trying to run Letta with local LLMs, please provide the following information:
dolphin-2.1-mistral-7b.Q6_K.gguf
)The text was updated successfully, but these errors were encountered: