v0.3.18
This release introduces tool creation from inside Python scripts, returning usage statistics, and many bug fixes.
🔧 Tool creation in the Python Client
We added support for directly creating tools in Python:
def print_tool(message: str):
"""
Args:
message (str): The message to print.
Returns:
str: The message that was printed.
"""
print(message)
return message
tool = client.create_tool(print_tool, tags=["extras"])
agent_state = client.create_agent(tools=[tool.name]))
📊 Usage Statistics
Sending a message to an agent now also returns usage statistics for computing cost metrics:
class MemGPTUsageStatistics(BaseModel):
completion_tokens: int
prompt_tokens: int
total_tokens: int
step_count: int
What's Changed
- feat: Qdrant storage connector by @Anush008 in #1023
- fix: remove server locking on agents by @sarahwooders in #1442
- fix: various fixes to python client and add tutorial notebooks by @sarahwooders in #1377
- feat: cursor pagination of get_all_users in /admin/users route by @ajanitshimanga in #1441
- fix: allow concurrent processing for
async def send_message
function by @sarahwooders in #1445 - fix: update
rdme-openapi.yml
to correct Python + poetry version by @sarahwooders in #1446 - feat: Migrating CLI to run on MemGPT Client for
memgpt [list/add/delete]
(#1428) by @sarahwooders in #1449 - fix: update
Dockerfile
to Python 3.12 by @sarahwooders in #1456 - fix: debug logs in server (#1452) by @sarahwooders in #1457
- feat: add tools from the Python client by @sarahwooders in #1463
- fix: simple_summary_wrapper function_call KeyError by @djkazic in #1265
- fix: add
ensure_ascii
to missingjson.dumps
calls by @cpacker in #1466 - feat: add more tool calling support to
LocalClient
by @sarahwooders in #1465 - fix: fix ugly dev tool print in cli by @cpacker in #1469
- fix: patch
/pop
,/retry
, and/rethink
by @cpacker in #1471 - fix: check tool call type by @sarahwooders in #1451
- fix: drop print from #1465 by @cpacker in #1472
- feat: dev portal fixes for server changes by @sarahwooders in #1474
- fix: more server patches for dev portal by @sarahwooders in #1475
- feat: add token streaming to the MemGPT API by @cpacker in #1280
- feat: include usage statistics in message response by @sarahwooders in #1482
New Contributors
- @Anush008 made their first contribution in #1023
- @ajanitshimanga made their first contribution in #1441
- @djkazic made their first contribution in #1265
Full Changelog: 0.3.17...0.3.18