wesichain-core

Provide Rust abstractions for composing LLM chains with streaming and typed errors.

Updated Feb 1, 2026
One-click install
npx skills add https://github.com/wesichain/wesichain --skill wesichain-core
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: wesichain-core
Source: https://github.com/wesichain/wesichain/tree/main/.claude/skills/wesichain-core
Command: npx skills add https://github.com/wesichain/wesichain --skill wesichain-core

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill provides the foundational building blocks for creating robust, composable, and type-safe LLM applications in Rust, enabling developers to build complex agentic workflows with ease.

Core Features & Use Cases

  • Runnable Trait: Define and compose modular LLM components.
  • Chain Composition: Link components together using .then() for LCEL-style pipelines.
  • Streaming & Error Handling: Supports streaming output and provides a unified WesichainError for robust error management.
  • Use Case: Develop a ReAct agent that first retrieves information from a tool, then formats it using a prompt template, and finally summarizes it with an LLM, all within a single, type-safe chain.

Quick Start

Use the wesichain-core skill to create a chain by composing a prompt template with a dummy LLM and a simple parser.

Frequently Asked Questions about wesichain-core

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I build composable LLM pipelines in Rust?

To build composable LLM pipelines in Rust, you implement the Runnable trait for modular components and link them together using the `.then()` method via RunnableExt. This enables LCEL-style chaining for complex agentic workflows.

What is LCEL-style chaining and how does it work for LLM applications?

LCEL-style chaining is a pipeline pattern for LLM applications that links modular components sequentially. In Rust, it works by implementing the Runnable trait and using RunnableExt to compose type-safe pipelines with `.then()`.

Can I stream output and handle errors in Rust LLM chains?

Yes, you can stream output and handle errors in Rust LLM chains. The framework supports streaming output and provides a unified WesichainError type for robust, type-safe error management across composed components.

How do I create a ReAct agent workflow with type safety in Rust?

You create a ReAct agent in Rust by composing modular components into a single type-safe chain. Implement the Runnable trait for tool retrieval, prompt formatting, and LLM summarization, then link them using RunnableExt.

Do I need external dependencies to build LLM chains with this approach?

No external dependencies are required to use these core abstractions. The framework provides the foundational Runnable trait and RunnableExt internally, allowing you to build robust LLM applications without external library dependencies.

What is the best way to manage type safety in Rust LLM applications?

The best way to manage type safety in Rust LLM applications is using core abstractions like the Runnable trait. This ensures modular components compose safely, while a unified WesichainError handles errors robustly across complex chains.