Wesichain

Architecture Overview

Wesichain is a Rust-native framework for LLM applications with a modular workspace layout.

:::note[v0.3 highlights] v0.3.0 ships 9 new crates: wesichain-anthropic, wesichain-tools, wesichain-mcp, wesichain-session, wesichain-server, wesichain-cli, wesichain-langfuse, wesichain-otel, and wesichain-prompthub. See Installation for the full dependency guide. :::

Design Principles

  • Modular-by-default: choose only the crates you need.
  • Type-safe state: graph state is explicit via StateSchema.
  • Async + streaming first: built for production runtimes.
  • Composable orchestration: combine chains, tools, and stateful graphs.

Layers

Foundation

  • wesichain-core: base traits (Runnable, Tool, state contracts, errors)
  • wesichain-prompt: prompt template utilities
  • wesichain-llm: provider abstraction layer (OpenAI, Ollama, Groq, Together AI, Azure, Mistral, DeepSeek, Google)

Providers

  • wesichain-llm: OpenAI, Ollama, Groq, Together AI, Azure, Mistral, DeepSeek, Google
  • wesichain-anthropic: Anthropic Claude with extended thinking and streaming (new in v0.3)

Orchestration

  • wesichain-graph: graph runtime, conditional routing, interrupts, checkpoint-aware execution
  • wesichain-agent: FSM-oriented runtime track for v0.3 evented agents
  • wesichain-memory: memory primitives (buffer/window/summary)

Agentic Tooling (new in v0.3)

  • wesichain-tools: coding tools (fs, bash, git, glob, grep, patch) with PathGuard sandboxing
  • wesichain-mcp: MCP client with stdio + HTTP/SSE transport
  • wesichain-session: session persistence and cost/token tracking

Server & CLI (new in v0.3)

  • wesichain-server: Axum HTTP server with Bearer auth and SSE streaming
  • wesichain-cli: wesichain new / wesichain run interactive REPL

Retrieval + RAG

  • wesichain-retrieval, wesichain-embeddings, wesichain-rag
  • vector-store integrations: wesichain-chroma, wesichain-pinecone, wesichain-qdrant, wesichain-weaviate

Persistence + Observability

  • checkpoints: wesichain-checkpoint-sql, wesichain-checkpoint-sqlite, wesichain-checkpoint-postgres, wesichain-checkpoint-redis
  • observability: wesichain-langsmith, wesichain-langfuse (new in v0.3), wesichain-otel (new in v0.3)

For most projects:

  1. Start with wesichain-core, wesichain-llm, wesichain-graph.
  2. Use ReActGraphBuilder for tool-using ReAct flows.
  3. Add checkpoint backend and retrieval crates only when needed.

For coding / autonomous agents (new in v0.3):

  1. Add wesichain-tools (with fs, exec, git features) + wesichain-agent.
  2. Add wesichain-session for cost/token tracking and wesichain-mcp for MCP server connections.
  3. See the Coding Agent Guide.

Runtime Notes

  • StateSchema now uses type Update + apply(current, update) for deterministic merge behavior.
  • ReActAgentNode remains available, but ReActGraphBuilder is the preferred path for new work.
  • The v0.3 direction emphasizes explicit runtime phases and evented orchestration (wesichain-agent).

Next Steps

Updated Edit on GitHub