agent

    MoonBit version of LangChain core library — type-safe, composable, embeddable AI Agent framework. Depends on mizchi/llm for LLM clients and colmugx/mcp for MCP tool calling.

    ai
    agent
    llm
    langchain
    mcp
    react
    tool-calling
    Download zip
    Author
    Version
    0.1.0
    License
    Apache-2.0
    Last updated
    4 months ago
    Downloads
    103

    #weopqrst/agent

    version

    let version : String

    moon-agent: MoonBit version of LangChain core library.

    A type-safe, composable, embeddable AI Agent framework built on top of mizchi/llm (LLM clients) and colmugx/mcp (MCP tool calling).

    This root package provides only metadata. Actual functionality lives in sub-packages:

    • weopqrst/agent/core — Runnable[I, O] trait, the unified composable interface
    • weopqrst/agent/prompts — PromptTemplate, ChatPromptTemplate
    • weopqrst/agent/parsers — OutputParser, JsonOutputParser
    • weopqrst/agent/memory — Memory, BufferMemory, BufferWindowMemory
    • weopqrst/agent/tools — Tool trait, bridge to mizchi/llm's ToolRegistry
    • weopqrst/agent/chains — LLMChain
    • weopqrst/agent/agents — AgentExecutor

    Quick start

    let prompt = @prompts.ChatPromptTemplate::new()
    |> @prompts.ChatPromptTemplate::with_system("You are a helpful assistant.")
    |> @prompts.ChatPromptTemplate::with_user("What is {topic}?")

    let chain = @chains.LLMChain::new(model.boxed(), prompt)

    let result = chain.invoke({ "topic": "MoonBit" })

    License

    Apache-2.0

    Source Files