Commit Graph

234 Commits

Author SHA1 Message Date
doria f988aae996
create Representation class and use it to unify all formatting (#214)
* feat: add optional JWT and webhook secrets to honcho instance creation

* chore: ignore spurious warnings

* feat: add response format if using gpt-5 model family

* feat: add response models to all apis except anthropic

* fix: raise NotImplementedError for response models in AsyncAnthropic client

* chore: address review

* [WIP] representation structure + deriver cleanup

* chore: add tests, cleanup

* feat: [WIP: semi-working] representation object

* fix: alignment

* fix: make observations hashable for dedup

* fix: datetime formatting, observation counting

* fix: switch to int for message id, clean up representation

* feat: remove need for metadata working rep

* chore: cleanup

* fix: use tenacity instead of custom fns

* feat: add representation and card to context if desired

* feat: add semantically relevant observations

* fix: pass all params to streaming, nonblocking streaming

* feat: consolidate document saving, make working representation fetching much smarter

* chore: add 100% test coverage of representation util

* feat: basic dream infra

* feat: dream queue item first pass

* chore: fixes & cleanup from coderabbit

* fix: dreams scheduled when new document count reaches a certain threshold

* feat: wip: timed dreams (not working)

* fix: test

* fix: remove useless pyright ignore

* fix: executing dreams

* feat: dreaming

* feat: [WIP] longmemeval bench

* feat: add USE_PEER_CARD setting, fix longmem test driver

* feat: get full working rep for dialectic in one swoop -- fix representation_from_documents to use the proper timestamp!

* fix: timestamps for real, handle assistant qs in longmem

* fix: remove old client, add batching to longmem

* perf: remove duplicate detection, will move to background task

* feat: track perf metrics on evals

* feat: adjust deriver prompt to use peer_id, add question date to question, clean up deriver

* fix: label metrics by task for better perf trace

* chore: code review

* feat: add efficiency score to longmem bench

* chore: tuning and cleaning up eval

* chore: bring in the big prompts

* feat: add support for vllm client

* feat: perf: bundle db calls in deriver and dialectic, increase max conns in docker db

* feat: add merge-sessions flag to longmemeval, add SUMMARY_ENABLED flag

* fix: COLLECT_METRICS default false

* chore: display start/end message ids, don't include in metrics

* fix: break large messages apart for eval

* fix: only get/create collection when needed

* feat: properly attribute documents with message id ranges and add session name column to documents

* fix: revert move of get_or_create_collection (need for fkey)

* fix: always get collection with peer name even if it's none

* chore: coderabbit

* fix: give peer card its own config, expand document schema, refactor get_context to be parallel, various cleanup chores and bugfixes

* chore: refactor: reify observer/observed system across entire codebase, including db migration

* refactor: cleanup code organization, make singletons where desired

* refactor: replace embeddings store with representation manager

* chore: coderabbit cleanup

* chore: update migration to non-null session param in documents, general review and cleanup

* chore: merge branch 'main' into ben/deriver-tidy

* chore: review fixes
2025-10-07 15:28:44 -04:00
Rajat Ahuja accdc79fdb
feat: Modify the Summary BaseModel to use public_id of message rather than internal ID (#224)
* feat: Modify the Summary BaseModel to use public_id of message rather than internal ID

* fix: fallback invocation

* fix: strict validation

* fix: rm ID from Message schema

* fix: make SDK changes
2025-10-07 12:37:22 -04:00
Vineeth Voruganti 840a2a31b4
chore: update changelogs (#225) 2025-10-02 12:12:21 -04:00
Vineeth Voruganti 73c5eb1f5a
SDK Changes (#223)
* fix: Add top level transactions for tracing in deriver

* fix: Add Delete methods to sdks for sessions

* feat: Add session deletion and session level deriver status methods

* fix: Streaming support to python sdk

* fix: Checkpoint Streaming working in SDKs with workarounds for stainless

* feat: fix pagination, add message metadata update, and get peer card methods

* feat: parity in typescript and python sdks

* fix: Address Coderabbit

* fix: Address Coderabbit

* chore: add basedpyright rules to sdk

* fix: Code Rabbit & Changelog

* fix: updated docs with api-reference
2025-10-01 16:25:30 -04:00
Rajat Ahuja 3df044e1b7
feat: use token limit from all senders for rollup (#221)
* feat: use token limit from all senders for rollup

* fix: send all messages to queue_manager

* test: fixe tests and move ownership check to separate query

* fix: if first sender message exceeds batch then we should return an empty batch

* feat: separate representation and non-representation processing

* fix: return msg object and queue items

* fix: rollup logic with interleaving messages

* fix: rm TODO

* Fix langfuse trace and add fallback for weird error in deriver

* fix: simplify query

* fix: comment out update_current_generation

* fix: BPR

---------

Co-authored-by: Vineeth Voruganti <13438633+VVoruganti@users.noreply.github.com>
2025-10-01 16:10:10 -04:00
doria ef84e8f99d
Merge pull request #220 from plastic-labs/dr-frmr-patch-1
hotfix: correct path in peer card GET
2025-09-26 13:16:02 -04:00
doria 306c78c9fc
hotfix: correct path in peer card GET 2025-09-26 13:15:39 -04:00
doria 405f056400
2.3.2 update (#217)
* chore: 2.3.2 update

* fix: add 2.3.1 which never got a changelog
2025-09-26 11:41:28 -04:00
Rajat Ahuja f6520c1ffe
fix: sum input tokens and set session context cutoff to MAX_INPUT_TOKENS - sum (#218)
* fix: sum input tokens and set session context cutoff to MAX_INPUT_TOKENS - sum

* fix: CR comments + remove context var

* fix: CR comments 2

* fix: use cache decorator; rm logger

* refactor: re-fetch formatted history after getting global working rep
2025-09-26 11:37:40 -04:00
Rajat Ahuja 6e01af2005
Track worker ownership (#216)
* fix: simplify; use debug logs

* fix: random type error

* fix: CR comments

* fix: move limit check before opening db connection

* fix: use single SQL call to verify ownership and fetch message batch

* fix: CR comments 2
2025-09-25 15:14:48 -04:00
Rajat Ahuja 1ae2c4599a
fix: separate clean and claim work units. skip locked AQS rows on delete (#215) 2025-09-25 10:44:59 -04:00
Vineeth Voruganti 09a6b4f8e2
fix: add shadow .env file for compose file (#196) 2025-09-24 16:09:51 -04:00
Eri Barrett b21b74af11
color theme and broken link fix (#213)
* cleanup: simple color changes, image resize

* fix: broken links

* fix: logo colors

* redo: broken links, h4 formatting on glossary page

* fix: more link edits

* fix: icon for file upload page

* fix: coderabbit suggestion

* chore: remove dead file

* chore: update mintlify version

---------

Co-authored-by: Vineeth Voruganti <13438633+VVoruganti@users.noreply.github.com>
2025-09-24 16:06:54 -04:00
doria d5f10b9ed2
Merge pull request #206 from plastic-labs/rajat/DEV-1069
Rollup representation tasks in queue for batch processing
2025-09-24 15:49:58 -04:00
Rajat Ahuja 57977b541e fix: Integer -> BigInteger 2025-09-24 13:22:29 -04:00
Rajat Ahuja fb66630142
feat: get peer cards endpoint (#209)
* feat: get peer cards endpoint

* fix: rm try/catch

* refactor: POST -> GET

* fix: /peer-cards -> /peer-card

* fix: /peer-cards -> /peer-card

---------

Co-authored-by: Vineeth Voruganti <13438633+VVoruganti@users.noreply.github.com>
2025-09-24 12:56:45 -04:00
Rajat Ahuja 70b6965939 fix: CR comments 2025-09-24 12:13:15 -04:00
Benjamin McCormick f1bdcf0f2e fix: langfuse sdk changes 2025-09-24 12:10:18 -04:00
doria f21d2c78d8
Merge branch 'main' into rajat/DEV-1069 2025-09-24 11:56:36 -04:00
doria 00396976f8
Merge pull request #211 from plastic-labs/rajat/db-scoping
fix dialectic and embedding store db scoping
2025-09-24 11:55:23 -04:00
doria 93c23d7e33
Merge branch 'main' into rajat/db-scoping 2025-09-24 11:54:56 -04:00
doria 5d88c459b8
refactor: replace mirascope with handrolled client (#202)
* feat: add optional JWT and webhook secrets to honcho instance creation

* chore: ignore spurious warnings

* feat: add response format if using gpt-5 model family

* feat: add response models to all apis except anthropic

* fix: raise NotImplementedError for response models in AsyncAnthropic client

* chore: address review

* chore: add tests, cleanup

* fix: use tenacity instead of custom fns

* fix: pass all params to streaming, nonblocking streaming

* chore: fix test mock
2025-09-24 11:53:30 -04:00
Rajat Ahuja 1cc3d9aaaf perf: use join on messages table instead of storing token_count in queue payload 2025-09-24 11:45:04 -04:00
Rajat Ahuja 218d00c666 test: fix peer chat tests 2025-09-23 17:44:43 -04:00
Vineeth Voruganti 0b58472ab1 chore: Coderabbit Nitpicks 2025-09-23 17:25:11 -04:00
Rajat Ahuja c8e7929273 fix: shorten db scope for dialectic and embedding 2025-09-23 17:12:39 -04:00
Rajat Ahuja 561e4f6743 fix: config.toml and .env.template 2025-09-23 11:25:21 -04:00
Rajat Ahuja 13574e1587 fix: nit issues 2025-09-22 14:12:20 -04:00
Rajat Ahuja b412f595b0 fix: migration per CR comments 2025-09-22 13:59:47 -04:00
Rajat Ahuja 26f975f808 test: CR comments 2025-09-22 13:31:33 -04:00
Rajat Ahuja 1a7bd91cdd fix: use earliest message as cutoff 2025-09-22 13:13:56 -04:00
Rajat Ahuja f4fefd5d70 fix: remove payloads from reasoner.reason call 2025-09-22 12:44:37 -04:00
Rajat Ahuja 5301914847 fix: CR comments 2025-09-19 12:24:01 -04:00
Rajat Ahuja dfa7577eb8 Merge branch 'main' into rajat/DEV-1069 2025-09-19 11:59:51 -04:00
doria 3f47866ae0
feat: add configurable max message size, update tests and docs -- fixes token overflow in deriver (#208)
* feat: add configurable max message size, update tests and docs -- this fixes token overflow in deriver

* fix: remove LLMError special handling

* chore: bump version

---------

Co-authored-by: Rajat Ahuja <rahuja445@gmail.com>
Co-authored-by: Vineeth Voruganti <13438633+VVoruganti@users.noreply.github.com>
2025-09-18 15:57:53 -04:00
Edison Qu a2c84e86ba
typo: workspaceId in quickstart.mdx (#207) 2025-09-15 14:56:06 -04:00
Rajat Ahuja 6ae0d9f434 chore: CR comments 2025-09-05 16:30:55 -04:00
Rajat Ahuja faefb9ac86 test: queue manager 2025-09-05 16:12:35 -04:00
Rajat Ahuja 4328fb3d2a fix: actually pass in token count from msg to queue item 2025-09-05 14:33:42 -04:00
Rajat Ahuja 4eb6830236 feat: batch representation task processing 2025-09-05 13:47:03 -04:00
Rajat Ahuja e6c580b660 refactor: queue manager 2025-09-05 12:47:15 -04:00
Rajat Ahuja d09c488ed1 refactor: add token count to queue item table 2025-09-05 12:47:15 -04:00
doria 802aac0d70
feat: targeted peer cards (#204)
* feat: targeted peer cards

* chore: review cleanup

* chore: Code Rabbit Comment cleanup

---------

Co-authored-by: Vineeth Voruganti <13438633+VVoruganti@users.noreply.github.com>
2025-09-04 12:13:34 -04:00
Vineeth Voruganti 2c5c0f0b62
Docs Refresh (#200)
* Initial Draft

* Split up code block

* Clean up code

* Add retrieval use cases

* fix: Code Rabbit Suggestions

* Code Rabbit AGain
2025-08-29 16:27:07 -04:00
Eri Barrett 6b7cf82c1c
docs quickfix (#198)
* updated platform page

* fix: update explore page screenshots

* fix: empty object to init client

* fix: add async operations to ts code

* add: output structure for sessionContext, messages, and workingrep in docs

* Delete docs/scratch.md

* fix: review comments

* fix: delete the 212 version from changelog

* Apply stashed changes and resolve conflicts
2025-08-27 12:03:09 -04:00
Eri Barrett 8af3494ad5
platform docs w/ new ui screenshots (#195)
* updated platform page

* fix: update explore page screenshots

* fix: empty object to init client

* fix: add async operations to ts code

* add: output structure for sessionContext, messages, and workingrep in docs

* Delete docs/scratch.md

* fix: review comments

* fix: delete the 212 version from changelog
2025-08-27 10:53:26 -04:00
Rajat Ahuja ccaffbba67
refactor: scope tracked_db usage within process_representation_task (#194)
* refactor: scope tracked_db usage within process_representation_task

* fix: clean up method

* fix: load collection name
2025-08-14 13:15:25 -04:00
Vineeth Voruganti 9c8e74bc04
fix: get context cutoff to be exclusive (#193) 2025-08-13 16:16:02 -04:00
Vineeth Voruganti f6e01a6f72
2.3.0 Release & N+1 Query Optimization (#190)
* chore (docs): Initial Changelog for 2.3.0

* optimize batch enqueue calculation

* fix (embed): Truncate context during _query_documents_for_level

* chore (docs): Update Changelog with patches

* fix: Code Rabbit Suggestions

* fix: Code Rabbit Suggestions
2025-08-13 14:58:58 -04:00
doria 6efb950ef5
feat: enhance critical analysis functionality by adding peer_id parameter (#191)
- Updated `critical_analysis_call` and `critical_analysis_prompt` to include a new `peer_id` parameter for improved context in analysis.
- Modified the `CertaintyReasoner` class to pass the sender's name as `peer_id` during analysis calls.
- Adjusted test cases to reflect the inclusion of `peer_id`, ensuring comprehensive coverage of the new functionality.
2025-08-13 13:46:56 -04:00