Commit Graph

269 Commits

Author SHA1 Message Date
cthomas
c6f1a3a0b8 feat: add descriptive titles to blocks routes for docs search [LET-5756] (#5604)
feat: add descriptive titles to routes for docs search
2025-10-24 15:13:15 -07:00
cthomas
7b2e7e2f4c feat: remove un-paginated message list on usage stats [LET-5747] (#5599)
feat: remove un-paginated message list on usage stats
2025-10-24 15:13:15 -07: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
fc9052fb6e chore: rename cancel agent to cancel message [LET-4346] (#5597)
* chore: rename cancel agent to cancel message

* fix type-check
2025-10-24 15:13:15 -07:00
Shubham Naik
1f1f0e3ef1 parallel tool call template stupport [LET-5658] (#5575)
* chore: parallel tool call bugfix

* chore: next

* chore: next

* chore: parallel tool call

---------

Co-authored-by: Shubham Naik <shub@memgpt.ai>
2025-10-24 15:13:15 -07:00
Sarah Wooders
08be90f5e9 feat: revise mcp tool routes (#5195)
* refactored version of MCP routs

* feat: revise MCP routes

* working through new routes spec

* refining

* add necessary patch for config

* mcp servers progress

* small fixes

* updates

* finished

* just stage and publish api

* make update static

---------

Co-authored-by: Ari Webb <ari@letta.com>
Co-authored-by: Ari Webb <arijwebb@gmail.com>
2025-10-24 15:13:15 -07:00
cthomas
73dcc0d4b7 feat: latest hitl + parallel tool call changes (#5565) 2025-10-24 15:12:49 -07:00
Kian Jones
448ba33c70 fix: source id from pydantic base class rather than expected string id (#5554)
* first pass

* hacky fix bc of path import
2025-10-24 15:12:26 -07:00
Christina Tong
79f49c33d8 feat: add tool_used field to run_metrics [LET-5419] (#5540)
* feat: add tool_used field to run_metrics [LET-5419]

* change to tool name

* use tool ids over names

* add generated files

* chore: update OpenAPI schema to include tools_used field in RunMetrics

* update alembic file
2025-10-24 15:12:11 -07:00
cthomas
f8437d47e2 feat: add support for hitl parallel tool calling (#5549)
* feat: add support for hitl parallel tool calling

* rename to requested_tool_calls
2025-10-24 15:12:11 -07:00
Matthew Zhou
ddd1686ad1 feat: Add flag to tools to signify if they are race safe [LET-5611] (#5548)
* wip add race unsafe param

* Alembic migration

* Fern autogen

* Set default to True

* Adjust fern

* Rename field

* Run fern autogen

* Add enable_parallel_execution to Tool Create and Update
2025-10-24 15:12:11 -07:00
Kian Jones
3ac7cde434 feat: add path parameter validation for source_id (#5524)
🤖 Generated with [Claude Code](https://claude.ai/code)

Co-authored-by: Claude <noreply@anthropic.com>
2025-10-24 15:12:11 -07:00
Kian Jones
2878a6e4bd feat: add path parameter validation for folder_id (#5523)
🤖 Generated with [Claude Code](https://claude.ai/code)

Co-authored-by: Claude <noreply@anthropic.com>
2025-10-24 15:12:11 -07:00
Kian Jones
47bf549dfc feat: add path parameter validation for file_id (#5522)
🤖 Generated with [Claude Code](https://claude.ai/code)

Co-authored-by: Claude <noreply@anthropic.com>
2025-10-24 15:12:11 -07:00
Kian Jones
3b56c53b6c feat: add path parameter validation for group_id (#5521)
🤖 Generated with [Claude Code](https://claude.ai/code)

Co-authored-by: Claude <noreply@anthropic.com>
2025-10-24 15:12:11 -07:00
Kian Jones
8a35b886ea feat: add path parameter validation to message_id (#5515)
* feat: add path parameter validation to message_id

* fix: typo

* add comment for agent_id here

* openapi.json changes
2025-10-24 15:12:11 -07:00
Kian Jones
0dd7506af7 feat: add path parameter validation for job_id (#5518)
openapi.json changes
2025-10-24 15:12:11 -07:00
Kian Jones
ad0f6b2be0 feat: add validator for block id (#5514)
* add validator for block id

* add import

* fix plurality:

* openapi-schema.json
2025-10-24 15:12:11 -07:00
Kian Jones
f04bc0753c feat: add path parameter validation for tool_id (#5525)
🤖 Generated with [Claude Code](https://claude.ai/code)

Co-authored-by: Claude <noreply@anthropic.com>
2025-10-24 15:12:11 -07:00
Kian Jones
c4379c3b8b feat: add path validation for archive, provider, sandbox, step, and identity IDs (#5526)
- Add validation for archive_id in archives.py
- Add validation for provider_id in providers.py
- Add validation for sandbox_config_id in sandbox_configs.py
- Add validation for step_id in steps.py
- Add validation for identity_id in identities.py
- Update validators.py to include new primitives and remove mcp_server
- Regenerate OpenAPI schema and SDK

🤖 Generated with Claude Code

Co-authored-by: Claude <noreply@anthropic.com>
2025-10-24 15:12:11 -07:00
Matthew Zhou
c97a395a48 fix: Make parallel tool calls optional on create/update agent [LET-5612] (#5545)
Make parallel tool calls optional on create/update agent pydantic
2025-10-24 15:12:11 -07:00
Matthew Zhou
396959da2f feat: Add toggle on llm config for parallel tool calling [LET-5610] (#5542)
* Add parallel tool calling field

* Thread through parallel tool use

* Fern autogen

* Fix send message v2
2025-10-24 15:12:11 -07:00
Kian Jones
4bbd760204 feat: add validation to fastapi routes for agent IDs (#5454)
* change my PR to match Caren's

* add path parameter validation for agent id first

* remove old import

* remove old agent_id_pattern pattern

* add example and fix max/min calculation to include hyphen

* fix regex string interpolation

* example deprecated in favour of examples

* openapi autogen

* change template test to expect 422

* fix 422 swallow

* expect 422 or 400

* rewrite  error codes

* fix hallucinated uuid

* tweaked error message test

* print docker logs on failure
2025-10-24 15:12:11 -07:00
Matthew Zhou
2dae4d33c3 feat: Implement streaming chat completions endpoint [LET-5485] (#5446)
* wip

* Add chat completions router and fix streaming service

* Finish chat completions

* Finish chat completions

* Remove extra print statement

* Run just api

* Don't explicitly throw http exceptions but surface Letta errors

* Remap errors

* Trigger CI

* Add missing Optional import
2025-10-24 15:12:11 -07:00
Matthew Zhou
b6f2dc63e5 chore: Deprecate voice-beta endpoint [LET-5483] (#5410)
Deprecate voice-beta endpoint
2025-10-24 15:11:31 -07:00
Shubham Naik
248c7c0b44 Chore remove deprecated routes (#5371)
* chore: remove deprecated routes

* chore: remove deprecated routes

---------

Co-authored-by: Shubham Naik <shub@memgpt.ai>
2025-10-24 15:11:31 -07:00
Shubham Naik
5af0c1535f feat: fix display name stuff (#5329)
* feat: fix display name stuff

* chore: fix types

---------

Co-authored-by: Shubham Naik <shub@memgpt.ai>
2025-10-24 15:11:31 -07:00
Shubham Naik
6a28f3852a Shub/let 4974 rename current to dev [LET-4974] (#5297)
* fix: rename current to dev

* chore: rename current to dev

* chore: next

* chore: rename fix

---------

Co-authored-by: Shubham Naik <shub@memgpt.ai>
2025-10-24 15:11:31 -07:00
cthomas
651c55dc2a feat: add approvals support in agentfile (#5337) 2025-10-24 15:11:31 -07:00
cthomas
f79a47dbc1 feat: amend union type for message object (#5326) 2025-10-24 15:11:31 -07:00
cthomas
6fd6232992 feat: add discriminator type to message return objects (#5318) 2025-10-24 15:11:31 -07:00
cthomas
31772b1fa1 chore: api sync (#5311) 2025-10-24 15:11:31 -07:00
cthomas
8e54f40bde feat: add new ApprovalReturn list in api layer (#5304)
* feat: add new ApprovalReturn list in api layer

* use base class

* api sync
2025-10-24 15:11:31 -07:00
jnjpng
a772bedfe4 feat: add secret pydantic fields (#5291)
* add secret pydantic fields

* stage publish

---------

Co-authored-by: Letta Bot <noreply@letta.com>
2025-10-09 15:25:21 -07:00
Shubham Naik
7eae22f77c feat: allow suers to test their own key [LET-5312] (#5257)
* feat: allow suers to test their own key

* chore: add unit test

---------

Co-authored-by: Shubham Naik <shub@memgpt.ai>
2025-10-09 13:20:53 -07:00
Matthew Zhou
45101fd97a feat: Add new tool_calls field to ToolCallMessage [LET-5333] (#5267)
* Add new tool_calls field to ToolCallMessage

* fern autogen
2025-10-09 13:20:52 -07:00
Matthew Zhou
d5de582561 feat: Add new multi tool return field [LET-5330] (#5264)
* Add new multi tool return field

* Fern autogen

* Add deprecated fields

* Run fern autogen
2025-10-09 13:20:52 -07:00
cthomas
9cb5156ac7 chore: sync 0.12.0 version (#3023)
Co-authored-by: Matthew Zhou <mattzh1314@gmail.com>
Co-authored-by: Kian Jones <11655409+kianjones9@users.noreply.github.com>
Co-authored-by: Sarah Wooders <sarahwooders@gmail.com>
2025-10-08 16:10:51 -07:00
Shelley Pham
346db5ce60 feat: add status to runs api [PRO-1529] (#5214) 2025-10-07 17:50:50 -07:00
Matthew Zhou
0f27bf5bdd feat: Support writing packed func return to ToolReturn object (#5209)
* wip

* Add func_response to ToolReturn object

* Fix response packaging

* Backpopulate in to_pydantic

* Fix ordering of packaging

* Add more checks
2025-10-07 17:50:50 -07:00
Matthew Zhou
5a315b8ad5 feat: Add id to tool return object [LET-4673] (#5191)
Add id to tool return object
2025-10-07 17:50:49 -07:00
cthomas
757bbcac37 feat: add pagination to agent files endpoint (#5086)
* feat: add pagination to agent files endpoint
2025-10-07 17:50:49 -07:00
cthomas
416af626cc feat: add pagination to agent folders endpoint (#5085)
* feat: add pagination to agent folders endpoint

* chore: regenerate API client with pagination parameters

* feat: add pagination parameters to agent folders and sources endpoints

- Add pagination parameters (before, after, limit, order, order_by) to list_agent_folders endpoint
- Add pagination parameters to list_agent_sources endpoint
- Update list_attached_sources_async method to support pagination with cursor-based filtering
- Regenerate API client with new pagination parameters
2025-10-07 17:50:49 -07:00
cthomas
3e70a21a6f feat: add hitl support inside agent file (#5170) 2025-10-07 17:50:49 -07:00
Sarah Wooders
e07a589796 chore: rm composio (#5151) 2025-10-07 17:50:49 -07:00
cthomas
cc913df27c feat: add signature to content parts (#5134)
* feat: add signature to content parts

* always base64 encode thought signature

* propagate thought signature back to request
2025-10-07 17:50:49 -07:00
cthomas
7c03288c05 feat: add pagination to agent blocks endpoint (#5087)
* feat: add pagination to agent blocks endpoint

* chore: regenerate API client with pagination parameters

* feat: implement pagination logic in list_blocks endpoint

- Fix list_blocks implementation to use pagination parameters that were already in the route signature
- Add in-memory pagination logic for core memory blocks (sorting, cursor filtering, limit)
- Sort blocks by created_at timestamp with proper asc/desc ordering
- Apply cursor-based pagination with before/after filters
- Apply limit to results
- Regenerate API client code to reflect pagination functionality

* fix: correct sorting logic in list_blocks endpoint

- Fix AttributeError where blocks don't have created_at attribute
- Sort blocks by id instead of created_at (core memory blocks don't have timestamps)
- Maintains consistent pagination behavior while fixing runtime error

* feat: implement database-level pagination for list_blocks endpoint

- Replace inefficient in-memory filtering with proper SQLAlchemy query
- Use BlocksAgents join table to filter blocks by agent_id at database level
- Apply pagination filters (before, after, limit) in SQL query for better performance
- Sort by BlockModel.created_at instead of in-memory sorting
- Add necessary imports: select from sqlalchemy, db_registry from letta.server.db
- Verify agent access before querying blocks

* refactor: move database logic from route to agent manager service layer

- Add list_agent_blocks_async method to AgentManager for proper separation of concerns
- Move SQLAlchemy query logic from REST route to service layer
- Keep routes focused on request/response handling
- Remove unnecessary imports from router (select, db_registry)
- Database pagination logic now properly encapsulated in service layer
2025-10-07 17:50:48 -07:00
cthomas
6e3e45fb2d feat: add pagination to agent groups endpoint (#5089)
feat: add pagination to list_agent_groups endpoint

- Add pagination parameters to list_groups_async method (before, after, limit, ascending)
- Update list_agent_groups endpoint to include pagination parameters (before, after, limit, order, order_by)
- Add proper cursor-based pagination and sorting in SQL query
- Pass pagination parameters from route to underlying service method
- Regenerate API client to reflect pagination parameter changes
2025-10-07 17:50:48 -07:00
cthomas
874ac0dd5c feat: add pagination to agent tools endpoint (#5084)
* feat: add pagination to agent tools endpoint

* chore: regenerate API client with pagination parameters

* feat: implement pagination logic in list_agent_tools endpoint

- Update list_attached_tools_async method to support pagination parameters (before, after, limit, ascending)
- Update list_agent_tools route to pass pagination parameters to underlying service method
- Add proper cursor-based pagination and sorting in SQL query

* feat: update default limit for list_agent_tools to 10

* feat: regenerate API client after limit parameter change
2025-10-07 17:50:48 -07:00
cthomas
cb5e89cfa2 feat: add pagination to agent messages endpoint (#5088)
* feat: add pagination to agent messages endpoint

* chore: regenerate API client with pagination parameters

* fix: remove limit fallback and use order parameter for reverse logic
2025-10-07 17:50:48 -07:00