Commit Graph

345 Commits

Author SHA1 Message Date
doria f218ac81ac
fix: properly handle documents with very old session/peer setups from previous versions of internal_metadata (#233) 2025-10-10 14:19:05 -04:00
Benjamin McCormick 471ef778c7 fix: properly handle documents with very old session/peer setups from previous versions of internal_metadata 2025-10-10 13:32:14 -04:00
doria 3af2cfb568
Merge pull request #232 from plastic-labs/fix/schemas-not-models
fix: [hotfix] return schemas, not models
2025-10-09 17:27:08 -04:00
Benjamin McCormick 1eefc4af31 fix: [hotfix] return schemas, not models 2025-10-09 17:25:11 -04:00
Vineeth Voruganti a657f88951 chore: Changelog Updates 2025-10-09 17:13:41 -04:00
Vineeth Voruganti 79b1dde401 chore: Update Docs 2025-10-09 17:03:42 -04:00
Vineeth Voruganti d094ef8e10
feat: Release PR for v2.4.0 (#229) 2025-10-09 16:57:50 -04:00
doria 68acf38134
Misc: bug fixes, multi-db test harness, DELETE workspace (#230)
* 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

* feat: multi-db longmem harness

* Merge branch 'main' into ben/multi-db-harness

* [WIP] feat: add delete workspace endpoint, use in bench

* chore: move excess logging to debug

feat: improve metrics block logs to include more data

fix: make longmem db deletion configurable

* fix: [CRITICAL] use async genai client

* chore: update core sdk, fix tests to use aio as well

* fix: rollback prompt changes

* chore: update version

* fix: cleanup, coderabbit, wrap delete op in try/except

---------

Co-authored-by: Vineeth Voruganti <13438633+VVoruganti@users.noreply.github.com>
2025-10-09 16:53:41 -04:00
doria a3d98afdfe
Add updated get_context to SDKs (#231)
* 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: [WIP] realtime context object
note: must download custom stainless API for SDK

* 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: bug in get context
feat: get context updates in ts sdk

* feat: viz

* chore: update honcho-ai/core, remove WIPs

* fix: consistent ordering, comment nits, removed excess dreamer init

* fix: test int->str

* fix: Add validation and update async python client

* fix: add validation for last_user_message as well

* fix: add deeper validation to getContext in typescript sdk

* fix: let session context take a Message object for lastUserMessage to match python sdk behavior

* fix: use PeerIdSchema

* fix: allow peer object as argument

* fix: lastUserMessage min length 1

---------

Co-authored-by: Vineeth Voruganti <13438633+VVoruganti@users.noreply.github.com>
2025-10-09 15:44:21 -04:00
Rajat Ahuja f38230fd92
Integrate prometheus into Honcho (#226)
* feat: add prometheus to api routes

* fix: rm multiproc setup

* feat: add prometheus to  deriver

* fix: rm deriver-specific counters (for now)

* fix: dangling issues

* feat: skip metrics endpoint; track dialectic calls; track individual message creation

* fix: CR comments and use fastapi route template. also fix dialectic call

* fix: revert to existing request_id logic

* fix: rm session_name from dialectic call

* feat: add deriver task metric

* fix: rm unused get_namespace

* rm: namespace param

* feat: add MESSAGE_INPUT_TOKENS and DERIVER_TOKENS_PROCESSED counters

* fix: rm message input tokens

* fix: PR comments; docstrings; error handle metrics exposing endpoint

* chore: Code Rabbit

---------

Co-authored-by: Vineeth Voruganti <13438633+VVoruganti@users.noreply.github.com>
2025-10-08 13:53:48 -04:00
Rajat Ahuja 3d0f96d339
Add QueueItem cleanup logic (#228)
* feat: start queue cleanup

* feat: add Queue cleanup logic

* feat: mark messages as errored

* fix: rename + commit

* fix: rm apscheduler

* fix: add default for created_at in migration

* fix: consolidate error handling and only throw away first message of an errored batch

* fix: move processing to within queue manager

* fix: regen migration

* fix: CR comment

* fix: rename message -> queue_item when dealing with queue_item in the queue manager
2025-10-08 12:44:33 -04:00
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