Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

API Reference

Synaptic is organized as a workspace of focused crates. Each crate has its own API documentation generated from doc comments in the source code.

Crate Reference

CrateDescriptionDocs
synaptic-coreShared traits and types (ChatModel, Tool, Message, SynapticError, etc.)docs.rs
synaptic-modelsProviderBackend abstraction, ScriptedChatModel test double, wrappers (retry, rate limit, structured output, bound tools)docs.rs
synaptic-openaiOpenAI provider (OpenAiChatModel, OpenAiEmbeddings)docs.rs
synaptic-anthropicAnthropic provider (AnthropicChatModel)docs.rs
synaptic-geminiGoogle Gemini provider (GeminiChatModel)docs.rs
synaptic-ollamaOllama provider (OllamaChatModel, OllamaEmbeddings)docs.rs
synaptic-runnablesLCEL composition (Runnable trait, BoxRunnable, pipe operator, parallel, branch, fallbacks, assign, pick)docs.rs
synaptic-promptsPrompt templates (PromptTemplate, ChatPromptTemplate, FewShotChatMessagePromptTemplate)docs.rs
synaptic-parsersOutput parsers (string, JSON, structured, list, enum, boolean, XML, fixing, retry)docs.rs
synaptic-toolsTool system (ToolRegistry, SerialToolExecutor, ParallelToolExecutor)docs.rs
synaptic-memoryMemory strategies (buffer, window, summary, token buffer, summary buffer, RunnableWithMessageHistory)docs.rs
synaptic-callbacksCallback handlers (RecordingCallback, TracingCallback, CompositeCallback)docs.rs
synaptic-retrievalRetriever implementations (in-memory, BM25, multi-query, ensemble, contextual compression, self-query, parent document)docs.rs
synaptic-loadersDocument loaders (text, JSON, CSV, directory, file, markdown, web)docs.rs
synaptic-splittersText splitters (character, recursive character, markdown header, token, HTML header, language)docs.rs
synaptic-embeddingsEmbeddings trait, FakeEmbeddings, CacheBackedEmbeddingsdocs.rs
synaptic-vectorstoresVector store implementations (InMemoryVectorStore, VectorStoreRetriever, MultiVectorRetriever)docs.rs
synaptic-qdrantQdrant vector store (QdrantVectorStore)docs.rs
synaptic-pgvectorPostgreSQL pgvector store (PgVectorStore)docs.rs
synaptic-redisRedis store and cache (RedisStore, RedisCache)docs.rs
synaptic-pdfPDF document loader (PdfLoader)docs.rs
synaptic-graphGraph orchestration (StateGraph, CompiledGraph, ToolNode, create_react_agent, checkpointing, streaming)docs.rs
synaptic-cacheLLM caching (InMemoryCache, SemanticCache, CachedChatModel)docs.rs
synaptic-evalEvaluation framework (exact match, regex, JSON validity, embedding distance, LLM judge evaluators; Dataset and evaluate())docs.rs
synapticUnified facade crate that re-exports all sub-crates under a single namespacedocs.rs

Note: The docs.rs links above will become active once the crates are published to crates.io. In the meantime, generate local documentation as described below.

Local API Documentation

You can generate and browse the full API documentation locally with:

cargo doc --workspace --open

This builds rustdoc for every crate in the workspace and opens the result in your browser. The generated documentation includes all public types, traits, functions, and their doc comments.

To generate docs without opening the browser (useful in CI):

cargo doc --workspace --no-deps

Using the Facade Crate

If you prefer a single dependency instead of listing individual crates, use the synaptic facade:

[dependencies]
synaptic = "0.2"

Then import through the unified namespace:

use synaptic::core::Message;
use synaptic::openai::OpenAiChatModel;   // requires "openai" feature
use synaptic::models::ScriptedChatModel; // requires "model-utils" feature
use synaptic::graph::create_react_agent;
use synaptic::runnables::Runnable;