Skip to content

feat(integrations): LangChain + CrewAI 도구 (#230 후속) - #2

Merged
bluelucifer merged 3 commits into
mainfrom
feat/framework-integrations
Jun 22, 2026
Merged

feat(integrations): LangChain + CrewAI 도구 (#230 후속)#2
bluelucifer merged 3 commits into
mainfrom
feat/framework-integrations

Conversation

@bluelucifer

Copy link
Copy Markdown
Contributor

개요

LoftBox Python SDK 를 LLM 에이전트 프레임워크(LangChain / CrewAI)에 연결하는 통합을 추가합니다. 두 프레임워크 모두 선택 의존성으로, 미설치 시에도 base SDK 와 import loftbox 는 정상 동작합니다(guarded import).

노출 도구 (5종)

도구 SDK 호출
send_email messages.send(mailbox_id, to, subject, body_text=, body_html=, cc=, in_reply_to=)
check_inbox mailboxes.list_inbox(mailbox_id, limit=, cursor=)
list_messages messages.list(mailbox_id=, direction=, status=, q=, limit=, cursor=)
approve_message messages.approve(message_id, reason)
reject_message messages.reject(message_id, reason)

변경 파일

  • loftbox/integrations/__init__.py — guarded import 안내
  • loftbox/integrations/_common.py — 두 어댑터가 공유하는 pydantic args_schema + 실행 로직
  • loftbox/integrations/langchain.pyLoftBoxToolkit(client).get_tools() (StructuredTool)
  • loftbox/integrations/crewai.pyget_crewai_tools(client) (crewai.tools.BaseTool)
  • pyproject.toml — optional-deps langchain/crewai 재추가, dev 에 langchain-core, 버전 0.1.0 → 0.2.0
  • examples/langchain_agent.py, examples/crewai_agent.py — 최소 예제
  • tests/test_integrations.py — Mock client 로 도구 생성·인자 전달·import-guard 검증
  • README.md — LangChain/CrewAI 섹션

동작 보장

  • 프레임워크 미설치 시 서브모듈 import 가 친절한 ImportError("pip install loftbox[langchain]") 를 던짐 (테스트로 검증).
  • python -c "import loftbox; loftbox.LoftBox(api_key='x')" 가 프레임워크 없이도 동작.

품질 게이트

pip install -e ".[dev]" (langchain-core 1.4.8 설치, crewai 미설치) 환경:

  • ruff check loftbox — 통과
  • mypy loftbox — 통과 (8 source files)
  • pytest -q — 20 passed, 1 skipped (crewai 테스트는 의존성 미설치로 importorskip skip)

🤖 Generated with Claude Code

LoftBox SDK 를 LLM 에이전트 프레임워크에 연결하는 통합 추가.

- loftbox/integrations/: guarded import (프레임워크 미설치 시 base SDK 무손상)
- langchain.py: StructuredTool 기반 LoftBoxToolkit(client).get_tools()
- crewai.py: crewai.tools.BaseTool 기반 get_crewai_tools(client)
- 도구 5종: send_email, check_inbox, list_messages, approve_message, reject_message
- _common.py: 두 어댑터가 공유하는 pydantic args_schema + 실행 로직
- pyproject: optional-deps langchain/crewai 추가, 버전 0.1.0 -> 0.2.0
- examples + tests + README 통합 섹션

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jun 22, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@bluelucifer, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 58 minutes and 4 seconds. Learn how PR review limits work.

Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file).

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits.

🚦 How do rate limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan refill rate.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, the refill rate gradually slows as usage increases. The highest same-day bursts are limited more strictly.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 901389db-1861-474a-9fd1-f29b9aaf5c3f

📥 Commits

Reviewing files that changed from the base of the PR and between 19918dd and a292357.

📒 Files selected for processing (12)
  • .gitignore
  • README.md
  • examples/crewai_agent.py
  • examples/langchain_agent.py
  • loftbox/__init__.py
  • loftbox/client.py
  • loftbox/integrations/__init__.py
  • loftbox/integrations/_common.py
  • loftbox/integrations/crewai.py
  • loftbox/integrations/langchain.py
  • pyproject.toml
  • tests/test_integrations.py
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/framework-integrations

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

bluelucifer and others added 2 commits June 22, 2026 09:48
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@bluelucifer
bluelucifer merged commit be314bd into main Jun 22, 2026
3 checks passed
@bluelucifer
bluelucifer deleted the feat/framework-integrations branch June 22, 2026 09:50
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.

1 participant