Features of Rig-Gemini-gRPC
mainThe rig-gemini-grpc crate provides the following capabilities:
- Full completion support with streaming
- Embedding generation
- Tool calling support
- Reasoning and thought signatures
- Image input support
repository·main·Indexed 27 days ago
https://github.com/0xplaygrounds/rigAn opinionated Rust library for building scalable, modular, and ergonomic LLM-powered applications. Rig provides a unified interface for over 20 model providers (including OpenAI, Anthropic, and Gemini) and 10+ vector stores (such as MongoDB, LanceDB, and Qdrant). It supports agentic workflows, streaming, multi-turn prompting, and local model inference via rig-candle. The library includes a classic agent runtime in rig-agent and supports native targets as well as wasm32-unknown-unknown.
The rig-gemini-grpc crate provides the following capabilities:
rig-onchain-kit is an associated crate designed to simplify interactions between blockchain networks (Solana/EVM) and the Rig framework.rig-memory crate provides conversation memory policies for the Rig agent framework. It allows you to shape and filter conversation history before it is sent to a model using various policies like sliding windows or token budgets.Rig is architected to separate provider/backend contracts from agent orchestration through two main components:
rig-core: Contains provider-neutral messages, completion models, portable tools, memory, and vector-store contracts, along with built-in provider mappings.rig-agent: Contains the agent orchestration logic, including the builder, prompt/streaming traits, typed hooks, contextual tools, extraction, and the serializable AgentRun state machine. This is enabled by default.The root rig crate re-exports both, allowing most users to simply depend on rig.
rig-vertexai crate allows you to use Google Cloud Vertex AI hosted models, such as Gemini, as a model provider within the Rig ecosystem.To use AWS Bedrock as a model provider with Rig, add both rig-bedrock and rig-core to your Cargo.toml dependencies. You can use cargo add to fetch the latest versions automatically.
[dependencies]
rig-bedrock = "0.4.5"
rig-core = "0.36.0"cargo add rig-bedrock rig-coreTo use the Rig-SQLite vector store, add rig-sqlite and rig-core to your Cargo.toml. You will also need serde (with derive features) and serde_json to handle metadata.
You can install the latest versions using the following commands:
cargo add rig-sqlite rig-core serde_json
cargo add serde --features derive[dependencies]
rig-sqlite = "0.2.6"
rig-core = "0.37.0"
serde = { version = "1", features = ["derive"] }
serde_json = "1"To use Milvus with Rig, add rig-milvus to your Rust project. Note that rig-core must also be added as a dependency for intended usage.
cargo add rig-milvusTo use LanceDB as a vector store with Rig, add rig-lancedb and rig-core to your Cargo.toml. You can use cargo add to fetch the latest versions automatically.
Pre-requisite: If running locally, you must have protoc (the Protobuf Compiler) installed on your system.
cargo add rig-lancedb rig-coreThe rig-helixdb integration requires a specific queries/schema configuration to function. To deploy a minimum viable configuration using the provided example files:
cd helixdb-cfghelix push devThis deploys the necessary queries and schema into your HelixDB instance.
The rig-agent crate provides Rig's classic agent runtime, including builders, serializable sans-I/O run state, blocking and streaming drivers, typed hooks, contextual tools, and extraction.
While most applications should use the root rig facade (where this runtime is enabled by default), you can import construction and prompting explicitly from rig-agent and rig-core.
use rig_agent::prelude::*;
use rig_core::{client::ProviderClient, providers::openai};
let client = openai::Client::from_env()?;
let agent = client.agent(openai::GPT_5_2).build();
let answer = agent.prompt("Explain ownership briefly.").await?;Rig-Bedrock requires AWS credentials to be available in your environment before initializing the client. Ensure the following environment variables are set:
AWS_DEFAULT_REGIONAWS_SECRET_ACCESS_KEYAWS_ACCESS_KEY_IDexport AWS_DEFAULT_REGION=us-east-1
export AWS_SECRET_ACCESS_KEY=.......
export AWS_ACCESS_KEY_ID=......