feat(integrations): Hermes Agent + CrewAI integrations — v0.6.0#29
Merged
Conversation
Hermes Agent (baar/integrations/hermes.py): - BaarHermesProxy: runs baar as a local OpenAI-compatible HTTP proxy - BaarHermesSession: context manager that wires a budget-capped Hermes session via a temp HERMES_HOME, leaving the user's real ~/.hermes untouched - setup_baar_provider: one-time permanent Hermes config writer - 100% test coverage (tests/test_hermes_integration.py, 27 tests) CrewAI (baar/integrations/crewai.py): - BaarCrewLLM: subclasses crewai.LLM; routes call()/acall() through BAARRouter for semantic routing + pre-flight budget kill-switch on every agent turn - BaarStepCallback: step_callback= drop-in for existing crews; checks budget between steps without touching the crew's LLM configuration - 100% test coverage (tests/test_crewai_integration.py, 30 tests) Also: router.py race-condition guards marked pragma no cover; coverage gap tests added to test_router.py and test_baar_router_coverage.py. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
baar/integrations/hermes.py) — wires baar-core as a local OpenAI-compatible proxy that Hermes Agent routes every LLM call through, enforcing a hard budget cap pre-flight on every turn. Three public symbols:BaarHermesProxy,BaarHermesSession,setup_baar_provider.baar/integrations/crewai.py) — two integration styles:BaarCrewLLM(subclassescrewai.LLM, routescall()/acall()throughBAARRouterwith full routing + kill-switch) andBaarStepCallback(drop-instep_callback=for existing crews requiring zero LLM refactoring).0.5.1 → 0.6.0— minor bump for two new framework integrations.crewai = ["crewai>=0.80.0"]optional extra alongside existinglangchainandvercelextras.Test plan
pytest tests/test_hermes_integration.py -v— 27 tests, all mocked (no Hermes CLI or live LLM needed)pytest tests/test_crewai_integration.py -v— 30 tests, all mocked (no crewai install needed)pytest --cov=baar --cov-report=term-missing— verifyhermes.pyandcrewai.pyboth show 100%pytest -q— full suite 520 passed, 0 failures🤖 Generated with Claude Code