TL;DR
- Backend: implement tool, register in the Tool Registry.
- Frontend: add the tool key and payload type to the Tool Registry, and (optionally) a renderer.
- If the tool needs API keys, add envs in
settings.py
and use a lazy provider.
Backend (LangChain)
- Implement the tool
- Register in the Tool Registry
- If it needs env-backed clients
Frontend (types + optional renderer)
- Add the tool and payload type to the registry
- (Optional) Add a UI renderer
- Backend registry:
backend/app/langchain/tools/core/registry.py
- Frontend tool registry:
frontend/src/config/registries/toolRegistry.ts
- Unified renderers:
frontend/src/features/chat/components/bubbles/bot/TextBubble.tsx
- Lazy providers:
backend/app/core/lazy_loader.py