MyGit

0.5.2

letta-ai/letta

版本发布时间: 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:

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 for TerminalToolRule are only supported by models and providers which support structured outputs, which is currently only OpenAI with gpt-4o and gpt-4o-mini

🐛 Bugfixes + Misc

What's Changed

Full Changelog: https://github.com/letta-ai/letta/compare/0.5.1...0.5.2

相关地址:原始地址 下载(tar) 下载(zip)

查看:2024-11-07发行的版本