@leettools/core
v3.0.0
Published
Client-safe LeetTools domain contracts and request preparation.
Downloads
432
Readme
@leettools/core
Standalone client-side capabilities configured with explicit inputs. It depends only on
@leettools/common and does not know about the LeetTools backend or the User, Org,
and KnowledgeBase context.
LLM routing
import { LlmApiCaller } from '@leettools/core/llm'
const llm = new LlmApiCaller([{
name: 'primary',
protocol: 'openai-compatible',
apiKey: process.env.LLM_API_KEY ?? '',
baseUrl: 'https://api.openai.com/v1',
defaultModel: 'gpt-5-mini',
}])
const response = await llm.complete({
messages: [{ role: 'user', content: 'Summarize this document.' }],
})Built-in protocols are openai-compatible, anthropic, and gemini. Additional
provider protocols can be added with registerAdapter without changing callers.
MCP
@leettools/core/mcp provides MCP initialization, tool discovery, invocation, local
tool registration, and Streamable HTTP transport.
Web search, scraping, and crawling live in @leettools/web.
