feat(sdk): CrewAI tool adapter (Engram as agent memory)#31
Open
jakerated-r wants to merge 3 commits into
Open
Conversation
|
@jakerated-r is attempting to deploy a commit to the praise's projects Team on Vercel. A member of the Team first needs to authorize it. |
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.
What
Adds a CrewAI tool adapter for Engram, completing the agent-framework set the
LangChain (
engram/sdk/langchain.py) and LlamaIndex (engram/sdk/llama_index.py)adapters already cover. CONTRIBUTING.md lists "SDK examples for LangChain, LlamaIndex, agents"
as a high-impact area, and ROADMAP's good-first-issues call for "an agent example (LangChain, CrewAI, LlamaIndex)." — CrewAI was the missing one.
Changes (scoped to one reviewable PR)
engram/sdk/crewai.py—EngramStoreToolandEngramSearchTool(CrewAIBaseTools) plus anengram_memory_tools()factory. Lets a CrewAI agent use an Engram miner as durable, semantic long-term memory (store facts in one task, recall them by meaning in another). Wraps the existingEngramClient(ingest/query) — no protocol changes.examples/crewai_agent_memory.py— runnable example wiring the tools into a CrewAIAgent/Crew, with a--tools-onlypath that needs no LLM/API key.scripts/test_crewai_sdk.py— offline-safe test in the style ofscripts/test_sdk.py.Design notes
ImportErroris raised only at tool construction ifcrewaiis missing._runreturns an error string (what a CrewAI agent expects) rather than raising — so a missing miner doesn't crash a crew.Verification
python scripts/test_crewai_sdk.py— passes both with CrewAI installed (11/11: construction, names,args_schema, offline degradation) and without it (3/3: import + gracefulImportError).BaseToolstand-in (CrewAI'sBaseToolis a pydantic model).EngramClient.ingest/querymethods the LangChain adapter uses and thatscripts/test_sdk.pyalready covers live; happy to add a live integration check or adjust to match acrewai-toolsimport path you prefer.Keeps scope small per CONTRIBUTING; no unrelated formatting or refactors.