0xPlaygrounds/rig
68.4
Adequate · 29 September 2026
227.5k
lines of production code
Rust
primary language
2
measurements over time
What this system is
Rig is a Rust framework for building and orchestrating AI agents, providing a unified interface to interact with diverse LLM providers like OpenAI, Anthropic, and AWS Bedrock. It supports complex agentic workflows through a bus-driven architecture that manages tools, memory, and multi-turn conversations with features like structured data extraction and retrieval-augmented generation. The system enables local inference via Candle, vector search across numerous databases, and deterministic testing through a recording and replay cassette system.
Features
AWS Bedrock provider integration with Converse API support
The \rig-bedrock\ crate now provides a complete integration with AWS Bedrock, enabling text completion, streaming, embeddings, and image generation. Users can create models via \BedrockRuntime\ using the Converse API, which supports structured features like prompt caching, guardrails, and reasoning content (including redacted reasoning blocks). The provider exposes a wide range of model identifiers (e.g., Amazon Nova, Anthropic Claude, Meta Llama, Mistral) and handles streaming events, usage tracking, and provider-specific request IDs.
crates/rig-bedrock/src · high confidence
AWS Bedrock provider now supports structured output and detailed reasoning content
The AWS Bedrock integration has been expanded to support structured output via the Converse API, allowing users to enforce JSON schema responses from models. The provider now correctly maps and preserves detailed reasoning content, including both text and redacted reasoning blocks, while handling provider-specific issuers for Anthropic models. Additionally, token usage reporting has been enhanced to include cache read and write metrics, and the error handling system now preserves raw provider error bodies and specific exception codes for better diagnostics.
crates/rig-bedrock/src/types · high confidence
Add Cloudflare Vectorize vector store integration
Introduces a new \VectorizeVectorStore\ implementation that allows users to store and query embeddings against a Cloudflare Vectorize index. The store handles document insertion (upserting in batches of 1,000) and similarity search (top\_n and top\_n\_ids) by embedding queries via a provided model and filtering results by score threshold and metadata filters.
crates/rig-vectorize/src · high confidence
Add Cohere image embedding example
Added a new example demonstrating how to embed images using the Cohere Embed v3 model. The example reads an image file (PNG, JPEG, WebP, or GIF) from the command line, uses the provider's image embedding capability, and prints the resulting embedding dimensions.
_examples/cohere\_image\embeddings · high confidence
Add Gemini gRPC agent example using the new rig-agent facade
A new example file, gemini\_grpc\_agent.rs, demonstrates how to use the Gemini gRPC provider with the newly introduced rig-agent facade. The example shows initializing the GeminiGrpc transport, configuring an AgentBuilder with a specific model (gemini-2.5-flash), preamble, and temperature, and executing a single-turn prompt. This reflects the architectural shift where provider clients own their transport and the rig-core/rig-agent split is now exposed via the rig facade.
crates/rig-gemini-grpc/examples · high confidence
Add Jev-based typesafe AI chat and triage examples
New interactive examples demonstrate the Jev provider integration: the chat example (\typesafeai\_chat\) runs a conversational support demo that evaluates user input against typed routes, urgency scores, and clarification needs, optionally passing the assessment to an OpenAI agent for replies; the triage example (\typesafeai\_triage\) evaluates a synthetic support ticket to determine the correct support team, urgency level, and whether a duplicate charge exists. Both examples require a \JEV\_TOKEN\ environment variable and showcase the provider's typed evaluation primitives (Choice, Score, Noul) with confidence and probability outputs.
_examples/typesafeai\_chat, examples/typesafeai\triage · high confidence
Add MongoDB vector search example
A new example demonstrating how to use the rig-mongodb crate for vector search has been added. It shows how to initialize a MongoDB client, generate embeddings using OpenAI's text-embedding-ada-002 model, insert documents into a MongoDB collection, and perform a vector similarity search using a pre-existing vector index.
crates/rig-mongodb/examples · high confidence
Add Qdrant vector search example with filtering support
A new example demonstrating how to use the rig-qdrant integration for vector search has been added. It shows how to connect to a local Qdrant instance, create a collection, embed documents using OpenAI's text-embedding-ada-002 model, and perform both standard and filtered vector searches using QdrantFilter.
crates/rig-qdrant/examples · high confidence
Add Qdrant vector store integration with metadata filtering
Introduces the \rig-qdrant\ crate, providing a \QdrantVectorStore\ implementation for dense vector search against Qdrant collections. This change adds support for filtering search results using \QdrantFilter\, which allows users to apply conditions such as equality, range comparisons (exclusive/inclusive), existence checks, and logical combinations (AND/OR) to narrow down retrieved documents.
crates/rig-qdrant/src · high confidence
Add SQLite vector search example using sqlite-vec
A new example file, vector\_search\_sqlite.rs, demonstrates how to perform vector similarity search using SQLite with the sqlite-vec extension. The example shows initializing the sqlite-vec extension, creating a SQLite connection, generating embeddings via OpenAI's text-embedding-ada-002 model, inserting documents into a SQLite-backed vector store, and querying the store for similar documents.
crates/rig-sqlite/examples · high confidence
Add ScyllaDB vector store implementation
Introduces a new ScyllaDB-backed vector store for Rig, enabling users to store and query document embeddings using ScyllaDB. The implementation supports client-side cosine similarity scoring and includes a filter system that translates JSON-based search filters into CQL queries with proper parameter binding.
crates/rig-scylladb/src · high confidence
Add SurrealDB vector store integration
Users can now store and search embeddings using a SurrealDB-backed vector store. The new \SurrealVectorStore\ supports multiple distance functions (Cosine, KNN, Euclidean, Hamming, Jaccard) and allows filtering search results using \SurrealSearchFilter\, which converts JSON-based filters into SurrealQL predicates. The implementation includes both in-memory (\Mem\) and WebSocket (\Ws\/\Wss\) engine support, enabling flexible deployment options for vector search workloads.
crates/rig-mongodb/src, crates/rig-surrealdb/src · high confidence
Add extractor example demonstrating typed extraction and usage metadata
A new example in examples/extractor demonstrates how to use the ExtractorBuilder to perform structured data extraction from text. The example shows extracting a Person struct from input strings and highlights the ability to access usage metadata, such as total tokens, from the extraction response.
examples/extractor · high confidence
Add local YOLOv8 pose estimation example
A new example application (\candle\_pose\) demonstrates local human pose estimation using a YOLOv8 pose model via the \rig-candle\ library. Users can download the pinned YOLOv8n-pose checkpoint and run inference on image files (treating them as video frames) to detect people and their keypoints, with results streamed and printed to the console as each frame is processed.
_examples/candle\pose · high confidence
Add local inference example using rig-candle
A new example application (\candle\_local\) demonstrates running local inference via the \rig-candle\ integration. It downloads a pinned SmolLM2-360M-Instruct model (Q4\_K\_M GGUF) and executes completions through the root \rig\ facade, printing streaming text and detailed generation metrics (prefill time, throughput, etc.) to the console.
_examples/candle\local · high confidence
Add multi-agent example with translator tool
A new example demonstrating a multi-agent architecture has been added to the examples/multi\_agent directory. This sample application shows how to wrap an agent as a tool, allowing a primary agent to delegate translation tasks to a specialized translator agent before generating a final response.
_examples/multi\agent · high confidence
Add retrieval-augmented generation example
A new example demonstrating retrieval-augmented prompting has been added to the examples/chain directory. This example shows how to use an in-memory vector store to look up context (specifically, definitions of non-standard words) and fold that context into a prompt before sending it to an OpenAI agent, replacing the previous parallel pipeline approach with a clearer sequential lookup.
examples/chain · high confidence
Add shared example utilities for Bedrock integration
A new \common\ module has been added to the \rig-bedrock\ examples, providing reusable components for demonstration purposes. This includes a \MathError\ type for handling calculation failures and an \Adder\ tool implementation that demonstrates how to define a tool with specific arguments, parameters, and execution logic within the \rig-agent\ framework.
crates/rig-bedrock/examples/common · high confidence
Added Milvus vector search example
The repository now includes a new example demonstrating how to perform vector search using the Milvus vector store. This example shows users how to configure the Milvus client with authentication, generate embeddings via OpenAI, insert documents into a collection, and execute similarity searches using the rig-core vector store interface.
crates/rig-milvus/examples · high confidence
Added example fixtures for LanceDB integration
A new \lib.rs\ file has been added to the \crates/rig-lancedb/examples/fixtures\ directory, providing sample data structures and utilities for testing the LanceDB integration. This includes a \Word\ struct with an embedded definition field and helper functions to convert these words and their embeddings into Arrow \RecordBatch\ objects, facilitating easier setup for example applications.
crates/rig-lancedb/examples/fixtures · high confidence
Added support module with scripted model and tool mocks for examples
The \crates/rig-ecs/examples/support\ module has been added to provide mock implementations for running examples without external dependencies. It includes a \Scripted\ model that returns pre-defined responses (supporting both streaming and non-streaming modes) and a generic \Tool\ struct for simulating tool calls, allowing examples to run locally without requiring API keys or specific provider features.
crates/rig-ecs/examples/support · high confidence
Added vector search examples using Fastembed
New example files demonstrate how to perform vector search using the Fastembed library. The \vector\_search\_fastembed.rs\ example shows how to load a pre-built model (AllMiniLML6V2Q) and use the \EmbeddingsBuilder\ to create embeddings for documents, store them in an in-memory vector store, and query for similar results. The \vector\_search\_fastembed\_local.rs\ example illustrates how to load a custom local ONNX model by specifying model files and tokenizer configurations, then use it for embedding and search.
crates/rig-fastembed/examples · high confidence
Classic agent recording and replay via effect logs
Users can now record an agent's live execution into an EffectLog and later replay it deterministically. The new \AgentReplayExt\ trait on \rig\_agent::Agent\ provides \stamp\ to attach the agent's run-spec hash, hook stack, and bus policy to a log, and \check\_replayable\ to validate that a log matches the current agent's identity and handler requirements before replay. The \register\_all\ function in \rig\_cassette::agent::replay\ registers payload-checking replayers on a bus driver, allowing recorded responses to be served during replay while preserving stream error positions and model capabilities.
crates/rig-cassette/src/agent · high confidence
Durable tool-turn checkpoints and typed content assets
The ECS agent now supports durable checkpointing at tool-turn boundaries, allowing hosts to arm and release named holds that block run advancement until specific model turns are committed. This is accompanied by a new typed content system that exposes structured content parts (text, images, audio, video, documents, tool calls, reasoning, and JSON) and a shared binary asset store with SHA-256 deduplication and configurable allocation limits. These changes enable reliable state persistence and recovery across tool loops while providing a lossless, type-safe representation of multimodal content.
crates/rig-ecs/src · high confidence
Example demonstrating Gemini API recovery via custom hooks
The \examples/gemini\_default\_api\_recovery\ example now shows how to handle legacy tool name emissions from the Gemini provider. It implements a custom \AgentHook\ (\DefaultApiRepairHook\) that intercepts invalid tool calls, specifically mapping the legacy \default\_api\ tool name to the current \JavaScript\ tool, allowing the agent to recover gracefully from provider-specific naming quirks.
_examples/gemini\_default\_api\recovery · high confidence
Example demonstrating memory policies for conversation history management
Added an example showing how to apply history-shaping policies to a Rig agent using the rig-memory crate. The code demonstrates configuring two backends—SlidingWindowMemory, which retains a fixed number of recent messages, and TokenWindowMemory, which limits history based on a token budget—both attached to an InMemoryConversationMemory backend via MessageFilter.
crates/rig-memory/examples · high confidence
Gemini gRPC crate initialization with streaming and tool-calling fixes
The \rig-gemini-grpc\ crate is introduced to provide a high-performance, type-safe integration with the Google Gemini gRPC API, replacing the previous REST-based approach. This new component supports full completion and embedding generation, streaming responses, tool calling, reasoning with thought signatures, and image input. The initial release (v0.42.0) includes critical behavioral fixes for streaming: it now correctly reports error states like \MALFORMED\_FUNCTION\_CALL\ and \UNEXPECTED\_TOOL\_CALL\ to stop the stream (previously aborted turns were incorrectly reported as completed), ensures tool-call identities are handled correctly without fabrication, and preserves thought signatures on trailing non-thought parts. The crate also aligns its internal data structures with the workspace-wide migration from \OneOrMany\<T\>\ to \Vec\<T\>\.
crates/rig-gemini-grpc · high confidence
Introduce AI coding agent guidelines and pre-commit hooks
Added AGENTS.md to provide operational instructions for AI coding agents, including rules on code style, error handling, and provider implementation. Configured .pre-commit-config.yaml to enforce trailing whitespace, YAML/JSON checks, Rust formatting, and commit message conventions via commitizen.
(repo-wide) · high confidence
Introduce AWS S3Vectors vector store integration
Users can now store and search vectors using AWS S3Vectors. This new \rig-s3vectors\ crate provides an \S3VectorsVectorStore\ implementation that integrates with the AWS SDK, supporting document insertion and search with dynamic filtering (including equality, range, existence, and boolean logic) via \S3SearchFilter\. The implementation includes tests verifying that dynamic filters correctly compile to native AWS document structures.
crates/rig-s3vectors/src · high confidence
Introduce Milvus vector store integration with typed filter expressions
Added a new Milvus vector store implementation in \crates/rig-milvus\ that enables inserting and searching documents via the Milvus v2 HTTP API. The change introduces a \Filter\ type and \MilvusValue\ enum to construct typed, escaped boolean filter expressions (supporting equality, comparison, logical AND/OR, \IN\, \LIKE\, and array containment operations) for precise query filtering. The store handles authentication via Bearer tokens, manages embedding generation using a provided model, and serializes search requests to the Milvus endpoint, returning results with optional ID-only or full document payloads.
crates/rig-milvus/src · high confidence
Introduce Neo4j vector store integration
Users can now store and query vector embeddings in Neo4j using the new \rig-neo4j\ crate. This adds a \Neo4jVectorIndex\ that supports vector similarity search (Cosine and Euclidean) with configurable index names, embedding properties, and node labels. The integration includes a \Neo4jSearchFilter\ for constructing Cypher predicates (equality, comparison, containment, and regex matching) to filter search results, and implements \InsertDocuments\ to write embeddings into the graph database.
crates/rig-helixdb/src, crates/rig-neo4j/src · high confidence
Introduce Vertex AI integration for Google Cloud's Gemini models
Adds a new \rig-vertexai\ crate that enables users to interact with Google Cloud Vertex AI, specifically supporting Gemini models such as \gemini-1.5-pro\, \gemini-1.5-flash\, and \gemini-2.5-flash\. The integration provides a \VertexAiBuilder\ for configuring the client via explicit project/location settings, Application Default Credentials (ADC), or pre-built prediction services, and implements the core completion wire to send unary \GenerateContent\ requests. It also includes robust error handling that maps SDK transport and RPC errors (like \UNAVAILABLE\ or \DEADLINE\_EXCEEDED\) to retryable provider errors.
crates/rig-vertexai/src · high confidence
Introduce \`rig\` facade crate for unified API access
A new \src/lib.rs\ file establishes the \rig\ crate as a public facade that re-exports core types from \rig\_core\ and agent-specific runtime components from \rig\_agent\ (such as \Agent\, \AgentRun\, and \ToolSet\) behind feature flags. This change provides a single entry point for users to access portable provider contracts, transport-agnostic HTTP clients, and classic agent orchestration APIs, while also exposing optional integrations like the \reqwest\ transport, \tungstenite\ websockets, and MCP tool support via specific features.
src · high confidence
Introduce audio generation (TTS) support and provider client abstractions
Users can now generate audio from text using the new \AudioGenerationRequestBuilder\ and \AudioGenerationResponse\ types, which expose provider metadata, usage counters, and response identity. The \rig-core\ client layer has been restructured to use a shared \http\_client!\ macro, providing a uniform pattern for provider clients (Anthropic, Cohere, Copilot, Gemini, Ollama, OpenAI, Voyage AI) that manage configuration, transport, and model instantiation. Additionally, Gemini-specific explicit context caching operations are now exposed through the client layer.
crates/rig-core/src · high confidence
Introduce configurable conversation memory policies
The \rig-memory\ crate now provides a pluggable memory policy system that allows users to control how conversation history is managed. This includes a \SlidingWindowMemory\ policy to retain only the most recent messages and a \TokenWindowMemory\ policy to enforce token limits, both of which automatically handle the demotion of orphaned tool results to maintain conversation integrity. These policies can be applied to conversation memory adapters via a filter mechanism, enabling graceful degradation if a policy fails.
crates/rig-memory/src · high confidence
Introduce dedicated reqwest HTTP transport crate
The bundled reqwest HTTP transport is now available as a standalone crate (\rig-reqwest\), providing a \ReqwestClient\ that acts as a process-wide, shared client built on first use. This client implements the \HttpClientExt\ trait and supports both standard \reqwest::Client\ instances and middleware-wrapped clients (via \ReqwestMiddlewareClient\ when specific TLS features are enabled). The transport handles runtime context binding, allowing requests to poll within the current Tokio context or fall back to a lazy, single-threaded runtime if none is present, ensuring that build failures are reported in-band during request execution rather than at client construction.
crates/rig-reqwest/src · high confidence
Introduce experimental TypeSafe AI provider for typed Jev evaluations
The new \rig-typesafeai\ crate provides a typed interface for the TypeSafe Jev evaluation API, allowing users to define structured questions (Choice, Score, Noul, and DynamicScore) that map directly to strongly-typed answer structs. This enables batched, compile-time validated judgments over application state without manual JSON mapping, while preserving provider-reported probability distributions and confidence scores for application-level routing and threshold policies.
crates/rig-typesafeai · high confidence
Introduce local embedding support via fastembed integration
The new \rig-fastembed\ crate provides a local embedding transport backed by the \fastembed\ library, allowing users to run text embeddings directly in the calling process without external services. It exposes a \Fastembed\ struct for loading models (including automatic downloads via Hugging Face Hub when the \hf-hub\ feature is enabled) and a \text\_embeddings\ wire function to configure embedding capabilities. This enables in-process vectorization for supported models like \AllMiniLML6V2Q\, with errors handled via a dedicated \FastembedError\ type.
crates/rig-fastembed/src · high confidence
Introduces Cloudflare Vectorize client with metadata filtering support
The \crates/rig-vectorize/src/client\ module now provides a complete HTTP client for the Cloudflare Vectorize v2 API, enabling users to query, upsert, delete, and list vectors in a specific index. This change adds a \VectorizeFilter\ type that implements the \SearchFilter\ trait, allowing metadata queries using operators like \$eq\, \$gt\, \$in\, and conjunction via \and\. Notably, because Cloudflare Vectorize does not support disjunction, the \or\ filter method is implemented to return a sentinel value that triggers a validation error, preventing invalid API calls. The client handles authentication via bearer tokens and parses the standard Cloudflare API envelope for responses.
crates/rig-vectorize/src/client · high confidence
Introduction of rig-cassette crate for recording and replay
The new rig-cassette crate provides recording and replay capabilities for Rig's effects and provider HTTP exchanges. It exposes an \effect\_log\ module by default (supporting WASM) and offers optional feature-gated modules for agent integrations (\agent\), ECS checkpoint boundaries (\ecs\), and native HTTP engine cassettes with ordered JSON maps and round-trip float parsing (\http\), which can be further extended with AWS event-stream support via the \bedrock\ feature.
crates/rig-cassette/src · high confidence
LanceDB integration now converts query results to JSON and filters embedding columns
The \rig-lancedb\ crate now includes utilities to execute LanceDB queries and automatically convert the resulting Arrow record batches into JSON rows, supporting a wide range of data types including primitives, strings, binary data, nested lists, structs, maps, and dictionaries. Additionally, a schema filtering utility is provided to automatically exclude \FixedSizeList\ columns containing \Float64\ items (used for embeddings) from query projections, ensuring that only relevant data columns are returned to the user.
crates/rig-lancedb/src/utils · high confidence
Local CPU inference for LLMs and YOLOv8 pose estimation
The rig-candle crate now enables running models directly on the CPU without external services. It supports text completion for Llama, SmolLM2, and Qwen3 architectures using both safetensors and GGUF checkpoint formats, with configurable generation parameters like temperature and top-k. Additionally, it introduces a new YOLOv8 pose estimation capability that accepts RGB image frames to detect and track human poses locally.
crates/rig-candle/src · high confidence
Native WebSocket backend for non-Tokio environments
The \rig-tungstenite\ crate now provides a native WebSocket transport that automatically falls back to a dedicated Tokio runtime when the caller is not running on one (e.g., Bevy, smol, or \futures\ executors). This allows \TungsteniteClient\ to be used seamlessly in any environment without requiring a global Tokio context, while ensuring that abandoned connections and cancelled receives properly release socket resources and preserve unread frames.
crates/rig-tungstenite · high confidence
New \#\[rig\_tool\] macro with strict argument grammar and context parameter handling
The \crates/rig-derive/src/tool\ module introduces the implementation for the \\#\[rig\_tool\]\ attribute macro. It enforces a strict grammar for macro arguments (name, description, params, required), rejecting duplicates and invalid formats. It also classifies function parameters to identify and handle a mutable \ToolContext\ parameter (marked via \\#\[rig(context)\]\ or qualified type), ensuring it is excluded from the generated JSON schema while being passed to the underlying function.
crates/rig-derive/src/tool · high confidence
New Bedrock examples demonstrate unified agent capabilities
The \crates/rig-bedrock/examples\ directory now includes a comprehensive set of examples showcasing the updated Bedrock integration. These examples demonstrate building agents with \AgentBuilder\ using the \AMAZON\_NOVA\_LITE\ model, including basic prompting, tool usage (e.g., calculator), context injection, and streaming responses. Additional examples cover document and image analysis via base64-encoded inputs, data extraction with \ExtractorBuilder\, vector embeddings with \AMAZON\_TITAN\_EMBED\_TEXT\_V2\_0\, RAG with in-memory vector stores, and image generation with \AMAZON\_NOVA\_CANVAS\.
crates/rig-bedrock/examples · high confidence
New Bevy-based agent example without direct Tokio dependency
Added the \agent\_no\_tokio\ example, which demonstrates running a rig agent on Bevy's \AsyncComputeTaskPool\ instead of using Tokio directly. The example uses \AgentRunner::run\_channel\ to split the agent run into a runtime-agnostic future and a bounded \RunEvents\ feed, allowing the future to be spawned on Bevy's task pool while a synchronous frame loop drains events via \try\_next\. The crate's manifest excludes direct dependencies on \tokio\ and \reqwest\; the HTTP transport uses an erased client (\DynHttpClient\) and brings its own private Tokio runtime internally.
_examples/agent\_no\tokio · high confidence
New CLI chatbot integration for interactive agent sessions
Added a new \cli\_chatbot\ module that provides a terminal-based chat loop for interacting with agents. Users can now use \ChatBotBuilder\ to configure and run multi-turn conversations with streaming output, optional usage reporting, and history management, either with the default \Agent\ implementation or custom types implementing the \Chat\ trait.
crates/rig-agent/src/integrations · high confidence
New ECS-based effect recording and replay system
The \rig-cassette\ crate now includes a complete ECS integration for recording and replaying effect logs. This adds \ReplayPlugin\ to manage delivery collection and idle-refusal diagnosis, \EffectLogResource\ for world-level recording, and \Replay\ for registering by-ID replayers and loading recorded effect entities. The system supports policy-visible replay with strict delivery boundary validation, stable JSON hashing for run identity, and checkpoint-based log tailing.
_crates/rig-cassette/src/effect\log · high confidence
New Gemini Deep Research example demonstrating agent-based interactions and streaming
Added a new example in \examples/gemini\_deep\_research\ that showcases the Gemini provider's Deep Research capabilities. The example demonstrates how to configure a specific research agent via environment variables, construct requests using \additional\_params\ for agent-specific settings like thinking summaries, and handle the resulting interaction lifecycle. It supports both synchronous polling for terminal states and asynchronous streaming, correctly parsing and displaying reasoning steps and final text outputs from the provider's interaction model.
_examples/gemini\_deep\research · high confidence
New Gemini gRPC transport for completions and embeddings
Users can now connect to Google Gemini models via a gRPC transport instead of the previous REST-based implementation. This new \rig-gemini-grpc\ crate provides a \GeminiGrpc\ client that handles API key authentication and TLS, exposing both completion (\GenerateContent\) and embedding (\EmbedContent\) capabilities. The transport supports both unary and streaming modes, correctly decodes streaming responses into normalized completion events (including reasoning/thought blocks and tool calls), and maps gRPC status codes to provider errors for proper retry and error handling.
crates/rig-gemini-grpc/src · high confidence
New Gemini video understanding example with custom generation config
Added a new example demonstrating how to use the Gemini API for video understanding. The example shows how to construct a user message containing both text instructions and a video URL, and how to pass provider-specific parameters like \GenerationConfig\ (e.g., \top\_k\, \top\_p\) via \AdditionalParameters\ when building the agent.
_examples/gemini\_video\understanding · high confidence
New HTTP middleware example for transport-level request/response inspection
Added an example in \examples/http\_middleware\ that demonstrates how to attach an \HttpMiddleware\ to the HTTP client used by an agent. The example implements a \WireLogger\ middleware that injects an \anthropic-beta\ header before the request is sent, logs the serialized request body, and reads rate-limit and request-ID headers from the response before the stream is consumed, providing visibility into the wire traffic that the semantic layer does not expose.
_examples/http\middleware · high confidence
New LanceDB vector search examples for local, S3, and agent integration
Added four new Rust examples in \crates/rig-lancedb/examples\ demonstrating how to use the \rig-lancedb\ crate for vector search. \vector\_search\_local\_ann.rs\ and \vector\_search\_local\_enn.rs\ show how to perform approximate and exact nearest-neighbor searches using a local LanceDB instance with OpenAI embeddings. \vector\_search\_s3\_ann.rs\ extends this to demonstrate storing and searching vector data in AWS S3 with Cosine distance. \vector\_search\_local\_ann\_agent.rs\ illustrates building a RAG agent using \rig\_agent::AgentBuilder\ with dynamic context sourced from a LanceDB vector index.
crates/rig-lancedb/examples · high confidence
New LanceDB vector store integration
Users can now store and search vectors using LanceDB via the new \LanceDbVectorIndex\. This implementation supports both flat and approximate nearest neighbor search strategies, allows configuration of distance metrics and search parameters (such as nprobes and refine factor), and enables filtering results using SQL-like predicates through the \LanceDBFilter\ type.
crates/rig-lancedb/src · high confidence
New Neo4j vector search examples with OpenAI embeddings
Added example scripts demonstrating how to use the rig-neo4j crate for vector search against a Neo4j database. The examples show how to generate embeddings via OpenAI, ingest data into Neo4j, create vector indexes, and query them using the rig\_core vector store interface. A shared display utility is included to format and print search results in a readable table.
crates/rig-neo4j/examples · high confidence
New PDF RAG example using Ollama and dynamic context
A new example application has been added at examples/pdf\_agent that demonstrates a Retrieval-Augmented Generation (RAG) workflow. The application loads and chunks PDF documents using a built-in loader, generates embeddings with the local Ollama provider (bge-m3 model), stores them in an in-memory vector store, and uses a dynamic context helper to inject relevant document chunks into a deepseek-r1 agent for answering questions via a CLI chatbot interface.
_examples/pdf\agent · high confidence
New RAG examples for Gemini, OpenAI, and Ollama
Added three new example applications demonstrating Retrieval-Augmented Generation (RAG) patterns using the \rig\ library. The \gemini\_extractor\_with\_rag\ example shows how to use the \ExtractorBuilder\ with Gemini to parse structured questionnaire responses from unstructured text. The \rag\ and \rag\_ollama\ examples demonstrate building agents with \AgentBuilder\ that use dynamic context (vector search) to answer questions based on a local in-memory vector store, supporting both OpenAI and Ollama providers.
_examples/gemini\_extractor\_with\rag · high confidence
New RMCP example demonstrating MCP server capabilities
Added a new example in \examples/rmcp/src/main.rs\ that shows how to build an MCP-compatible agent using the \rmcp\ library. The example implements a \Counter\ server that exposes tools (such as a sum calculator) and resources (like a current working directory and a memo), demonstrating both static tool fetching and auto-updating via \McpClientHandler\ notifications. It also illustrates handling HTTP transport via \StreamableHttpService\ and integrating with the \rig\ framework's provider and tool abstractions.
examples/rmcp · high confidence
New Vertex AI examples for completion, tools, and ECS integration
Added four new examples in the \rig-vertexai\ crate demonstrating how to use the Vertex AI provider with the Rig framework. \completion\_vertexai.rs\ shows a basic text completion request using the \GEMINI\_2\_5\_FLASH\_LITE\ model. \tool\_vertexai.rs\ demonstrates an agent with a custom 'add' tool, illustrating tool definition and execution. \ecs\_host\_model.rs\ provides an example of integrating Vertex AI completion into a Bevy ECS application, handling host-owned lifetimes and effect dispatch. \no\_rig\_vertexai.rs\ serves as a reference for using the underlying Google Cloud Vertex AI SDK directly without Rig, providing context for the integration layer.
crates/rig-vertexai/examples · high confidence
New agent composition and OpenTelemetry tracing examples
Added two new Rust examples in the examples directory: \agent\_with\_agent\_tool\ demonstrates nested agent composition by exposing one agent as a tool for another, while \agent\_with\_tools\_otel\ shows how to integrate OpenTelemetry tracing with agent tool execution to support distributed observability.
_examples/agent\_with\_agent\_tool, examples/agent\_with\_tools\otel · high confidence
New agent examples demonstrate raw response access, truncation retry, and runtime model routing
Three new examples in the \rig-agent\ crate illustrate key agent capabilities: \raw\_response\_hook.rs\ shows how to access provider-specific fields (like OpenAI's \system\_fingerprint\) via the \CompletionResponse::raw\ surface in hooks; \retry\_on\_truncation.rs\ demonstrates a provider-neutral strategy to automatically retry turns when the provider truncates output based on \FinishReason\ and \max\_tokens\; and \runtime\_model\_routing.rs\ shows how to route an agent across different models (e.g., a 'fast' research model and a 'strong' synthesis model) at runtime using a \ModelSelection\ hook.
crates/rig-agent/examples · high confidence
New agent pattern examples: prompt chaining and routing
Added two new Rust examples demonstrating multi-agent workflows. The \agent\_prompt\_chaining\ example shows how to sequence agents, where the output of one agent serves as the input for the next. The \agent\_routing\ example demonstrates a classifier agent that directs a prompt to different follow-up handlers based on its categorization. Both examples use the updated API where the model type is erased at construction (\erase()\) and shared via cloned handles.
_examples/agent\_prompt\_chaining, examples/agent\routing · high confidence
New agent streaming example with conversation history
The examples/agent\_stream\_chat directory now contains a new Rust example demonstrating how to stream agent responses while maintaining conversation history. Users can see how to initialize an agent, pass prior messages via the history method, and consume the resulting stream to extract the final response.
_examples/agent\_stream\chat · high confidence
New cassette maintenance CLI tool for account failures, stored state, and cleanup
A new example tool (\cassette\_tool\) is available to help maintain cassette integrity. It provides three commands: \account-failures\ to detect replies that would be refused as undeclared account failures, \stored-state\ to identify cassettes storing provider response state without cleanup, and \cleanup\ to delete resources tracked in the created-resource ledger. These utilities allow users to audit and clean up recording artifacts directly from the command line.
crates/rig-cassette/examples · high confidence
New debate example demonstrating multi-agent interaction
Added a new example in the \examples/debate\ directory that showcases a simulated debate between two AI agents. The example instantiates one agent using OpenAI's GPT-4 and another using Cohere's Command model, allowing them to exchange arguments over multiple rounds while maintaining separate conversation histories.
examples/debate · high confidence
New derive macros for tool definitions and context values
The \rig-derive\ crate now provides \\#\[derive(ContextValue)\]\ to automatically generate slot keys for tool context values, and \\#\[rig\_tool\]\ to generate tool types, parameter structs, and metadata from functions. These macros simplify the creation of tools by handling schema generation and context resolution, allowing developers to define tools with minimal boilerplate while ensuring proper integration with the core tooling infrastructure.
crates/rig-derive/src · high confidence
New durable human-in-the-loop approval example
Added a new example demonstrating durable human-in-the-loop tool-call approval, where the agent's state is serialized to a JSON file between turns to allow decisions to be made asynchronously or across process boundaries. The example implements a fail-closed approval gate for a side-effecting 'transfer\_funds' tool, supporting approve, deny, edit, and abort actions, while using a read-only 'get\_balance' tool.
_examples/agent\_with\_durable\approval · high confidence
New example applications for agent evaluation and orchestration patterns
Added two new example applications demonstrating advanced agent workflows. The \agent\_evaluator\_optimizer\ example shows a loop where a generator agent produces code and an evaluator agent (using \ExtractorBuilder\) provides feedback until the task passes. The \agent\_orchestrator\ example demonstrates breaking down a complex task into multiple styles using a classifier agent, generating content for each, and using a judge agent to select the best result.
_examples/agent\_evaluator\_optimizer, examples/agent\orchestrator · high confidence
New example demonstrating OpenAI streaming with tools and OpenTelemetry
Added a new example in \examples/openai\_streaming\_with\_tools\_otel\ that showcases an agent using the OpenAI GPT-4o model with custom arithmetic tools (add and subtract). The example integrates OpenTelemetry for distributed tracing, configuring a batch exporter and tracing subscriber to capture agent interactions, and demonstrates streaming the agent's response to stdout while reporting token usage.
_examples/openai\_streaming\_with\_tools\otel · high confidence
New example demonstrating agent response retry hooks
Added a new example (\examples/agent\_with\_retry\_hook\) that demonstrates how to implement custom retry logic for agent model turns using the \AgentHook\ interface. The example introduces a \RetryOnMarker\ hook that intercepts completed model turns, checks for specific text markers in the response, and triggers retries based on a configurable policy. It supports two modes: \Feedback\, which preserves the rejected response and appends a corrective user message, and \Repeat\, which discards the response and re-sends the original prompt with existing history. The example also highlights that retries consume the agent's \max\_turns\ budget and that tool-bearing turns require separate tool-call hooks.
_examples/agent\_with\_retry\hook · high confidence
New example demonstrating complex agentic loops with Claude
Added a new example in \examples/complex\_agentic\_loop\_claude\ that showcases a multi-agent orchestration pattern using the Anthropic Claude model. The example implements an orchestrator agent that utilizes specialized sub-agents (research, data analysis, and recommendation) as dynamic tools, alongside a vector store for knowledge retrieval and a think tool for complex reasoning. It demonstrates how to configure an agent to perform multi-turn interactions with a maximum of 15 turns, illustrating a sophisticated agentic workflow for environmental sustainability advice.
_examples/complex\_agentic\_loop\claude · high confidence
New example demonstrating composable agent hooks with merged request patches
The \examples/request\_hook\ example now illustrates the v2 hook system, showing how multiple \AgentHook\ implementations (logging, context injection, temperature adjustment, and turn counting) can be stacked via \.add\_hook()\. It demonstrates that request patches from different hooks merge rather than short-circuit, allowing combined effects like adding context and lowering temperature on the same turn, while using a shared scratchpad for state management.
_examples/request\hook · high confidence
New example demonstrating context injection in agents
Added a new example in \examples/agent\_with\_context\ that shows how to build an agent using the Cohere provider and inject specific context documents (definitions of terms like 'flurbo' and 'glarb-glarb') directly into the agent's builder before prompting.
_examples/agent\_with\context · high confidence
New example demonstrating custom reqwest middleware with retry logic
Added a new example in \examples/reqwest\_middleware\ that shows how to bind a preconfigured HTTP client to an agent. The example uses \reqwest-middleware\ and \reqwest-retry\ to apply exponential backoff retry policies to Anthropic API calls, illustrating how users can inject custom transport behavior into the rig agent.
_examples/reqwest\middleware · high confidence
New example demonstrating how to correctly force a tool call on the first turn only
Added an example in \examples/force\_tool\_first\_turn\ that illustrates a common pitfall when using \RequestPatch\ to force tool usage: applying \tool\_choice = Required\ unconditionally causes the model to loop indefinitely until it hits the \max\_turns\ limit. The example contrasts this 'footgun' with the correct approach—gating the patch on the first turn (\ctx.turn() == 1\)—so the model is nudged to call the tool initially but can then stop and provide a final answer.
_examples/force\_tool\_first\turn · high confidence
New example demonstrating manual tool-call handling
Added a new example in \examples/manual\_tool\_calls\ that shows how to handle tool calls manually using a raw \Model\ request instead of the high-level \Agent\ abstraction. The example implements a calculator loop that sends completion requests, collects \ToolCall\s, executes them locally via a \ToolSet\, and feeds results back to the model until a final text answer is returned.
_examples/manual\_tool\calls · high confidence
New example demonstrating per-call usage inspection in agent streams
Added an example (\openai\_streaming\_per\_call\_usage\) that shows how to inspect token usage for individual completion calls within an agent's multi-turn stream, rather than relying solely on the aggregated final response usage. The example illustrates handling \MultiTurnStreamItem::CompletionCall\ events to retrieve input and output token counts for each step (such as tool requests and final answers), which is useful for understanding context size and cost distribution during complex agent runs.
_examples/openai\_streaming\_per\_call\usage · high confidence
New example demonstrating structured tool failure handling and policy hooks
Added a new example (\tool\_result\_outcomes\) that demonstrates how to classify tool execution errors (such as disk I/O or network failures) into structured facts and apply specific policies via hooks. The example shows how to use \OutcomeEvent\ to record typed metadata in a run-scoped scratchpad, allowing one hook to record failure details and a subsequent hook to decide whether to terminate the run or allow the model to retry, distinguishing between fatal and recoverable errors.
_examples/tool\_result\outcomes · high confidence
New example demonstrating token-count estimation for disrupted Gemini streams
Added a new example (\gemini\_stream\_kill\_token\_count\) that illustrates how to estimate token usage when a Gemini streaming generation is interrupted mid-response. Since the API only provides authoritative usage metadata on the final chunk, this example implements a fallback mechanism that uses the \countTokens\ endpoint on partial output if the stream is killed, encounters a transport error, closes prematurely, or stalls. It injects four distinct disruption scenarios to demonstrate a unified accounting path for handling incomplete streams.
_examples/gemini\_stream\_kill\_token\count · high confidence
New examples demonstrating agent stepping and EchoChambers integration
Added two new example applications: \agent\_run\_stepping\ shows how to manually drive the \AgentRun\ state machine for granular control (including serialization/pause/resume) and how to use the high-level \AgentRunner\ with hooks, while \agent\_with\_echochambers\ demonstrates an agent interacting with the EchoChambers API via custom tools for sending messages, retrieving history, and fetching room metrics.
_examples/agent\_run\stepping · high confidence
New examples demonstrating parallel structured extraction
Added \agent\_parallelization\ and \multi\_extract\ examples to the \examples\ directory. These demonstrate how to use \ExtractorBuilder\ with \futures::join!\ and \futures::try\_join!\ to perform concurrent, fan-out structured extraction tasks, such as scoring text on multiple dimensions or extracting names, topics, and sentiment in parallel.
_examples/multi\extract · high confidence
New examples demonstrating policy-based and interactive human-in-the-loop tool approval
Added two new example applications in the \examples/agent\_with\_approval\_policy\ and \examples/agent\_with\_human\_in\_the\_loop\ directories that showcase the \AgentHook\ system for controlling tool execution. The \agent\_with\_approval\_policy\ example implements a non-interactive, fail-closed policy where specific tools (like \search\_web\) are auto-approved while others (like \transfer\_funds\) are gated by rules (e.g., amount limits), with denials fed back to the model as tool results. The \agent\_with\_human\_in\_the\_loop\ example demonstrates an interactive approval flow where the agent pauses on tool calls (like \send\_email\ or \delete\_file\) to wait for human input via stdin, supporting actions to approve, deny, edit arguments, or abort the run entirely.
_examples/agent\_with\_approval\policy · high confidence
New examples for Gemini image generation and multi-provider transcription
Added two new example applications to demonstrate specific capabilities. The \gemini\_nanobanana\_image\_generation\ example shows how to use the Gemini provider to generate images (specifically a 512x512 banana icon) using the new \ImageGenerationRequestBuilder\. The \transcription\ example demonstrates audio transcription across multiple providers (OpenAI Whisper, Gemini, Azure, Groq, HuggingFace, and Mistral) using a unified \TranscriptionRequestBuilder\ interface.
_examples/gemini\_nanobanana\_image\generation · high confidence
New examples for OpenAI Completions API with OpenTelemetry and sentiment classification
Added two new example applications demonstrating specific usage patterns. The \openai\_agent\_completions\_api\_otel\ example shows how to configure the OpenAI provider to use the legacy Chat Completions API (via \Route::Chat\) instead of the default Responses API, while integrating OpenTelemetry tracing for observability. The \sentiment\_classifier\ example demonstrates using the typed \ExtractorBuilder\ to structure LLM outputs into a custom Rust enum (\Sentiment\) for classification tasks.
_examples/openai\_agent\_completions\_api\_otel, examples/sentiment\classifier · high confidence
New examples for agent tool usage and turn budgets
Added two new example programs in the \examples/agent\_with\_tools\ area: \agent\_with\_default\_max\_turns\ demonstrates configuring a default turn budget for tool-heavy prompts using static tools, while \agent\_with\_tools\ shows how to register dynamic, runtime-defined tools with an agent.
_examples/agent\_with\tools · high confidence
New examples for file-based context loading and conversation memory
Added two new Rust examples demonstrating key agent capabilities: \agent\_with\_loaders\ shows how to ingest local files into an agent's context using \FileLoader\, and \agent\_with\_memory\ demonstrates managing conversation history with \InMemoryConversationMemory\ and named conversation IDs.
_examples/agent\_with\_loaders, examples/agent\_with\memory · high confidence
New examples for the rig\_tool macro demonstrating async, complex types, and explicit metadata
Added five new examples in the rig\_tool directory that demonstrate the updated \#\[rig\_tool\] macro capabilities. The examples show how to define tools with async execution (async\_tool.rs), handle complex input types like enums and vectors (complex\_types.rs), use explicit attribute overrides for descriptions and required parameters (with\_description.rs), and build agents with multiple tools (simple.rs, full.rs). These examples illustrate the new schema generation via schemars and the simplified tool execution API.
crates/rig-derive/examples · high confidence
New frozen API examples demonstrating typed decoders and fold-based operations
The \examples/frozen\_api\ directory now includes eight new Rust examples (\p1\_one\_prompt\ through \p8\_custom\_transport\) that showcase the library's updated API design. These examples demonstrate a shift toward a single typed decoder and one-fold-per-wire architecture, covering basic completions, streaming responses, erased model types for provider abstraction, tool-use workflows, and custom local and HTTP operations. They also illustrate configuring OpenAI-compatible vendors with specific quirks and implementing custom transports for replaying recorded responses.
_examples/frozen\api · high confidence
New local WASM chat example with embedded SmolLM2 model
This change introduces a new browser-based chat example in \examples/candle\_wasm\_chat\ that runs the SmolLM2-360M-Instruct model entirely within the browser via WebAssembly. The example embeds the model artifacts (config, tokenizer, and GGUF weights) directly into the WASM module, ensuring that chat messages never leave the page. It provides a complete local inference pipeline: a Rust backend (\src/lib.rs\) using the Candle library, a Web Worker to prevent UI freezing, and a JavaScript frontend (\www/app.js\) with a chat interface. The build process (\build.sh\, \download\_model.sh\) handles downloading and verifying the pinned model artifacts, while the application manages conversation history with bounded windows to fit within memory constraints.
_examples/candle\_wasm\chat · high confidence
New multi-turn agent examples with arithmetic tools
Added \multi\_turn\_agent\ and \multi\_turn\_agent\_extended\ examples that demonstrate building an agent using the Anthropic provider (Claude Sonnet 4.6) with four arithmetic tools (add, subtract, multiply, divide). The examples show how to configure a preamble, attach tools via \AgentBuilder\, and run multi-turn prompts with a maximum of 20 turns, illustrating the updated tool execution and hook APIs.
_examples/multi\_turn\_agent, examples/multi\_turn\_agent\extended · high confidence
New reasoning loop example demonstrating chain-of-thought extraction and tool use
Added a new example in \examples/reasoning\_loop\ that demonstrates a multi-step reasoning pattern. The example implements a \ReasoningAgent\ that first uses an extractor to derive reasoning steps from a user prompt, then passes those steps to an executor agent equipped with arithmetic tools (Add, Subtract, Multiply, Divide). This showcases how to combine structured extraction with tool-using agents in a single workflow.
_examples/reasoning\loop · high confidence
New release engineering and dependency-verification tooling
The repository now includes a suite of scripts to support the release process and ensure dependency stability. A new \check-dependency-floors.py\ script verifies that the workspace builds against the lowest declared versions of direct dependencies, preventing build breaks for downstream users. Additionally, \release-notes.sh\ and \release-notes-prompt.md\ automate the collection of commit logs, PR details, and public API diffs to generate polished \CHANGELOG.md\ and \MIGRATING.md\ entries during the release editorial pass. These changes are accompanied by regression tests for the dependency-checking logic.
scripts · high confidence
New rig-ecs examples demonstrate core agent and bus capabilities
The \crates/rig-ecs/examples\ directory now includes a suite of examples showcasing the new ECS-based agent architecture. \hello\_model.rs\ demonstrates the basic effect bus and handler registration. \agent\_with\_tools.rs\ and \human\_in\_the\_loop.rs\ show how to grant tools to agents and implement human-in-the-loop approval gates. \best\_of\_n.rs\ illustrates run forking for parallel generation. \streaming\_ui.rs\ handles streamed responses. \prompt\_from\_assets.rs\ loads agent prompts and tool definitions from Bevy assets. \host\_resume.rs\ demonstrates world checkpointing, strict resume, and effect log replay.
crates/rig-ecs/examples · high confidence
New rig-rmcp crate for MCP tool support
A new \rig-rmcp\ crate provides Model Context Protocol (MCP) tool support for Rig, built on the \rmcp\ SDK. It introduces \McpTool\ to convert MCP server tools into \DynamicTool\s and \McpClientHandler\ to automatically synchronize tool registrations with the server's tool list via notifications. The crate supports per-call timeouts, preserves request metadata (\\_meta\) and structured response content in the tool context, and is native-only (it fails to compile on \wasm32\ targets).
crates/rig-rmcp · high confidence
New tool registry and catalog system in rig-agent
The \rig-agent\ crate now exposes a structured tool management system with \ToolServer\ for mutable, bus-published registries and \ToolCatalog\ for request-scoped, pinned tool advertisements. Users can register tools via \ToolServer\, retrieve consistent snapshots via \ToolServerHandle::snapshot\ or \static\_tool\_defs\, and execute tools through the catalog, which ensures that snapshots retain access to implementations even after the live registry is modified.
crates/rig-agent/src/tool · high confidence
New transport contract crate with type-erased HTTP client and middleware
The \rig-http\ crate introduces a transport-independent HTTP layer that provider clients use to send requests. It defines the \HttpClientExt\ trait for unary, multipart, and streaming requests, and provides \DynHttpClient\, a type-erased, cloneable wrapper that supports attaching transport-boundary middleware (header, body, and response hooks) applied in attachment order. The crate also includes incremental framing for SSE and NDJSON responses, a generic multipart form builder, and WASM-compatible bounds for \Send\/\Sync\ and boxed futures. A \test-utils\ feature provides mock HTTP client doubles for testing code that depends on this transport layer.
crates/rig-http · high confidence
New typed effect bus for agent communication
The rig-agent crate now includes a new \bus\ module that provides a typed, asynchronous communication channel for agent effects. This bus introduces a \Dispatcher\ for submitting work, a \Registrar\ for managing handler registrations, and a \BusDriver\ that owns and polls the handlers. It supports typed handles for specific effect families like models, tools, memory, embeddings, and reranking, ensuring type safety at bind time. The implementation includes a bounded command queue, serial dispatching per handler, and comprehensive cancellation and lifecycle management, verified by extensive unit and loom-based concurrency tests.
crates/rig-agent/src/bus · high confidence
New vector search examples for HelixDB and Cloudflare Vectorize
Added example applications demonstrating vector search capabilities for two new vector store integrations: HelixDB and Cloudflare Vectorize. The HelixDB example includes configuration files (schema, queries, and project settings) and a Rust application that uses OpenAI embeddings to insert and search word definitions. The Cloudflare Vectorize example provides a Rust application showing how to integrate with the Vectorize service using environment-based credentials for account ID and API token, also leveraging OpenAI embeddings for document insertion and similarity search.
crates/rig-helixdb/examples, crates/rig-vectorize/examples · high confidence
New vector search examples for Postgres and S3 Vectors
Added example code demonstrating vector search capabilities using the Postgres and S3 Vectors integrations. The Postgres example includes a migration script to set up a vector-enabled table and a Rust application that generates embeddings via OpenAI, inserts documents, and performs similarity searches. The S3 Vectors example provides a complete workflow for creating an S3 vector bucket and index, embedding documents with OpenAI, and querying results.
crates/rig-postgres/examples, crates/rig-s3vectors/examples · high confidence
New vector search examples for ScyllaDB and SurrealDB
Added example code demonstrating vector search capabilities for ScyllaDB and SurrealDB. The ScyllaDB example shows how to insert documents with embeddings and perform similarity searches using the ScyllaDB vector store. The SurrealDB examples include a migration script for setting up the necessary schema and indexes, along with two Rust examples illustrating how to use the SurrealDB vector store for document insertion and similarity search with optional threshold filtering.
_crates/rig-scylladb/examples, crates/rig-surrealdb/examples, examples/agent\autonomous · high confidence
New xtask commands for Bevy dependency validation and cassette fixture management
The xtask tooling now includes a new \bevy\ module that validates Bevy dependencies are sourced from crates.io and pinned to the workspace release floor (^0.19.1), and a comprehensive \cassette\ command suite for managing provider recording fixtures. The cassette commands allow developers to record fixtures with attempt caps and ledgers, audit effect goldens for specific change types (migrations, rebatches), regenerate goldens while preserving delivery batches, identify which tests own specific fixtures, and clean up provider state from ledgers.
xtask · high confidence
Rig-agent crate restructured with new extraction and completion modules
The rig-agent crate has been reorganized to provide a cleaner public API and new capabilities. A new \extractor\ module introduces an \Extractor\ and \ExtractorBuilder\ for typed structured data extraction from text, supporting configurable retries and dynamic context. The \completion\ module now centralizes runtime errors and portable completion contracts, including a \StructuredOutputError\ enum and helper macros for forwarding provider response details. The crate's public surface is updated via \lib.rs\ and \prelude.rs\ to expose these new types alongside existing agent and tooling components, while \streaming.rs\ and \sync.rs\ provide portable streaming types and synchronization primitives respectively.
crates/rig-agent/src · high confidence
SQLite vector store integration for Rig
The \rig-sqlite\ crate is introduced, providing \SqliteVectorStore\ and \SqliteVectorIndex\ to store embedded documents in SQLite using the \sqlite-vec\ extension. Users can define document schemas by implementing the \SqliteVectorStoreTable\ trait, which supports indexed metadata columns for efficient filtering during KNN searches. The implementation handles distance metrics (Cosine, L2, L1) and includes a fallback to brute-force scanning when the candidate count exceeds \sqlite-vec\'s 4096 limit, ensuring exact results regardless of query size.
crates/rig-sqlite/src · high confidence
Removals
Removal of in-memory and MongoDB vector store implementations
The in-memory vector store (\InMemoryVectorStore\) and MongoDB vector store (\MongoDbVectorStore\) implementations have been removed from the \rig-core\ crate. This change eliminates the built-in support for these specific storage backends, meaning users can no longer use these types for local testing or MongoDB-based document retrieval within this module. The core \VectorStore\ and \VectorStoreIndex\ traits remain defined in \mod.rs\, but the concrete implementations provided in this location are no longer available.
_rig-core/src/vector\store · high confidence
Removal of legacy Cohere and OpenAI provider implementations
The legacy provider implementations for Cohere and OpenAI have been removed from the \rig-core\ crate. This deletion eliminates the previous direct client structures and their associated embedding/completion logic, indicating a shift toward a new provider architecture or integration strategy that replaces these specific files.
rig-core/src/providers · high confidence
Removal of legacy example files
The \rig-core/examples\ directory has been cleaned up by deleting 14 legacy example files (including \agent.rs\, \rag.rs\, \vector\_search.rs\, and \debate.rs\). These files utilized older APIs and patterns that are no longer part of the current codebase, ensuring the examples directory only contains code that is currently valid and runnable.
rig-core/examples · high confidence
Behavioural changes
Agent construction and execution refactored around a bus-driven architecture
The agent builder now constructs agents over an owned or host-driven bus, enabling typestate enforcement for tool configuration (builder-supplied tools versus a shared tool server) and scoped model registrations. The agent's lifecycle is driven by a shared bus with a per-poll driver lock and a bus-wide waker set, ensuring that multiple runs on the same bus coordinate correctly without deadlocks. Request preparation is centralized, applying hook patches (preamble, temperature, tool choice, context) and dynamic tool retrieval before dispatch. Recording is refused on host buses to prevent silent failures, and a warning is emitted when a conversation is created without a memory backend.
crates/rig-agent/src/agent · high confidence
Cassette recording now refuses and isolates account-level provider failures
The HTTP cassette engine now classifies provider replies as account-level failures (authentication, rate limits, quota exhaustion, or credit balance issues) and refuses to save them as valid test fixtures unless the test explicitly declares the expected failure. When an account failure occurs or a test fails, recordings are moved to an attempt directory rather than overwriting the main fixture, and a new ledger tracks created provider-side resources (such as stored responses or cached content) for automatic cleanup.
crates/rig-cassette/src/http · high confidence
Discord bot example moved to standalone location
The Discord bot integration has been moved from the main workspace (behind a feature flag) into a standalone example directory. This change removes the \serenity\ dependency from the core workspace lockfile, preventing unpatched \rustls-webpki\ security advisories from affecting consumers who do not use the Discord feature. The example now functions as a self-contained module demonstrating how to deploy Rig agents as Discord bots using the \serenity\ library.
_examples/discord\bot · high confidence
Introduce serializable, I/O-free agent run state machine with per-turn request patches
The agent run logic has been refactored into a standalone, serializable state machine (\AgentRun\) that manages model turns, tool recovery, and history without owning models, tools, or memory backends. Drivers now drive the run by acting on \AgentRunStep\ instructions (CallModel, CallTools, Done) and feeding back responses. This change introduces \RequestPatch\ for non-sticky, per-turn overrides (such as temperature, tool choice, and active tool allow-lists) that merge with the base \RunSpec\ without mutating agent defaults. It also adds structured output enforcement modes (\OutputMode\) and robust invalid tool-call recovery policies (Retry, Repair, Skip, Stop) with full diagnostic context, enabling hosts to cache and restore run state via JSON serialization.
crates/rig-agent/src/run · high confidence
Migrate RAG examples to the new Tool API and package layout
The RAG dynamic tools examples have been updated to use the revised Tool trait, replacing the old \definition\ method with \parameters\ and \description\, and updating the \call\ signature to accept typed arguments and return typed results. Additionally, the examples have been reorganized into a package-per-example directory structure, and the calculator chatbot example now uses the new \ChatBotBuilder\ integration.
_examples/rag\_dynamic\tools · high confidence
Removal of legacy core modules (Agent, Model, RAG, Extractor, CLI)
The \rig-core\ library has removed its previous core implementation files, including \agent.rs\, \model.rs\, \rag.rs\, \extractor.rs\, \cli\_chatbot.rs\, \completion.rs\, \embeddings.rs\, \tool.rs\, and \json\_utils.rs\. This deletion eliminates the legacy \Agent\, \RagAgent\, \Model\, and \Extractor\ structs, the old \Prompt\ and \Completion\ traits, and the built-in CLI chatbot utility, indicating a significant architectural shift to a new API surface.
rig-core/src · high confidence
Vertex AI provider now supports tool choice configuration and corrects token usage reporting
The Vertex AI provider now maps the \tool\_choice\ setting (Auto, Required, None, Specific) to the corresponding Vertex AI function calling modes, allowing users to control whether the model may, must, or must not call tools. Additionally, a fix ensures that Vertex AI's \thoughts\_token\_count\ is correctly mapped to the \reasoning\_tokens\ usage field, preventing thinking spend from being discarded in analytics and billing reports.
crates/rig-vertexai/src/types · high confidence
Fixes
PostgreSQL vector store search query generation and filtering fixes
The \rig-postgres\ crate introduces a new PostgreSQL vector store implementation that corrects several SQL generation bugs in search queries. Specifically, it fixes parameter placeholder consistency (ensuring all operators use \$\ instead of mixing \?\), corrects the \IN\ clause syntax for member filters, and fixes threshold filtering to properly calculate minimum similarity per distance function rather than comparing raw distances. The implementation also ensures correct parameter binding order when combining thresholds with compound filters.
crates/rig-postgres/src · high confidence
Test coverage
Added LanceDB integration test fixtures; Added UI tests for derive macro validation; Added compile-time tests for renamed dependency resolution in rig-derive; Added comprehensive test coverage for the rig-agent effect bus and agent lifecycle; Added comprehensive tests for the rig-derive macro; Added integration tests for AWS Bedrock; Added integration tests for LanceDB vector store index; Added integration tests for Vertex AI client lifecycle and transport; Added integration tests for vector store backends; Added local model conformance and pose estimation tests for rig-candle; Added streaming conformance tests for the Gemini gRPC provider; Added test coverage for rig-core core behaviors and infrastructure; Added test fixture for stepping AgentRun without an async runtime; Added test fixture to verify tool facade re-exports and derive macro context detection; Added test fixtures for file ID verification and loader scenarios; Added test for Qdrant filter availability in search requests; Added tests for provider response error forwarding in completion errors; Added tests for reqwest transport cancellation, middleware, multipart, and runtime independence; Added tests for the rig-ecs effect bus and asset integration; Centralized integration test module for supported databases; Expanded test coverage for core agent behaviors and system invariants; New test coverage for rig-cassette provider integrations and cache stability; New test harnesses for prompt-cache conformance and cassette comparison safety; New test infrastructure and regression suites for providers and tooling; Smoke tests added for Azure, Hugging Face, Hyperbolic, MiniMax, Mira, Moonshot, Together, VoyageAI, Xiaomi MiMo, and Z.AI providers.
Dependencies
Rig workspace restructured into versioned companion crates
The Rig library has been split into a modular workspace of versioned companion crates (rig-core, rig-agent, rig-derive, rig-http, rig-reqwest, rig-tungstenite, rig-cassette, rig-ecs, rig-memory, and various provider/vector-store integrations), all unified under a facade crate and pinned to version 0.42.0. This reorganization decouples the core runtime from specific transports and providers, allowing users to depend only on the components they need (e.g., rig-core without the bundled reqwest transport) and enabling independent versioning of integrations like AWS Bedrock, Google Gemini, and vector stores such as LanceDB, MongoDB, and Qdrant.
(dependencies) · high confidence
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
How this codebase got here
Score
- CAI 64 → 68 (+4.0)
- Rubric changed (rubric-2026.09.9 → rubric-2026.09.17) — scores are not directly comparable.
Lenses
- Code Health 87 → 88 (+0.8)
- Architecture 100 → 97 (-3.0)
- Maturity 66 → 66 (-0.0)
- Readiness 49 → 58 (+8.3)
- Security 79 → 79 (+0.1)
- Domain Modelling 99 → 100 (+1.4)
- Event Sourcing 100 → 100 (+0.0)
- Performance 100 (new)
Resolved (169)
- AnthropicAdapter::interpret_content (cognitive 39) (crates/rig-core/src/providers/anthropic/streaming.rs)
- AnthropicAdapter::interpret_content (cyclomatic 26) (crates/rig-core/src/providers/anthropic/streaming.rs)
- BlockAccumulator::reasoning_end (cognitive 21) (crates/rig-core/src/streaming/accumulator.rs)
- BlockAccumulator::tool_end (cognitive 28) (crates/rig-core/src/streaming/accumulator.rs)
- BlockAccumulator::tool_end (cyclomatic 19) (crates/rig-core/src/streaming/accumulator.rs)
- Buffered::poll (cognitive 28) (crates/rig-ecs/src/bus/delivery.rs)
- Buffered::poll (cyclomatic 18) (crates/rig-ecs/src/bus/delivery.rs)
- CassetteScrubber::scrub_json_value (cognitive 68) (crates/rig-cassette/src/lib.rs)
- CassetteScrubber::scrub_json_value (cyclomatic 32) (crates/rig-cassette/src/lib.rs)
- Change coupling: lib.rs ↔ lib.rs (crates/rig-sqlite/src/lib.rs)
- ClassTooLong: StreamedTurnAssembler (crates/rig-agent/src/run/streamed.rs)
- ClassTooLong: StreamingTurnSource (crates/rig-agent/src/agent/engine.rs)
- CohereAdapter::interpret (cognitive 35) (crates/rig-core/src/providers/cohere/streaming.rs)
- CohereAdapter::interpret (cyclomatic 24) (crates/rig-core/src/providers/cohere/streaming.rs)
- CompatAdapter::interpret (cognitive 32) (crates/rig-core/src/providers/internal/openai_chat_completions_compatible.rs)
- CompatAdapter::interpret (cyclomatic 24) (crates/rig-core/src/providers/internal/openai_chat_completions_compatible.rs)
- CompletionModel::stream_with_context (cognitive 21) (crates/rig-core/src/providers/ollama.rs)
- CompletionRequest::validate_message_content (cognitive 17) (crates/rig-core/src/completion/request.rs)
- CompletionResponse::normalize (cognitive 30) (crates/rig-core/src/providers/openrouter/completion.rs)
- CompletionResponse::try_from (cognitive 19) (crates/rig-vertexai/src/types/completion_response.rs)
- …and 149 more
New (190)
- Banned license: epub
- BinaryAssets::resolve (cognitive 17) (crates/rig-ecs/src/agent/content/binary.rs)
- Buffered::poll (cognitive 26) (crates/rig-cassette/src/ecs/delivery.rs)
- Buffered::poll (cyclomatic 17) (crates/rig-cassette/src/ecs/delivery.rs)
- Caching::send (cognitive 23) (crates/rig-core/src/client/gemini_caching.rs)
- Caching::send (cyclomatic 19) (crates/rig-core/src/client/gemini_caching.rs)
- CassetteScrubber::scrub_json_value (cognitive 18) (crates/rig-cassette/src/http/mod.rs)
- Change coupling: mod.rs ↔ streaming.rs (crates/rig-core/src/providers/copilot/mod.rs)
- Change coupling: streaming.rs ↔ streaming.rs (crates/rig-bedrock/src/streaming.rs)
- Change coupling: streaming.rs ↔ streaming.rs (crates/rig-bedrock/src/streaming.rs)
- Change-coupling hub: lib.rs → lib.rs, lib.rs, lib.rs (crates/rig-postgres/src/lib.rs)
- Change-coupling hub: lib.rs → lib.rs, lib.rs, lib.rs (crates/rig-surrealdb/src/lib.rs)
- Change-coupling hub: lib.rs → lib.rs, lib.rs, lib.rs, lib.rs, lib.rs (crates/rig-scylladb/src/lib.rs)
- ChatDecoder::interpret_chunk (cognitive 21) (crates/rig-core/src/providers/openai/wire/chat.rs)
- ChatDecoder::interpret_stream (cognitive 17) (crates/rig-core/src/providers/cohere/streaming.rs)
- Documentation: no architecture or design documentation (crates/rig-fastembed/README.md)
- Documentation: no installation or build instructions (crates/rig-fastembed/README.md)
- Documentation: no installation or build instructions (crates/rig-scylladb/README.md)
- Documentation: no project overview (README.md)
- Documentation: no project overview (crates/rig-fastembed/README.md)
- …and 170 more
Changes since last survey
- 67 commits — 53 feature/other, 14 fixes
By area
- crates/rig-cassette — 16 commits
- crates/rig-core — 13 commits
- crates/rig-verify — 11 commits
- crates/rig-ecs — 8 commits
- (root) — 7 commits
- tests/providers — 4 commits
- tests/cassettes — 2 commits
- xtask/src — 2 commits
- crates/rig-agent — 1 commit
- crates/rig-candle — 1 commit
- crates/rig-neo4j — 1 commit
- crates/rig-typesafeai — 1 commit
Notable commits
- fix: fix!: the merge review's defects on main, each pinned by a matrix (#2499)
- fix: fix(core)!: redact resolved credentials and encoded request diagnostics (#2546)
- fix: fix(core): restore the observe scrub helpers; a truncated stream is retryable (#2502)
- fix: fix(gemini, rig-ecs): retry transient provider failures inside the run; block_reason=OTHER is not a refusal (#2500)
- fix: fix(rig-cassette): restore start_at and checkpoint_recording for consumers that stage candidates (#2498)
- fix: fix(rig-ecs): a Retry written on an empty turn asks again instead of settling (#2504)
- fix: fix: Responses strict:false, Anthropic 128k/Claude 5, and stale Groq/Moonshot/Ollama constants (#2530)
- fix: fix: honour the WASM bounds in every vector store (#2545)
- fix: fix: lenient Responses metadata decode (top_p) and valid rig-postgres search SQL (#2531)
- fix: fix: publish the facade, not the repository — and stop asking for dependencies nothing uses (#2563)
- fix: fix: recover from malformed streamed tool arguments, preserve Responses compaction/phase, drop the tool_macro alias (#2532)
- fix: fix: repair eleven downstream consumer conformance defects (#2561)
- fix: fix: the parity gaps the ECS matrices found, closed — Gemini's block is a refusal, a truncated reasoning-only turn commits nothing, images ride the regrouped stream (#2509) (#2510)
- fix: test(cassette): guard history round-trips and fix Groq and Ollama replay (#2576)
- change: Reduce test-suite compilation and duplicated fixtures (#2518)
- change: Revise agent guidelines and error handling rules (#2533)
- change: Unify every provider onto one wire model (#2538)
- change: chore(cassette): make rig-cassette publishable (#2497)
- change: chore: faster local iteration (lean dev profile, local nextest profile) (#2610)
- change: ci: the slow lanes run off the queue and on main; the ECS parity goldens as a named lane (#2508)
- …and 47 more
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
0xPlaygrounds/rig was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.
About this page
- The score is its most recent published measurement, taken on 29 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit 3456884313ffabc203f4bd667e8aae235f6d0363 — the exact code this score is about.
- Scored under rubric-2026.09.17 — the same rubric and the same method as every other entry in this index.
- Measured by watchdog.canine.dev using codehealth-analyzer preprod-705631bb727e.