Commit Graph

32 Commits

Author SHA1 Message Date
Ari Webb
193c0e4b74 feat: add override_model to message endpoints (#8763)
* feat: add override_model to message endpoints

* add tests back

* remove from ci
2026-01-19 15:54:42 -08:00
Sarah Wooders
7669896184 feat: allow client-side tools to be specified in request (#8220)
* feat: allow client-side tools to be specified in request

Add `client_tools` field to LettaRequest to allow passing tool schemas
at message creation time without requiring server-side registration.
When the agent calls a client-side tool, execution pauses with
stop_reason=requires_approval for the client to provide tool returns.

- Add ClientToolSchema class for request-level tool schemas
- Merge client tools with agent tools in _get_valid_tools()
- Treat client-side tool calls as requiring approval
- Add integration tests for client-side tools flow

🤖 Generated with [Letta Code](https://letta.com)

Co-Authored-By: Letta <noreply@letta.com>

* test: add comprehensive end-to-end test for client-side tools

Update integration test to verify the complete flow:
- Agent calls client-side tool and pauses
- Client provides tool return with secret code
- Agent processes and responds
- User asks about the code, agent recalls it
- Validate full conversation history makes sense

🤖 Generated with [Letta Code](https://letta.com)

Co-Authored-By: Letta <noreply@letta.com>

* update apis

* fix: client-side tools schema format and test assertions

- Use flat schema format for client tools (matching t.json_schema)
- Support both object and dict access for client tools
- Fix stop_reason assertions to access .stop_reason attribute

🤖 Generated with [Letta Code](https://letta.com)

Co-Authored-By: Letta <noreply@letta.com>

* refactor: simplify client_tools access pattern

ClientToolSchema objects always have .name attribute

🤖 Generated with [Letta Code](https://letta.com)

Co-Authored-By: Letta <noreply@letta.com>

* fix: add client_tools parameter to LettaAgentV2 for API compatibility

V2 agent doesn't use client_tools but needs the parameter
to match the base class signature.

🤖 Generated with [Letta Code](https://letta.com)

Co-Authored-By: Letta <noreply@letta.com>

* revert: remove client_tools from LettaRequestConfig

Client-side tools don't work with background jobs since
there's no client present to provide tool returns.

🤖 Generated with [Letta Code](https://letta.com)

Co-Authored-By: Letta <noreply@letta.com>

* fix: add client_tools parameter to SleeptimeMultiAgent classes

Add client_tools to step() and stream() methods in:
- SleeptimeMultiAgentV3
- SleeptimeMultiAgentV4

🤖 Generated with [Letta Code](https://letta.com)

Co-Authored-By: Letta <noreply@letta.com>

* chore: regenerate API specs for client_tools support

🤖 Generated with [Letta Code](https://letta.com)

Co-Authored-By: Letta <noreply@letta.com>

---------

Co-authored-by: Letta <noreply@letta.com>
2026-01-12 10:57:48 -08:00
jnjpng
edbff34d63 feat: enable streaming flag on send message [LET-6100] (#6040)
* base

* base

* update

* stainless

* final

---------

Co-authored-by: Letta Bot <noreply@letta.com>
2025-11-13 15:36:55 -08:00
jnjpng
e2774c07c6 feat: generate otid when using input field on message send (#5990)
* base

* try this out

* plz

* fix

---------

Co-authored-by: Letta Bot <noreply@letta.com>
2025-11-13 15:36:55 -08:00
Ari Webb
ed99d7eb2b feat: add input option to send message route [LET-4540] (#5938)
---------

Co-authored-by: Ari Webb <ari@letta.com>
2025-11-13 15:36:50 -08:00
cthomas
6c27d8a1ec feat: mark use_assistant_message, etc as deprecated [LET-4556] (#5598)
feat: mark use_assistant_message, etc as deprecated
2025-10-24 15:13:15 -07:00
cthomas
ab8b19df1c feat: make include pings default to true (#4438) 2025-09-05 12:14:28 -07:00
cthomas
697be58b78 feat: make new message create type field optional [LET-4116] (#4319)
feat: make new message create type field optional
2025-08-29 15:22:34 -07:00
cthomas
bfdb586f74 feat: add approval create input to messages endpoints [LET-4110] (#4309)
* feat: add approval create input to messages endpoints

* rename discriminator tag

* add base class with default

* add field validator

* exclude new type field from agent file schema
2025-08-29 13:16:03 -07:00
cthomas
04767aa4fe feat: remove stream_steps reference from api docs [LET-4109] (#4308)
feat: remove stream_steps reference from api docs
2025-08-29 11:20:32 -07:00
cthomas
6ca388557f feat: add new client.runs.stream endpoint (#4165) 2025-08-25 13:42:22 -07:00
cthomas
03cf5f43ea feat: add background flag to streaming api (#4148) 2025-08-24 20:45:35 -07:00
Charles Packer
a13c6c78bb feat: move keepalive to an arg (#3652) 2025-07-30 16:49:45 -07:00
Matthew Zhou
84ea52172a feat: Add ability to disable reasoning (#3594) 2025-07-28 15:30:10 -07:00
cthomas
a332b34830 feat: make create_async route consistent with other message routes (#2877) 2025-06-19 13:51:51 -07:00
cthomas
883050e761 feat: set request heartbeat for max steps (#2739) 2025-06-10 15:26:07 -07:00
Shangyin Tan
f9b6efa632 feat: add max_steps as argument to messages.create (#2664)
Co-authored-by: Sarah Wooders <sarahwooders@gmail.com>
2025-06-09 16:54:48 -07:00
Sarah Wooders
953ed5a610 feat: add include_return_message_types to LettaRequest to filter down requests (#2666) 2025-06-06 15:48:27 -07:00
Matthew Zhou
ba5897545b chore: Update description of callback url (#1985) 2025-05-02 11:15:05 -07:00
Matthew Zhou
15fefe0e1a feat: Add callback for jobs (#1776)
Co-authored-by: Sarah Wooders <sarahwooders@gmail.com>
2025-04-18 10:48:04 -07:00
Sarah Wooders
41d85c4114 feat: add batch job tracking and generate batch APIs (#1727)
Co-authored-by: Matt Zhou <mattzh1314@gmail.com>
2025-04-17 17:02:07 -07:00
Matthew Zhou
68fbcf33d8 feat: Finish step_until_request in new batch agent loop (#1656) 2025-04-10 10:19:06 -07:00
cthomas
5a71a2c346 chore: remove nested config in send requests (#813) 2025-01-28 14:58:53 -08:00
mlong93
e4700fdfe1 fix: updated send_message_async request params, get_run_messages returns LettaMessage (#638)
Co-authored-by: Mindy Long <mindy@letta.com>
Co-authored-by: cthomas <caren@letta.com>
Co-authored-by: Shubham Naik <shubham.naik10@gmail.com>
Co-authored-by: Shubham Naik <shub@memgpt.ai>
2025-01-15 14:47:20 -08:00
Sarah Wooders
096791aae1 feat: parse assistant message to AssistantMessage by default (#528) 2025-01-08 15:00:32 -08:00
Caren Thomas
7144fd2867 run black, add isort config to pyproject.toml 2024-12-26 19:43:11 -08:00
Shubham Naik
4cf354c033 fix: add tests to cypress 2024-12-23 14:44:08 -08:00
Sarah Wooders
fae2d06755 feat: modify REST API schemas (#2121) 2024-12-10 16:10:34 -08:00
Matthew Zhou
5a59d2ac42 feat: Separate out streaming route (#2111) 2024-11-27 14:03:46 -08:00
Charles Packer
f408436669 feat: refactor the POST agent/messages API to take multiple messages (#1882) 2024-10-14 13:29:07 -07:00
Charles Packer
b17246a3b0 feat: add back support for using AssistantMessage subtype of LettaMessage (#1812) 2024-10-04 15:36:33 -07:00
Sarah Wooders
8ae1e64987 chore: migrate package name to letta (#1775)
Co-authored-by: Charles Packer <packercharles@gmail.com>
Co-authored-by: Shubham Naik <shubham.naik10@gmail.com>
Co-authored-by: Shubham Naik <shub@memgpt.ai>
2024-09-23 09:15:18 -07:00