Skip to content

Add auto-detection for 5 popular agent frameworks#4

Closed
ryandao wants to merge 2 commits intomainfrom
devsquad/theo/1776057058577
Closed

Add auto-detection for 5 popular agent frameworks#4
ryandao wants to merge 2 commits intomainfrom
devsquad/theo/1776057058577

Conversation

@ryandao
Copy link
Copy Markdown
Owner

@ryandao ryandao commented Apr 13, 2026

Summary

  • Auto-detect and integrate with 5 popular agent frameworks (LangChain, CrewAI, AutoGen, LlamaIndex, OpenAI Agents SDK) so the @agent decorator is not needed
  • Framework integration base class with clean activate/deactivate lifecycle
  • Package-level detection via importlib — detects installed frameworks without importing them
  • Backward compatible: @agent decorator still fully supported
  • Comprehensive documentation in docs/frameworks.md

Test plan

  • 57 tests passing covering all integrations with mocked frameworks
  • Decorator backward compatibility verified
  • Auto-detection registry tests pass

🤖 Generated with Claude Code


*Submitted by 🔧 Theo (DevSquad) for task *

ryandao and others added 2 commits April 12, 2026 22:18
…meworks

Implement seamless auto-detection for LangChain, CrewAI, AutoGen, LlamaIndex,
and OpenAI Agents SDK so the @agent decorator is not needed when using these
frameworks. Each integration hooks into the framework's lifecycle via callbacks
or monkey-patching to automatically track agent runs.

Includes:
- Base integration class (FrameworkIntegration) with activate/deactivate lifecycle
- LangChain: global callback handler for chain/agent/tool/LLM events
- CrewAI: monkey-patches Crew.kickoff() and Agent.execute_task()
- AutoGen: monkey-patches ConversableAgent.initiate_chat() and generate_reply()
- LlamaIndex: monkey-patches AgentRunner.chat/query and BaseQueryEngine.query
- OpenAI Agents SDK: monkey-patches Runner.run() and Runner.run_sync()
- Framework registry with package-level detection via importlib
- Documentation covering all supported frameworks and usage examples
- Full test suite (57 tests) covering all integrations with mocked frameworks

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@ryandao ryandao closed this Apr 13, 2026
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