feat: move from mozilla any-agent to langchain deepagents (backport #44)#49
Conversation
(cherry picked from commit e7a2dbd)
Concurrent ask_alyfAgentRunner constructions in one process could both observe the registered flag as false and call register_harness_profile twice. Registration merges on duplicate keys, so an identical double register was functionally safe but logged a warning and did a redundant merge. Guard the check-then-set with a threading.Lock.
The source-code-analyzer subagent is declared with tools: [], which looks like it receives no tools at all. Deep Agents always injects FilesystemMiddleware (and thus the read-only VFS tools ls, read_file, glob, grep) into every subagent stack regardless of the tools field; the tools list only controls extra tools inherited from the parent. Document this so the empty list is not mistaken for a bug.
agent.py and history.py import from langchain and langchain_core, and langgraph underpins the deepagents runtime, but all three arrived only as transitive dependencies of deepagents and langchain-openai. A downstream resolver could pull a compatible-but-different version and break the imports with no install-time signal. Pin them to the ranges required by the pinned deepagents/langchain-openai versions.
|
Cherry-picked the follow-up fixes from the develop PR onto this backport branch: harness profile registration lock, subagent VFS tooling clarification, and explicit langchain/langchain-core/langgraph dependency declarations. |
Drop the five ask_alyfToolset wrappers search_code, read_code_file, ls, find, and grep. Code search now runs through the source-code-analyzer subagent against the /source/ virtual mount, so these wrappers were no longer registered as agent tools and had no callers. The underlying tools.* functions remain, still used by tests and the VFS backend.
|
Cherry-picked a follow-up cleanup onto this backport branch: removed the five orphaned code-search toolset wrapper methods (search_code, read_code_file, ls, find, grep) that were no longer registered as agent tools after the move to the source-code-analyzer subagent. The underlying tools.* functions remain. |
|
Note: the cleanup commit on this backport branch is also being PR'd against develop separately (the develop PR for the prior fixes merged before the cleanup could be added to it), so develop and the backports stay in sync. |
This is an automatic backport of pull request #44 done by [Mergify](https://mergify.com).