Skip to content

feat(integrations): Hermes Agent + CrewAI integrations — v0.6.0#29

Merged
orvi2014 merged 1 commit into
mainfrom
feat/hermes-crewai-integrations
May 17, 2026
Merged

feat(integrations): Hermes Agent + CrewAI integrations — v0.6.0#29
orvi2014 merged 1 commit into
mainfrom
feat/hermes-crewai-integrations

Conversation

@orvi2014

Copy link
Copy Markdown
Owner

Summary

  • Hermes Agent integration (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.
  • CrewAI integration (baar/integrations/crewai.py) — two integration styles: BaarCrewLLM (subclasses crewai.LLM, routes call()/acall() through BAARRouter with full routing + kill-switch) and BaarStepCallback (drop-in step_callback= for existing crews requiring zero LLM refactoring).
  • Version bump 0.5.1 → 0.6.0 — minor bump for two new framework integrations.
  • Coverage: both integration files at 100% (57 tests across two new test files). Full suite: 520 passed.
  • pyproject.toml: added crewai = ["crewai>=0.80.0"] optional extra alongside existing langchain and vercel extras.

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 — verify hermes.py and crewai.py both show 100%
  • pytest -q — full suite 520 passed, 0 failures

🤖 Generated with Claude Code

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-commenter

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@orvi2014 orvi2014 merged commit c892b69 into main May 17, 2026
3 checks passed
@orvi2014 orvi2014 deleted the feat/hermes-crewai-integrations branch May 17, 2026 18:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants