Commit Graph

33 Commits

Author SHA1 Message Date
cthomas
ab4ccfca31 feat: add tags support to blocks (#8474)
* feat: add tags support to blocks

* fix: add timestamps and org scoping to blocks_tags

Addresses PR feedback:

1. Migration: Added timestamps (created_at, updated_at), soft delete
   (is_deleted), audit fields (_created_by_id, _last_updated_by_id),
   and organization_id to blocks_tags table for filtering support.
   Follows SQLite baseline pattern (composite PK of block_id+tag, no
   separate id column) to avoid insert failures.

2. ORM: Relationship already correct with lazy="raise" to prevent
   implicit joins and passive_deletes=True for efficient CASCADE deletes.

3. Schema: Changed normalize_tags() from Any to dict for type safety.

4. SQLite: Added blocks_tags to SQLite baseline schema to prevent
   table-not-found errors.

5. Code: Updated all tag row inserts to include organization_id.

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

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

* fix: add ORM columns and update SQLite baseline for blocks_tags

Fixes test failures (CompileError: Unconsumed column names: organization_id):

1. ORM: Added organization_id, timestamps, audit fields to BlocksTags
   ORM model to match database schema from migrations.

2. SQLite baseline: Added full column set to blocks_tags (organization_id,
   timestamps, audit fields) to match PostgreSQL schema.

3. Test: Added 'tags' to expected Block schema fields.

This ensures SQLite and PostgreSQL have matching schemas and the ORM
can consume all columns that the code inserts.

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

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

* revert change to existing alembic migration

* fix: remove passive_deletes and SQLite support for blocks_tags

1. Removed passive_deletes=True from Block.tags relationship to match
   AgentsTags pattern (neither have ondelete CASCADE in DB schema).

2. Removed SQLite branch from _replace_block_pivot_rows_async since
   blocks_tags table is PostgreSQL-only (migration skips SQLite).

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

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

* api sync

---------

Co-authored-by: Letta <noreply@letta.com>
2026-01-19 15:54:38 -08:00
Kian Jones
3e92fecb03 feat: query param validation block label, name, and search (#6397)
* add block label, name, and search query param validation

* finishing touches on blocks

* remove default for blocks

* query changes to api spec

* openapi changes

* change descriptions
2025-11-26 14:39:40 -08:00
cthomas
b08dc5c4d8 feat: mark include_relationships param as legacy in api (#6368) 2025-11-24 19:11:20 -08:00
Sarah Wooders
85ed29274c feat: clean up block return object [LET-5784] (#5641)
* fix: fix deep research agent

* chore: update blocks response

* add message

* update agents

* update

* use blockresponse

* undo merge conflict

* add internal agents and blocks

* remove unnecessary internal agent route

* fix utils server test

---------

Co-authored-by: christinatong01 <christina@letta.com>
2025-11-13 15:35:32 -08:00
Ari Webb
272f055b4a feat: attach/detach identities route on blocks and agents, move archives attach/detach routes to agents [LET-4428] (#5708)
* deprecate ids for identity endpoints in favor of attach

* move archive attach/detach to agent

* new identities routes

* overrides for path

---------

Co-authored-by: Ari Webb <ari@letta.com>
2025-10-24 15:14:20 -07:00
cthomas
899f70661c feat: add openai-style include param for agents relationship loading [LET-5820] (#5681)
feat: add include param to routes with version check
2025-10-24 15:14:20 -07:00
Kian Jones
bbaaabb6e1 fix: path validator had weird fastapi shared object memory bug (#5594)
* fix weird path param conflict

* move to factory model

* openapi

* use type hinting and import annotations

* re add after mc resolution
2025-10-24 15:13:15 -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
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
Sarah Wooders
7aff9aa659 feat: error handling for rest api for agents + blocks [LET-4625] (#5142) 2025-10-07 17:50:49 -07:00
Kian Jones
b8e9a80d93 merge this (#4759)
* wait I forgot to comit locally

* cp the entire core directory and then rm the .git subdir
2025-09-17 15:47:40 -07:00
Kian Jones
22f70ca07c chore: officially migrate to submodule (#4502)
* remove apps/core and apps/fern

* fix precommit

* add submodule updates in workflows

* submodule

* remove core tests

* update core revision

* Add submodules: true to all GitHub workflows

- Ensure all workflows can access git submodules
- Add submodules support to deployment, test, and CI workflows
- Fix YAML syntax issues in workflow files

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* remove core-lint

* upgrade core with latest main of oss

---------

Co-authored-by: Claude <noreply@anthropic.com>
2025-09-09 12:45:53 -07:00
Shubham Naik
eb21668f35 feat: add hidden property to group and blocks [PRO-1145] (#4415)
* feat: add hidden property to group and blocks

* feat: add hidden property to group and blocks

* chore: bup

* chore: add hidden property

* chore: next

---------

Co-authored-by: Shubham Naik <shub@memgpt.ai>
2025-09-04 10:53:16 -07:00
Kian Jones
fecf6decfb chore: migrate to ruff (#4305)
* base requirements

* autofix

* Configure ruff for Python linting and formatting

- Set up minimal ruff configuration with basic checks (E, W, F, I)
- Add temporary ignores for common issues during migration
- Configure pre-commit hooks to use ruff with pass_filenames
- This enables gradual migration from black to ruff

* Delete sdj

* autofixed only

* migrate lint action

* more autofixed

* more fixes

* change precommit

* try changing the hook

* try this stuff
2025-08-29 11:11:19 -07:00
Shubham Naik
8c73495bef feat: memory blocks viewer (#3610)
Co-authored-by: Shubham Naik <shub@memgpt.ai>
2025-07-29 16:00:43 -07:00
Andy Li
1959109821 feat: support for project_id and backfills 2025-07-25 13:06:12 -07:00
cthomas
4f37a39741 feat: remove agents SELECTIN from blocks model (#3427) 2025-07-19 23:04:33 -07:00
cthomas
3d897a446e fix: skip agent joins in blocks endpoint (#3226) 2025-07-08 12:38:08 -07:00
cthomas
edbddd746d feat(asyncify): migrate count blocks (#2374) 2025-05-23 09:53:43 -07:00
cthomas
9ac0fa2aef feat(asyncify): migrate create block (#2368) 2025-05-23 09:07:13 -07:00
cthomas
4a578f5391 feat(asyncify): migrate get block agents (#2226) 2025-05-16 15:18:34 -07:00
cthomas
00914e5308 feat(asyncify): migrate actors(users) endpoints (#2211) 2025-05-16 00:37:08 -07:00
cthomas
42aa8e2b69 feat: make get blocks async (#2162) 2025-05-13 15:09:25 -07:00
Andy Li
b0a9aa5f42 feat: endpoint to count blocks and groups (#1975) 2025-05-05 17:09:13 -07:00
cthomas
83f74b95be fix: blocks list endpoint bug (#1421) 2025-03-26 17:05:28 -07:00
cthomas
6b4533e7cb feat: add identities to blocks (#1219) 2025-03-12 12:09:31 -07:00
cthomas
0202f90562 chore: change the name of user id to actor (#1098) 2025-02-25 11:35:19 -08:00
Matthew Zhou
377d8f8051 feat: Add list_agents_for_block endpoint (#759) 2025-01-23 17:28:08 -08:00
cthomas
e6fb7415a4 chore: rename routes get->retrieve and update->modify (#733) 2025-01-22 18:42:22 -08:00
mlong93
c9e18e66f1 fix: move all attach detach to be under agents (#723)
Co-authored-by: Mindy Long <mindy@letta.com>
2025-01-22 12:16:31 -08:00
Caren Thomas
fd8961c39e run black, add isort config to pyproject.toml 2024-12-26 19:43:11 -08:00
Shubham Naik
0b8017853a fix: add tests to cypress 2024-12-23 14:44:08 -08:00
Shubham Naik
5a743d1dc4 Add 'apps/core/' from commit 'ea2a7395f4023f5b9fab03e6273db3b64a1181d5'
git-subtree-dir: apps/core
git-subtree-mainline: a8963e11e7a5a0059acbc849ce768e1eee80df61
git-subtree-split: ea2a7395f4023f5b9fab03e6273db3b64a1181d5
2024-12-22 20:31:22 -08:00