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 utilitieswesichain-llm: provider abstraction layer (OpenAI, Ollama, Groq, Together AI, Azure, Mistral, DeepSeek, Google)
Providers
wesichain-llm: OpenAI, Ollama, Groq, Together AI, Azure, Mistral, DeepSeek, Googlewesichain-anthropic: Anthropic Claude with extended thinking and streaming (new in v0.3)
Orchestration
wesichain-graph: graph runtime, conditional routing, interrupts, checkpoint-aware executionwesichain-agent: FSM-oriented runtime track for v0.3 evented agentswesichain-memory: memory primitives (buffer/window/summary)
Agentic Tooling (new in v0.3)
wesichain-tools: coding tools (fs, bash, git, glob, grep, patch) withPathGuardsandboxingwesichain-mcp: MCP client with stdio + HTTP/SSE transportwesichain-session: session persistence and cost/token tracking
Server & CLI (new in v0.3)
wesichain-server: Axum HTTP server with Bearer auth and SSE streamingwesichain-cli:wesichain new/wesichain runinteractive 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)
Recommended Starting Point
For most projects:
- Start with
wesichain-core,wesichain-llm,wesichain-graph. - Use
ReActGraphBuilderfor tool-using ReAct flows. - Add checkpoint backend and retrieval crates only when needed.
For coding / autonomous agents (new in v0.3):
- Add
wesichain-tools(withfs,exec,gitfeatures) +wesichain-agent. - Add
wesichain-sessionfor cost/token tracking andwesichain-mcpfor MCP server connections. - See the Coding Agent Guide.
Runtime Notes
StateSchemanow usestype Update+apply(current, update)for deterministic merge behavior.ReActAgentNoderemains available, butReActGraphBuilderis 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