Commit Graph

22 Commits

Author SHA1 Message Date
Ayush Paul 24bf8eeeb4
Typing (#137)
* type stuff

* add action

* bump python

* Refactor type annotations and update tracking decorators in agent and dependencies modules. Replace ai_track with track from src.utils.types, and enhance type hints for better clarity. Update pyproject.toml to allow untyped libraries.

* type everything basically

* fix migration typing

* type like crazy

* remove usless tests

* Update mocks in tests to use AsyncMock for dialectic_call and dialectic_stream, ensuring proper async behavior in test cases. Adjust mock return values for consistency and clarity.

* Update src/deriver/tom/single_prompt.py

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* Update src/deriver/tom/long_term.py

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* Enhance CLAUDE.md documentation with additional details on core concepts, API structure, and development commands. Update command syntax for running server and tests to use 'uv run' for consistency. Improve clarity in configuration and architectural decisions sections.

* Refactor type annotations in CRUD functions to accept more flexible filter types, changing from dict[str, str] to dict[str, Any]. Clean up logging in agent.py by removing unnecessary timing logs for user representation generation and query execution.

* Remove unused import of ai_track from long_term.py and single_prompt.py to clean up the codebase.

* pass tests

* update some stuff

* fix unused

* ruff

* make stuff work again

* Add LLM_GROQ_API_KEY to GitHub Actions and format tom_inference parameters

* test

* test

* Refactor LLM settings to use 'gemini' provider and update related model parameters; remove unused API keys from GitHub Actions workflow.

* Update LLM settings to use 'anthropic' provider and change model to 'claude-3-5-haiku-20241022'; maintain existing summarization provider.

* test

* llm provider stuff

* update

* revert

* Integrate client management for LLM providers across various modules; remove deprecated environment variable setup for API keys.

* only if key avaialble

* Refactor type hints and improve schema definitions for queue processing; remove unused imports and enhance function signatures for clarity.

* fix test

* model

* test

* Update LLM provider type annotations and enhance client management; replace Provider with Providers for better type handling in config and clients modules.

* Refactor LLM provider handling to default to "openai" for custom providers across multiple modules; update type annotations and improve client management for consistency.

---------

Co-authored-by: Dani Balcells <18307962+danibalcells@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2025-06-24 18:29:13 -04:00
doria d332321138
chore: update api routes to /v2 (#138)
* chore: update api routes to /v2

* chore: undo erroneous uv.lock update

* chore: update openapi.json
2025-06-24 10:45:55 -04:00
Vineeth Voruganti a6d52ab8c9
v1.1.0 Release Notes (#110)
* fix (docs): Update Changelog, versions, and mintlify

* chore: linter errors

* chore: Add uv.lock updates

* fix (util): Fix save summary metamessages

* chore (docs): Fix spelling mistake

* fix (db): Fix Query Tagging
2025-05-15 17:09:40 -04:00
Vineeth Voruganti 1b54b4703b
Make JSON body optional for list endpoints and Rename Metamessage Type to Label (#108)
* feat (storage): Remove strict requirement for body on list endpoints

* fix (storage): Rename metamessage_type to label with backwards compatability

* fix (schemas): Backwards compatability for metamessage_type and idiomatic schemas

* fix (docs): Update docs to reference label instead of metamessage type

* fix (storage): Rebase db migration and fix tests

* chore: alembic consistency
2025-05-14 16:19:30 -04:00
Vineeth Voruganti c21fbed8d0 chore: update docs copy 2025-04-10 16:29:28 -04:00
Vineeth Voruganti 179c18d279 chore: add link for waitlist 2025-04-10 16:26:03 -04:00
Vineeth Voruganti c7f5dc6e36 chore: note about production vs demo server 2025-04-10 14:16:43 -04:00
Vineeth Voruganti 8588d36eb4
v1.0.0 Release Candidate (#95)
* chore: Update versioning for release

* fix: remove db creation at start and sync migrations and models

* fix: Checkpoint changing metamessage schema

* chore: linter fixes

* fix: session cloning working

* Hybrid long-term memory (#92)

* Add TOM method switching

* Add system prompt and note on format

* Add persistence tweaks

* Specify format for each section of user representation

* Parse XML tags before saving representation metamessage

* Clean up

* Use Claude 3.5 Haiku and refine prompt

* Simplify message processing

* chore: update token limit on dialectic and model for deriver

* Add embedding-based long-term fact retrieval

* Fix bug preventing new documents from being created

* Use multiple queries + tweak prompt

* Fix collection name bug + add duplicate removal

* First implementation of on-demand user rep generation

* WIP debug on-demand user rep changes

* Fixed representations not being stored & deriver issue

* Some speed improvements

* Play with number of facts / queries

* WIP prompt caching for Claude

* WIP fix anthropic caching

* Anthropic prompt caching working but messages too short

* Use Cerebras for small inferences

* Make dialectic responses 1000 tokens max

* Make user representation generation model a constant

* Use llama 3.1 8b for query generation

* Update env template

* Add crud.get_or_create_protected_collection

* rabbit comments

* Fix linter issues

* Add Cerebras to stream router method

* Better handling of default-empty string args

* Change prints to debug logs

* Add error handling to TOM inference

* Handle missing/empty client in model responses

* Handle no messages case in get_chat_history

* Fix indent

* Add error handling to single_prompt methods

* Fix get_or_create_user_protected_collection

* Simplify openAI-compatible model client instantiation

* Remove health endpoint

* Remove LocalEmbeddingStore

* Change prints to debug logs

* Change sentry track

* Code review changes

* Add README to ToM module

* Switch to Groq

* Fix inconsistent openai compatible provider list in stream()

* Update env template to include Groq variables

* Add model_client tests

* fix: Fix unit tests

---------

Co-authored-by: Vineeth Voruganti <13438633+VVoruganti@users.noreply.github.com>

* add scoped API keys (#91)

* add AUTH_JWT_SECRET and ADMIN_KEY, use in security middleware (TODO granular keys)

* WIP: convert all API paths to use scoped keys

* add basic unit tests for API keys, ruff formatting

* MVP of route using JWT for payload

* add get_user_from_token

* add key table to postgres, use it to enable key revocation

* add key revocation pt 2 -- fix order of param checks

* finish convenience routes that assume params from JWT

* add tests for key API

* get_keys

* add secrets utility script, add key rotation, fill out tests

* add tiny cache as PoC

* nits, validations, etc

* only create keys table migration if necessary

* fix keys tests to always use auth

* tiny fix to make custom DATABASE_SCHEMA work

* review: add better docs, fix security issue with cache, clear db on rotation, and more

* remove rotation

* remove key database entirely

* Add `/all` path to get all apps (#94)

* add `/all` path for apps

* assert vector extension installed (need this for groudon)

* review

---------

Co-authored-by: Vineeth Voruganti <13438633+VVoruganti@users.noreply.github.com>

* add scoped API keys (#91)

* add AUTH_JWT_SECRET and ADMIN_KEY, use in security middleware (TODO granular keys)

* WIP: convert all API paths to use scoped keys

* add basic unit tests for API keys, ruff formatting

* MVP of route using JWT for payload

* add get_user_from_token

* add key table to postgres, use it to enable key revocation

* add key revocation pt 2 -- fix order of param checks

* finish convenience routes that assume params from JWT

* add tests for key API

* get_keys

* add secrets utility script, add key rotation, fill out tests

* add tiny cache as PoC

* nits, validations, etc

* only create keys table migration if necessary

* fix keys tests to always use auth

* tiny fix to make custom DATABASE_SCHEMA work

* review: add better docs, fix security issue with cache, clear db on rotation, and more

* remove rotation

* remove key database entirely

* Add `/all` path to get all apps (#94)

* add `/all` path for apps

* assert vector extension installed (need this for groudon)

* review

---------

Co-authored-by: Vineeth Voruganti <13438633+VVoruganti@users.noreply.github.com>

* chore: README and CHANGELOG updates

* add JWT expiry

* fix: Consolidate get methods with JWT token resolution

* chore: Add Annotation to Path, Query, and Body params

* chore: run ruff formatter

* chore: nits & add one exhaustive test of a query route

* fix: undo change to fly.toml

* fix: Langfuse tracing

* Consolidate Get Methods (#96)

* fix: Consolidate get methods with JWT token resolution

* chore: Add Annotation to Path, Query, and Body params

* chore: run ruff formatter

* chore: nits & add one exhaustive test of a query route

* fix: undo change to fly.toml

---------

Co-authored-by: dr-frmr <docterformer@protonmail.com>

* fix: dev-667 fix streaming endpoint

* fix: Anthropic Langfuse Tracing

* fix: add scripts folder to dockerfile

* fix: Remove redundant fields from pydantic schemas

* fix: Add deeper protection on reserved collection

* fix: Consolidate chat and stream methods

* docs: Update Mintlify API Reference and Changelog

* remove langchain guide, update architecture diagram

* honcho mcp server

* chore: Update .env template

* update discord, temporarily remove other guides

* Limit dialectic & deriver context usage with two-scale progressive summarization (#97)

* WIP two tiered summaries

* Move to process_item

* Save user rep metamessage even if no message_id

* Change number of messages per short summary

* Fix broken mock

* Remove prints

* chore: fix test

---------

Co-authored-by: Vineeth Voruganti <13438633+VVoruganti@users.noreply.github.com>

* feat: Add Gemini Support, link facts to message, use 8b for dialectic fact queries

* chore: Styling

* chore: coderabbit nitpicks

* keep dialectic guide

* Add streaming guide

* Remove TODO from dialectic guide

* Fix JS snippets that referred to honcho singleton as client

* Add App explanation to architecture page

---------

Co-authored-by: Dani Balcells <18307962+danibalcells@users.noreply.github.com>
Co-authored-by: doria <93405247+dr-frmr@users.noreply.github.com>
Co-authored-by: dr-frmr <docterformer@protonmail.com>
Co-authored-by: vintro <vince@plasticlabs.ai>
Co-authored-by: Daniel Balcells <dbalcells@gmail.com>
2025-04-10 13:59:40 -04:00
Vineeth Voruganti c2a50241cc
Fix Inconsistent Error Handling (#90)
* Add TOM method switching

* Add system prompt and note on format

* Specify format for each section of user representation

* Clean up

* Use Claude 3.5 Haiku and refine prompt

* chore: update token limit on dialectic and model for deriver

* chore: Remove healthcheck endpoint

* feat: Fix inconsistent error handling

* fix: remove SQL echo for performance and increase dialectic to 300 tokens on stream

* chore: Update CLAUDE.md

* fix: Update Dialectic 3.7 Sonnet and add to Changelog

* chore: Update Version Number

---------

Co-authored-by: Daniel Balcells <dbalcells@gmail.com>
2025-03-05 09:44:49 -05:00
Vineeth Voruganti e68aceaab2
Single prompt tom (#89)
* Add TOM method switching

* Add system prompt and note on format

* Add persistence tweaks

* Specify format for each section of user representation

* Parse XML tags before saving representation metamessage

* Clean up

* Use Claude 3.5 Haiku and refine prompt

* Simplify message processing

* chore: update token limit on dialectic and model for deriver

* chore: Update to Contributing Docs and .env template

* Contributing Docs

* chore: Add Deriver Template Variables

* chore: Remove healthcheck endpoint

* chore: Changelog updates

---------

Co-authored-by: Daniel Balcells <dbalcells@gmail.com>
2025-02-24 19:12:31 -05:00
Vineeth Voruganti d6194df824
Bulk Message Creation Endpoint (#82)
* fix: increase db pool limit and optimize crud requests

* fix: Sentry tracing and fly concurrency

* feat: Add alembic and indexes

* feat: Batch insert method

* fix: Pydantic Validation

* fix: Added Pydantic based API validation and Associated Test Cases

* chore: Update Changelog

* fix(docs): Update Docs with new API Method and OpenAPI Spec

* chore(ci): Add Environment Variable for Anthropic
2024-12-16 01:27:15 -05:00
Vineeth Voruganti 76085724e0
Release v0.0.14 (#78)
* fix(storage) Remove Prepared Statements to make compatible with Supavisor

* fix(deriver and dialectic) Use latest user level user_represenation

* fix(storage) Switch to text columns for best postgres practices

* fix(storage) Update docstrings and document query method

* chore(release) v0.0.14 Release State

* chore(release) CHANGELOG

* fix(deriver) Add more detailed profiling with sentry

* chore(release) CHANGELOG

* fix(deriver) increase retry limit on anthropic
2024-11-15 12:38:02 -05:00
Vineeth Voruganti 17ff3804ec
v0.0.13 Ability to Clone Sessions (#77)
* feat(storage) Add a route to clone sessions

* fix(storage) Add additional test case and fix case conventions for query parameters in clone method

* fix(storage) make case conventions consistent and documentation updates

* fix(docs) Update docs with newest routes

* fix(storage) Add commit to clone method
2024-11-07 12:10:09 -05:00
Vineeth Voruganti 1af4539d03
Honcho v0.0.12 Release (#74)
* fix(API): Basic API Versioning

* fix (docs) update docs with the latest API Specs

* chore: CHANGELOG

* chore: linting
2024-10-21 18:03:19 -04:00
Vineeth Voruganti 038a172737 Documentation edits made through Mintlify web editor 2024-10-21 16:58:21 -04:00
vintro 487ec43362
Anthropic Migration (#72)
* ready to test deriver

* prompts ready for testing

* compare entire list, don't loop through facts one by one

* parse xml, batch process ai query docs

* timing works

* session id is writing to csv now

* ignore timing logs

* infinite backrooms-inpsired prompts

* yousim/ib inspired prompts v0

* accept incoming changes on agent.py

* dialectic to sonnet for now

* remove timing, use py-spy

* cleanup from timing removal

* remove extra timing stuff

* Route for User LeveL Metamessages

* functional state

* chore: Clean up artifacts

* fix(deriver) update database calls for new schema and payload

* chore(docs) Update Honcho Version

---------

Co-authored-by: Vineeth Voruganti <13438633+VVoruganti@users.noreply.github.com>
2024-10-17 23:39:23 -04:00
Vineeth Voruganti 1e40778338
[0.0.11] Release (#64)
* fix(storage) Remove location_id

* feat(deriver) Deriver can process multiple sessions at once and uses rich for prints

* fix(route) collection update error handling

* chore(docs) update openapi and version numbers
2024-08-01 15:14:11 -04:00
Vineeth Voruganti 6c31fed873
docs: Update Mintlify Documentation (#60)
* Reworked Langchain guide and started on discord guide

* docs(mintlify): Update discord and simple memory guides
2024-05-23 09:51:56 -07:00
Vineeth Voruganti 6233b3fc0a
Update Changelog, pyproject, and mintlify docs (#58)
* Update Changelog, pyproject, and mintlify docs

* Update version shield in README
2024-05-16 12:27:00 -04:00
Vineeth Voruganti bc6afccf1a
v0.0.8 Documentation Updates (#55)
* Docker Compose Environment override fix

* Fixes DEV-301 and Fixes DEV-298

* Restructure Repository to focus on Server

* Fixes DEV-300

* Fixes DEV-298

* Fix Dead links in mintlify docs

* Fix directory path

* Add health check and database dependency to compose

* Mirascope deriver (#56)

* ready for testing

* delete prompts folder, mirascope colocation ftw

* Fix mirascope integration errors and streaming endpoint

---------

Co-authored-by: vintro <vince@plasticlabs.ai>

* Fix directory path

---------

Co-authored-by: vintro <vince@plasticlabs.ai>
2024-05-15 00:07:25 -04:00
vintro 62d397ab7a
docs proofs (#51)
* hyperlink to simple honcho primer

* fix sub header
2024-04-25 16:43:53 -07:00
Vineeth Voruganti 179ee31b25
[0.0.7] — 2024-04-01 (#50)
* 🧪 asyncify tests

*  asyncify client

* Basic Test for Page based pagination

* add sync buildstep and client

* add vscode DX

* Added Testing for generators and updated examples

* feat: example updates

* readme exists now

* Stylistic changes and generic message

* Metamessages with other refactoring - untested

* Work with unit tests

* Fix Examples

* MEME-78 Update Changelogs

* Docstrings to client

* 🧪 autogenerate sync tests

* test one

* add db type

* sync client

* add status badge

* add coverage

* add file

* give perms

* properly output coverage

* split test and coverage

* rename action

* 🧪 autogenerate sync tests (#16)

* Vector Support (#18)

* Scaffold for PGVector support

* Buggy crud with logic skeleton on api

* Crud logic and schema definition for pgvector

* Populate all routes and refactor to name Collection

* vince's progress

* AsyncCollection progress

* Local PGVector Docker Container

* client methods for sdk except document delete and update

* Vector Support Passing All Test Cases

* Docs Updates

---------

Co-authored-by: vintro <vince@plasticlabs.ai>

* Add reverse parameters for paginated routes

* Address dependabot

* Formatting

* initial commit on honcho dspy personas

* working, hit token limit and can't test dspy optimization

* initial version working, need to test optimization

* optimizers working, but appending any example

* ready for user object (tbomk)

* Revert "add test actions and coverage"

* Refactor to add User and App Tables

* User Object passing test cases

* Update examples

* DSPy Todo and documentation updates

* Add is_active filtering

* Add is_active filtering to the generator

* Fix update user metadata

* working, but weird compiler error

* fixed str error in optimizer

* ship

* sentry

* Open Telemetry

* optional logging with environment variables

* add actions again? (#29)

* add postgres

* add openai key

* readd coverage

* desyncify and add detailed coverage

* ⚙️ chore: update start script in VS Code to include poetry install --no-root before running uvicorn (#33)

* Refactored code but need to tweak asyncpg

* Working Async API using Psycopg3

* Update Workflow Connection URI

* Update Workflow Connection URI in coverage test as well

* Skeleton for Dialectic API

* Fixes DEV-217 URL Encoding

* Add Built-in Langchain Utility function

* Sphinx Docs MVP

* Metadata filtering for all fixes dev-261

* Basic Dialectic Endpoint fixes dev-253

* Working Fact Deriver

* 0.0.5 Docs and README updates

* Cloudflare Sphinx

* update example to use right function (#36)

* 🚀 feat: add support for running API using docker-compose with configurable environment variables and update docker-compose.yml for API and database services. (#34)

Co-authored-by: Vineeth Voruganti <13438633+VVoruganti@users.noreply.github.com>

* add interrogate

* routerify everything

* full docstring coverage

* remove unused imports and fix env issue

* Update docker-compose connection uri and remove auto-stop to deriver process

* Docstrings and langchain message converter in reverse

* Sentry, OTEL, langchain both directions, fly.toml for deriver

* Rename to deriver

* Fix favicon and remove metadata from schema

* 0.0.6 Notes

* Changelog edit

* Route bug fix

* Route bug fix again

* Langchain Utilities Refactor (#48)

* [0.0.6] - 3-21-2024 Bug Fixes (#47)

* 🧪 asyncify tests

*  asyncify client

* Basic Test for Page based pagination

* add sync buildstep and client

* add vscode DX

* Added Testing for generators and updated examples

* feat: example updates

* readme exists now

* Stylistic changes and generic message

* Metamessages with other refactoring - untested

* Work with unit tests

* Fix Examples

* MEME-78 Update Changelogs

* Docstrings to client

* 🧪 autogenerate sync tests

* test one

* add db type

* sync client

* add status badge

* add coverage

* add file

* give perms

* properly output coverage

* split test and coverage

* rename action

* 🧪 autogenerate sync tests (#16)

* Vector Support (#18)

* Scaffold for PGVector support

* Buggy crud with logic skeleton on api

* Crud logic and schema definition for pgvector

* Populate all routes and refactor to name Collection

* vince's progress

* AsyncCollection progress

* Local PGVector Docker Container

* client methods for sdk except document delete and update

* Vector Support Passing All Test Cases

* Docs Updates

---------

Co-authored-by: vintro <vince@plasticlabs.ai>

* Add reverse parameters for paginated routes

* Address dependabot

* Formatting

* initial commit on honcho dspy personas

* working, hit token limit and can't test dspy optimization

* initial version working, need to test optimization

* optimizers working, but appending any example

* ready for user object (tbomk)

* Revert "add test actions and coverage"

* Refactor to add User and App Tables

* User Object passing test cases

* Update examples

* DSPy Todo and documentation updates

* Add is_active filtering

* Add is_active filtering to the generator

* Fix update user metadata

* working, but weird compiler error

* fixed str error in optimizer

* ship

* sentry

* Open Telemetry

* optional logging with environment variables

* add actions again? (#29)

* add postgres

* add openai key

* readd coverage

* desyncify and add detailed coverage

* ⚙️ chore: update start script in VS Code to include poetry install --no-root before running uvicorn (#33)

* Refactored code but need to tweak asyncpg

* Working Async API using Psycopg3

* Update Workflow Connection URI

* Update Workflow Connection URI in coverage test as well

* Skeleton for Dialectic API

* Fixes DEV-217 URL Encoding

* Add Built-in Langchain Utility function

* Sphinx Docs MVP

* Metadata filtering for all fixes dev-261

* Basic Dialectic Endpoint fixes dev-253

* Working Fact Deriver

* 0.0.5 Docs and README updates

* Cloudflare Sphinx

* update example to use right function (#36)

* 🚀 feat: add support for running API using docker-compose with configurable environment variables and update docker-compose.yml for API and database services. (#34)

Co-authored-by: Vineeth Voruganti <13438633+VVoruganti@users.noreply.github.com>

* add interrogate

* routerify everything

* full docstring coverage

* remove unused imports and fix env issue

* Update docker-compose connection uri and remove auto-stop to deriver process

* Docstrings and langchain message converter in reverse

* Sentry, OTEL, langchain both directions, fly.toml for deriver

* Rename to deriver

* Fix favicon and remove metadata from schema

* 0.0.6 Notes

* Changelog edit

* Route bug fix

* Route bug fix again

---------

Co-authored-by: hyusap <paulayush@gmail.com>
Co-authored-by: vintro <vince@plasticlabs.ai>
Co-authored-by: vintro <77507980+vintrocode@users.noreply.github.com>

* Port Docs

* Update Examples with new langchain utilites

* Rename decorator

* Synchronize

* Fix API SessionLocal

---------

Co-authored-by: hyusap <paulayush@gmail.com>
Co-authored-by: vintro <vince@plasticlabs.ai>
Co-authored-by: vintro <77507980+vintrocode@users.noreply.github.com>

* Basic Auth Header validation

* Basic Auth Service

* Deriver reliability and default auth revoke

* .env.template

* 0.0.7 Updates

---------

Co-authored-by: hyusap <paulayush@gmail.com>
Co-authored-by: vintro <vince@plasticlabs.ai>
Co-authored-by: vintro <77507980+vintrocode@users.noreply.github.com>
2024-04-01 10:58:42 -07:00