Remote Inference & Tool Execution
Quick Access: Automation Sessions | Templates | Remote Servers
LangMart provides secure remote environments for executing LLM inference with MCP (Model Context Protocol) tool support. This enables AI models to interact with external tools like file systems, web browsers, and code execution in isolated, secure containers.
What You Get
Remote LLM Inference
Execute AI model requests in a secure, managed environment:
- Any Model: Use models from OpenAI, Anthropic, Google, Groq, and 20+ providers
- Streaming Support: Real-time response streaming
- Context Management: Maintain conversation state across requests
- Unified API: Same OpenAI-compatible API regardless of provider
MCP Tool Execution
AI models can invoke tools in a sandboxed environment:
| Tool Category | Capabilities |
|---|---|
| File Operations | Read, write, and manage files in isolated workspace |
| Web Browsing | Search the web, fetch pages, extract content |
| Code Execution | Run Python, JavaScript, and shell commands safely |
| System Tools | Access system information, environment details |
Secure Execution Environment
Your sessions run in isolated Type 3 Gateways:
- Containerized: Each session runs in its own Docker container
- Isolated: No access to host system or other users' data
- Monitored: All tool executions are logged for transparency
- Temporary: Workspace is cleaned after session ends
How It Works
┌─────────────────────────────────────────────────────────────┐
│ Your Application │
└─────────────────────────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────┐
│ LangMart Platform │
│ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ │
│ │ Type 1/0 │───▶│ Type 3 │───▶│ AI Model │ │
│ │ Gateway │ │ Gateway │ │ (Provider) │ │
│ │ (API) │ │ (Tools) │ │ │ │
│ └─────────────┘ └─────────────┘ └─────────────┘ │
│ │ │
│ ▼ │
│ ┌─────────────┐ │
│ │ Secure │ │
│ │ Container │ │
│ │ (Tools Run) │ │
│ └─────────────┘ │
└─────────────────────────────────────────────────────────────┘- You send a request to the LangMart API
- Request is routed to an available Type 3 Gateway
- AI model processes your request and decides if tools are needed
- Tools execute in a secure container if called
- Results return through the same path
Getting Started
Using the Chat Interface
The easiest way to use remote inference with tools:
- Go to Chat in the dashboard
- Select Remote Chat mode (toggle in the top bar)
- Choose a model with tool support
- Start chatting - the AI can now use tools automatically
Using the API
Make requests with tool support enabled:
curl -X POST https://api.langmart.ai/v1/chat/completions \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "anthropic/claude-sonnet-4-20250514",
"messages": [
{"role": "user", "content": "Search for the latest news about AI"}
],
"tools": "auto"
}'Session Management
Sessions maintain state across multiple requests:
# Create a session
POST /api/automation/sessions
{
"name": "My Research Session",
"model": "anthropic/claude-sonnet-4-20250514",
"gateway_id": "optional-specific-gateway"
}
# Send messages to the session
POST /api/automation/sessions/{session_id}/messages
{
"content": "Analyze the codebase in /workspace"
}Available Tools
When using remote inference, models can access these MCP tools:
Registry Tools
list_models- Browse available AI modelslist_providers- View supported providersget_model_info- Get detailed model information
Web Tools
web_search- Search the internetfetch_page- Retrieve web page contentextract_content- Parse and extract structured data
File Tools
read_file- Read file contentswrite_file- Create or update fileslist_directory- Browse directories
Code Execution
run_python- Execute Python coderun_javascript- Execute JavaScriptrun_shell- Run shell commands
Use Cases
| Use Case | Example |
|---|---|
| Research | "Search for recent papers on transformer architectures and summarize them" |
| Code Analysis | "Analyze the Python files in /workspace and suggest improvements" |
| Data Processing | "Read the CSV file and generate a summary report" |
| Content Creation | "Research competitor products and create a comparison document" |
What's Next: Agent Workflows
This remote inference foundation enables advanced Agent Workflow Automation - where you can orchestrate complex multi-step tasks with:
- Chained tool executions
- Conditional logic and branching
- Scheduled and triggered workflows
- Multi-agent collaboration
Agent workflow documentation will be available in our Advanced Documentation section (coming soon).
Best Practices
Security
- Use sessions for sensitive work (isolated per session)
- Review tool outputs before using in production
- Set appropriate tool restrictions for your use case
Performance
- Reuse sessions for related tasks (maintains context)
- Choose models appropriate for tool use (Claude, GPT-4 recommended)
- Monitor session status for long-running tasks
Cost Management
- Tool executions may add to inference costs (additional tokens)
- Use streaming to monitor response progress
- Set up cost alerts for automation workloads
Quick Access Links
| Feature | Direct Link |
|---|---|
| Automation Sessions | https://langmart.ai/automation |
| Templates | https://langmart.ai/automation-templates |
| Scripts | https://langmart.ai/automation-scripts |
| Remote Servers | https://langmart.ai/remote-servers |
| SSH Keys | https://langmart.ai/ssh-keys |
| Gateways | https://langmart.ai/gateways |
| Remote Chat | https://langmart.ai/chat |
Related Topics
- Inference Sessions - Detailed session management
- Templates - Pre-configured session templates
- Chat Guide - Using tools in chat interface