0.5.2
版本发布时间: 2024-11-07 15:00:40
letta-ai/letta最新发布版本:0.5.2(2024-11-07 15:00:40)
🤖 Tags for agents (for associating agents with end users) #1984
You can now specify and query agents via an AgentState.tags
field. If you want to associate end user IDs on your application, we recommend using tags to associate an agent with a specific end user:
# create agent for a specific user
client.create_agent(tags=["my_user_id"])
# get agents for a user
agents = client.get_agents(tags=["my_user_id"])
🛠️ Constrain agent behavior with tool rules #1954
We are introducing initial support for "tool rules", which allows developer to define constrains on their tools, such as requiring that a tool terminate agent execution. We added the following tool rules:
-
TerminalToolRule(tool_name=...)
- If the tool is called, the agent ends execution -
InitToolRule(tool_name=...)
- The tool must be called first when an agent is run -
ToolRule(tool_name=..., children=[...])
- If the tool is called, it must be followed by one of the tools specified inchildren
Tool rules are defined per-agent, and passed when creating agents:
# agent which must always call `first_tool_to_call`, `second_tool_to_call`, then `final_tool` when invoked
agent_state = client.create_agent(
tool_rules = [
InitToolRule(tool_name="first_tool_to_call"),
ToolRule(tool_name="first_secret_word", children=["second_tool_to_call"]),
ToolRule(tool_name="fourth_secret_word", children=["final_tool"]),
TerminalToolRule(tool_name="send_message"),
]
)
By default, the send_message
tool is marked with TerminalToolRule
.
NOTE: All
ToolRules
types except forTerminalToolRule
are only supported by models and providers which support structured outputs, which is currently only OpenAI withgpt-4o
andgpt-4o-mini
🐛 Bugfixes + Misc
- Fix error in tool creation on ADE
- Fixes to tool updating
- Deprecation of
Block.name
in favor ofBlock.template_name
(only required for templated blocks) #1937 - Move
docker run letta/letta
to run on port8283
(previously8083
) - Properly returning
LettaUsageStatistics
https://github.com/letta-ai/letta/pull/1955 - Example notebooks on multi-agent, RAG, custom memory, and tools added in https://github.com/letta-ai/letta/tree/main/examples/notebooks
What's Changed
- chore: Consolidate CI style checks by @mattzh72 in https://github.com/letta-ai/letta/pull/1936
- test: Add archival insert test to GPT-4 and make tests failure sensitive by @mattzh72 in https://github.com/letta-ai/letta/pull/1930
- fix: Fix
letta delete-agent
by @mattzh72 in https://github.com/letta-ai/letta/pull/1940 - feat: Add orm for Tools and clean up Tool logic by @mattzh72 in https://github.com/letta-ai/letta/pull/1935
- fix: update ollama model for testing by @sarahwooders in https://github.com/letta-ai/letta/pull/1941
- chore: Remove legacy code and instances of anon_clientid by @mattzh72 in https://github.com/letta-ai/letta/pull/1942
- fix: fix inconsistent name and label usage for blocks to resolve recursive validation issue by @sarahwooders in https://github.com/letta-ai/letta/pull/1937
- feat: Enable base constructs to automatically populate "created_by" and "last_updated_by" fields for relevant objects by @mattzh72 in https://github.com/letta-ai/letta/pull/1944
- feat: move docker run command to use port 8283 by @sarahwooders in https://github.com/letta-ai/letta/pull/1949
- fix: Clean up some legacy code and fix Groq provider by @mattzh72 in https://github.com/letta-ai/letta/pull/1950
- feat: add workflow to also publish to memgpt repository by @sarahwooders in https://github.com/letta-ai/letta/pull/1953
- feat: added returning usage data by @cpacker in https://github.com/letta-ai/letta/pull/1955
- fix: Fix create organization bug by @mattzh72 in https://github.com/letta-ai/letta/pull/1956
- chore: fix markdown error by @4shub in https://github.com/letta-ai/letta/pull/1957
- feat: Auto-refresh
json_schema
after tool update by @mattzh72 in https://github.com/letta-ai/letta/pull/1958 - feat: Implement tool calling rules for agents by @mattzh72 in https://github.com/letta-ai/letta/pull/1954
- fix: Make imports more explicit for
BaseModel
v1 or v2 by @mattzh72 in https://github.com/letta-ai/letta/pull/1959 - fix: math renderer error by @4shub in https://github.com/letta-ai/letta/pull/1965
- chore: add migration script by @4shub in https://github.com/letta-ai/letta/pull/1960
- fix: fix bug with
POST /v1/agents/messages
route returning emptyLettaMessage
base objects by @cpacker in https://github.com/letta-ai/letta/pull/1966 - fix: stop running the PR title validation on main, only on PRs by @cpacker in https://github.com/letta-ai/letta/pull/1969
- chore: fix lettaresponse by @4shub in https://github.com/letta-ai/letta/pull/1968
- fix: removed dead workflow file by @cpacker in https://github.com/letta-ai/letta/pull/1970
- feat: Add endpoint to add base tools to an org by @mattzh72 in https://github.com/letta-ai/letta/pull/1971
- chore: Migrate database by @4shub in https://github.com/letta-ai/letta/pull/1974
- chore: Tweak composio log levels by @mattzh72 in https://github.com/letta-ai/letta/pull/1976
- chore: Remove extra print statements by @mattzh72 in https://github.com/letta-ai/letta/pull/1975
- feat: rename
block.name
toblock.template_name
for clarity and add shared block tests by @sarahwooders in https://github.com/letta-ai/letta/pull/1951 - feat: added ability to disable the initial message sequence during agent creation by @cpacker in https://github.com/letta-ai/letta/pull/1978
- chore: Move ID generation logic out of the ORM layer and into the Pydantic model layer by @mattzh72 in https://github.com/letta-ai/letta/pull/1981
- feat: add ability to list agents by
name
for REST API and python SDK by @sarahwooders in https://github.com/letta-ai/letta/pull/1982 - feat: add convenience link to open ADE from server launch by @cpacker in https://github.com/letta-ai/letta/pull/1986
- docs: update badges in readme by @cpacker in https://github.com/letta-ai/letta/pull/1985
- fix: add
name
alias toblock.template_name
to fix ADE by @sarahwooders in https://github.com/letta-ai/letta/pull/1987 - chore: install all extras for prod by @4shub in https://github.com/letta-ai/letta/pull/1989
- fix: fix issue with linking tools and adding new tools by @sarahwooders in https://github.com/letta-ai/letta/pull/1988
- chore: add letta web saftey test by @4shub in https://github.com/letta-ai/letta/pull/1991
- feat: Add ability to add tags to agents by @mattzh72 in https://github.com/letta-ai/letta/pull/1984
- fix: Resync agents when tools are missing by @mattzh72 in https://github.com/letta-ai/letta/pull/1994
- Revert "fix: Resync agents when tools are missing" by @sarahwooders in https://github.com/letta-ai/letta/pull/1996
- fix: misc fixes (bad link to old docs, composio print statement, context window selection) by @cpacker in https://github.com/letta-ai/letta/pull/1992
- fix: no error when the tool name is invalid in agent state by @mattzh72 in https://github.com/letta-ai/letta/pull/1997
- feat: add e2e example scripts for documentation by @sarahwooders in https://github.com/letta-ai/letta/pull/1995
- chore: Continue relaxing tool constraints by @mattzh72 in https://github.com/letta-ai/letta/pull/1999
- chore: add endpoint to update users by @4shub in https://github.com/letta-ai/letta/pull/1993
- chore: Add tool rules example by @mattzh72 in https://github.com/letta-ai/letta/pull/1998
- feat: move HTML rendering of messages into
LettaResponse
and update notebook by @sarahwooders in https://github.com/letta-ai/letta/pull/1983 - feat: add example notebooks by @sarahwooders in https://github.com/letta-ai/letta/pull/2001
- chore: bump to version 0.5.2 by @sarahwooders in https://github.com/letta-ai/letta/pull/2002
Full Changelog: https://github.com/letta-ai/letta/compare/0.5.1...0.5.2