Code
Skill Configuration
Createskills/typescript-langchain-skill/skill.yaml:
How It Works
TypeScript SDK Integration@bindu/sdk: TypeScript Bindu SDK for agent development- Automatic microservice generation with DID and auth
- gRPC communication with Bindu Python core
- A2A protocol compliance handled by SDK
ChatOpenAI: LangChain’s OpenAI integration- Message format conversion between Bindu and LangChain
- Async/await pattern for response handling
- Flexible content type handling
ChatMessage[]: Bindu message format with role and content- Role mapping (user/assistant/system) for LangChain compatibility
- Content extraction and type checking
- Response formatting for Bindu protocol
- Environment-based API key management
- Standard Bindu deployment configuration
- Skills and capabilities declaration
- CORS origins for frontend integration
Dependencies
Environment Setup
Create.env file:
Run
- “Research the latest developments in quantum computing and provide a summary”
- “What are the main benefits of using LangChain with TypeScript?”
- “How do I integrate LangChain with OpenAI in a TypeScript application?”
Example API Calls
Message Send Request
Message Send Request
Task get Request
Task get Request