Langchain Service Overview
The MOOD MNKY Langchain service provides a comprehensive set of APIs for building AI-powered applications with language models. This service enables you to create sophisticated AI workflows, manage language model interactions, process documents, and build intelligent applications with minimal development effort.Key Features
- Language Model Integration - Interact with various language models through a unified API
- Chain Management - Create, configure, and run complex reasoning chains
- Memory Systems - Implement conversation history and contextual memory
- Document Processing - Upload, process, and retrieve documents using vector embeddings
- Agents - Deploy autonomous agents that can use tools and make decisions
- Prompt Management - Create, iterate on, and optimize prompts for different use cases
Getting Started
To start using the Langchain service, you’ll need:- API Credentials - Obtain your API key from the Developer Portal
- Service Endpoint - Connect to the right environment:
- Development:
http://localhost:8000 - Production:
https://langchain.moodmnky.com
- Development:
Base URL
All API endpoints are relative to the base URL:Authentication
All requests require an API key passed in thex-api-key header:
Service Status
Check the current status of the Langchain service:Core Concepts
Chains
Chains are sequences of operations that combine language models with other components like memory, document retrieval, or tool usage. They enable you to create complex workflows while maintaining a simple interface. Learn more about Chains →Memory
Memory systems allow your applications to maintain conversation history, remember user preferences, and provide contextual awareness across interactions. Learn more about Memory →Documents
The document processing system lets you upload, process, and retrieve documents using vector embeddings, enabling knowledge-based applications and retrieval-augmented generation. Learn more about Documents →Common Workflows
Build a Conversational AI
Build a Document Q&A System
Integration with Other Services
The Langchain service integrates seamlessly with other MOOD MNKY services:- Ollama Service - Used for language model inference
- Flowise Service - For visual workflow creation and deployment
- n8n Service - For automation and integration with external systems
Best Practices
-
Use the Right Chain Type
- Choose the appropriate chain type for your use case
- Use conversation chains for chat applications
- Use retrieval QA chains for knowledge-based applications
- Use sequential chains for multi-step workflows
-
Optimize Prompts
- Create clear, specific prompt templates
- Include appropriate context and instructions
- Test and iterate on prompts for best results
-
Manage Memory Effectively
- Choose the right memory type for your application
- Limit conversation history length to manage tokens
- Consider using summarization memory for long conversations
-
Document Processing
- Use appropriate chunk sizes for your content
- Include comprehensive metadata for better retrieval
- Consider document structure when designing your system
Rate Limits
| Plan | Requests per Minute | Requests per Day | Tokens per Request |
|---|---|---|---|
| Development | 60 | 10,000 | 16,000 |
| Basic | 120 | 50,000 | 32,000 |
| Professional | 300 | 250,000 | 64,000 |
| Enterprise | Custom | Custom | Custom |
429 Too Many Requests response.