[dependencies.as-any]
version = "0.3.2"
[dependencies.async-stream]
version = "0.3.6"
[dependencies.base64]
version = "0.22.1"
[dependencies.bytes]
version = "1.10.1"
[dependencies.epub]
optional = true
version = "2.1.4"
[dependencies.eventsource-stream]
version = "0.2.3"
[dependencies.fastrand]
version = "2.3.0"
[dependencies.futures]
version = "0.3.31"
[dependencies.futures-timer]
version = "3.0.3"
[dependencies.glob]
version = "0.3.2"
[dependencies.http]
version = "1.3.1"
[dependencies.lopdf]
optional = true
version = "0.36.0"
[dependencies.mime]
version = "0.3.17"
[dependencies.mime_guess]
version = "2.0.5"
[dependencies.ordered-float]
version = "5.0.0"
[dependencies.pin-project-lite]
version = "0.2.16"
[dependencies.quick-xml]
optional = true
version = "0.38.0"
[dependencies.rayon]
optional = true
version = "1.10.0"
[dependencies.reqwest]
default-features = false
features = ["json", "stream", "multipart"]
version = "0.12.20"
[dependencies.reqwest-middleware]
features = ["json", "multipart", "charset", "http2"]
optional = true
version = "0.4.2"
[dependencies.rig-derive]
optional = true
version = "0.1.10"
[dependencies.rmcp]
features = ["client"]
optional = true
version = "0.13"
[dependencies.schemars]
version = "1.0.4"
[dependencies.serde]
features = ["derive"]
version = "1.0.219"
[dependencies.serde_json]
version = "1.0.140"
[dependencies.serenity]
optional = true
version = "0.12.4"
[dependencies.thiserror]
version = "2.0.12"
[dependencies.tokio]
features = ["rt", "sync"]
version = "1.45.1"
[dependencies.tracing]
version = "0.1.41"
[dependencies.tracing-futures]
features = ["futures-03"]
version = "0.2.5"
[dependencies.url]
version = "2.5"
[dependencies.wasm-bindgen-futures]
optional = true
version = "0.4.54"
[dev-dependencies.anyhow]
version = "1.0.98"
[dev-dependencies.assert_fs]
version = "1.1.3"
[dev-dependencies.axum]
version = "0.8.4"
[dev-dependencies.base64]
version = "0.22.1"
[dev-dependencies.hyper-util]
features = ["service", "server"]
version = "0.1.14"
[dev-dependencies.opentelemetry]
version = "0.30.0"
[dev-dependencies.opentelemetry-otlp]
version = "0.30.0"
[dev-dependencies.opentelemetry_sdk]
features = ["rt-tokio"]
version = "0.30.0"
[dev-dependencies.redis]
features = ["tokio-comp", "aio", "vector-sets"]
version = "1.0.2"
[dev-dependencies.rmcp]
features = ["client", "macros", "reqwest", "transport-streamable-http-client", "transport-streamable-http-client-reqwest", "transport-streamable-http-server-session", "transport-streamable-http-server", "transport-worker"]
version = "0.13"
[dev-dependencies.serde_path_to_error]
version = "0.1.17"
[dev-dependencies.tokio]
features = ["full"]
version = "1.45.1"
[dev-dependencies.tokio-test]
version = "0.4.4"
[dev-dependencies.tracing-opentelemetry]
version = "0.31.0"
[dev-dependencies.tracing-subscriber]
features = ["env-filter"]
version = "0.3.19"
[[example]]
name = "agent"
path = "examples/agent.rs"
[[example]]
name = "agent_autonomous"
path = "examples/agent_autonomous.rs"
[[example]]
name = "agent_evaluator_optimizer"
path = "examples/agent_evaluator_optimizer.rs"
[[example]]
name = "agent_orchestrator"
path = "examples/agent_orchestrator.rs"
[[example]]
name = "agent_parallelization"
path = "examples/agent_parallelization.rs"
[[example]]
name = "agent_prompt_chaining"
path = "examples/agent_prompt_chaining.rs"
[[example]]
name = "agent_routing"
path = "examples/agent_routing.rs"
[[example]]
name = "agent_stream_chat"
path = "examples/agent_stream_chat.rs"
[[example]]
name = "agent_with_agent_tool"
path = "examples/agent_with_agent_tool.rs"
[[example]]
name = "agent_with_cohere"
path = "examples/agent_with_cohere.rs"
[[example]]
name = "agent_with_context"
path = "examples/agent_with_context.rs"
[[example]]
name = "agent_with_deepseek"
path = "examples/agent_with_deepseek.rs"
[[example]]
name = "agent_with_default_max_depth"
path = "examples/agent_with_default_max_depth.rs"
[[example]]
name = "agent_with_echochambers"
path = "examples/agent_with_echochambers.rs"
[[example]]
name = "agent_with_galadriel"
path = "examples/agent_with_galadriel.rs"
[[example]]
name = "agent_with_grok"
path = "examples/agent_with_grok.rs"
[[example]]
name = "agent_with_groq"
path = "examples/agent_with_groq.rs"
[[example]]
name = "agent_with_huggingface"
path = "examples/agent_with_huggingface.rs"
[[example]]
name = "agent_with_hyperbolic"
path = "examples/agent_with_hyperbolic.rs"
[[example]]
name = "agent_with_loaders"
path = "examples/agent_with_loaders.rs"
[[example]]
name = "agent_with_mira"
path = "examples/agent_with_mira.rs"
[[example]]
name = "agent_with_moonshot"
path = "examples/agent_with_moonshot.rs"
[[example]]
name = "agent_with_ollama"
path = "examples/agent_with_ollama.rs"
[[example]]
name = "agent_with_openrouter"
path = "examples/agent_with_openrouter.rs"
[[example]]
name = "agent_with_together"
path = "examples/agent_with_together.rs"
required-features = ["derive"]
[[example]]
name = "agent_with_tools"
path = "examples/agent_with_tools.rs"
[[example]]
name = "agent_with_tools_otel"
path = "examples/agent_with_tools_otel.rs"
[[example]]
name = "anthropic_agent"
path = "examples/anthropic_agent.rs"
[[example]]
name = "anthropic_streaming"
path = "examples/anthropic_streaming.rs"
[[example]]
name = "anthropic_streaming_with_tools"
path = "examples/anthropic_streaming_with_tools.rs"
[[example]]
name = "anthropic_think_tool"
path = "examples/anthropic_think_tool.rs"
[[example]]
name = "anthropic_think_tool_with_other_tools"
path = "examples/anthropic_think_tool_with_other_tools.rs"
[[example]]
name = "calculator_chatbot"
path = "examples/calculator_chatbot.rs"
[[example]]
name = "chain"
path = "examples/chain.rs"
[[example]]
name = "cohere_streaming"
path = "examples/cohere_streaming.rs"
[[example]]
name = "cohere_streaming_with_tools"
path = "examples/cohere_streaming_with_tools.rs"
[[example]]
name = "complex_agentic_loop_claude"
path = "examples/complex_agentic_loop_claude.rs"
[[example]]
name = "custom_vector_store"
path = "examples/custom_vector_store.rs"
[[example]]
name = "debate"
path = "examples/debate.rs"
[[example]]
name = "deepseek_streaming"
path = "examples/deepseek_streaming.rs"
[[example]]
name = "discord_bot"
path = "examples/discord_bot.rs"
required-features = ["discord-bot"]
[[example]]
name = "enum_dispatch"
path = "examples/enum_dispatch.rs"
[[example]]
name = "extractor"
path = "examples/extractor.rs"
[[example]]
name = "extractor_with_deepseek"
path = "examples/extractor_with_deepseek.rs"
[[example]]
name = "gemini_agent"
path = "examples/gemini_agent.rs"
[[example]]
name = "gemini_embeddings"
path = "examples/gemini_embeddings.rs"
required-features = ["derive"]
[[example]]
name = "gemini_extractor"
path = "examples/gemini_extractor.rs"
[[example]]
name = "gemini_streaming"
path = "examples/gemini_streaming.rs"
[[example]]
name = "gemini_streaming_with_tools"
path = "examples/gemini_streaming_with_tools.rs"
[[example]]
name = "gemini_video_understanding"
path = "examples/gemini_video_understanding.rs"
[[example]]
name = "groq_streaming_reasoning"
path = "examples/groq_streaming_reasoning.rs"
[[example]]
name = "huggingface_image_generation"
path = "examples/huggingface_image_generation.rs"
[[example]]
name = "huggingface_streaming"
path = "examples/huggingface_streaming.rs"
[[example]]
name = "huggingface_subproviders"
path = "examples/huggingface_subproviders.rs"
[[example]]
name = "hyperbolic_audio_generation"
path = "examples/hyperbolic_audio_generation.rs"
required-features = ["audio"]
[[example]]
name = "hyperbolic_image_generation"
path = "examples/hyperbolic_image_generation.rs"
[[example]]
name = "image"
path = "examples/image.rs"
[[example]]
name = "image_ollama"
path = "examples/image_ollama.rs"
[[example]]
name = "loaders"
path = "examples/loaders.rs"
[[example]]
name = "mistral_embeddings"
path = "examples/mistral_embeddings.rs"
required-features = ["derive"]
[[example]]
name = "multi_agent"
path = "examples/multi_agent.rs"
[[example]]
name = "multi_extract"
path = "examples/multi_extract.rs"
[[example]]
name = "multi_turn_agent"
path = "examples/multi_turn_agent.rs"
[[example]]
name = "multi_turn_agent_extended"
path = "examples/multi_turn_agent_extended.rs"
[[example]]
name = "multi_turn_streaming"
path = "examples/multi_turn_streaming.rs"
[[example]]
name = "multi_turn_streaming_gemini"
path = "examples/multi_turn_streaming_gemini.rs"
[[example]]
name = "ollama_streaming"
path = "examples/ollama_streaming.rs"
[[example]]
name = "ollama_streaming_pause_control"
path = "examples/ollama_streaming_pause_control.rs"
[[example]]
name = "ollama_streaming_with_tools"
path = "examples/ollama_streaming_with_tools.rs"
[[example]]
name = "openai_agent_completions_api"
path = "examples/openai_agent_completions_api.rs"
[[example]]
name = "openai_agent_completions_api_otel"
path = "examples/openai_agent_completions_api_otel.rs"
[[example]]
name = "openai_audio_generation"
path = "examples/openai_audio_generation.rs"
required-features = ["audio"]
[[example]]
name = "openai_image_generation"
path = "examples/openai_image_generation.rs"
[[example]]
name = "openai_streaming"
path = "examples/openai_streaming.rs"
[[example]]
name = "openai_streaming_with_tools"
path = "examples/openai_streaming_with_tools.rs"
[[example]]
name = "openai_streaming_with_tools_otel"
path = "examples/openai_streaming_with_tools_otel.rs"
[[example]]
name = "openrouter_streaming_with_tools"
path = "examples/openrouter_streaming_with_tools.rs"
[[example]]
name = "pdf_agent"
path = "examples/pdf_agent.rs"
required-features = ["derive", "pdf"]
[[example]]
name = "perplexity_agent"
path = "examples/perplexity_agent.rs"
[[example]]
name = "rag"
path = "examples/rag.rs"
required-features = ["derive"]
[[example]]
name = "rag_dynamic_tools"
path = "examples/rag_dynamic_tools.rs"
[[example]]
name = "rag_dynamic_tools_multi_turn"
path = "examples/rag_dynamic_tools_multi_turn.rs"
[[example]]
name = "rag_ollama"
path = "examples/rag_ollama.rs"
required-features = ["derive"]
[[example]]
name = "reasoning_loop"
path = "examples/reasoning_loop.rs"
[[example]]
name = "request_hook"
path = "examples/request_hook.rs"
[[example]]
name = "rmcp"
path = "examples/rmcp.rs"
required-features = ["rmcp"]
[[example]]
name = "sentiment_classifier"
path = "examples/sentiment_classifier.rs"
[[example]]
name = "simple_model"
path = "examples/simple_model.rs"
[[example]]
name = "together_embeddings"
path = "examples/together_embeddings.rs"
required-features = ["derive"]
[[example]]
name = "together_streaming"
path = "examples/together_streaming.rs"
[[example]]
name = "together_streaming_with_tools"
path = "examples/together_streaming_with_tools.rs"
[[example]]
name = "transcription"
path = "examples/transcription.rs"
[[example]]
name = "vector_search"
path = "examples/vector_search.rs"
required-features = ["derive"]
[[example]]
name = "vector_search_cohere"
path = "examples/vector_search_cohere.rs"
required-features = ["derive"]
[[example]]
name = "vector_search_ollama"
path = "examples/vector_search_ollama.rs"
[[example]]
name = "voyageai_embeddings"
path = "examples/voyageai_embeddings.rs"
required-features = ["derive"]
[[example]]
name = "xai_streaming"
path = "examples/xai_streaming.rs"
[features]
all = ["derive", "pdf", "rayon"]
audio = []
default = ["reqwest-tls"]
derive = ["dep:rig-derive"]
discord-bot = ["dep:serenity"]
epub = ["dep:epub", "dep:quick-xml"]
experimental = []
image = []
pdf = ["dep:lopdf"]
rayon = ["dep:rayon"]
reqwest-middleware = ["dep:reqwest-middleware"]
reqwest-middleware-rustls = ["reqwest-middleware", "reqwest-middleware/rustls-tls"]
reqwest-rustls = ["reqwest/rustls-tls", "reqwest/charset", "reqwest/http2", "reqwest/macos-system-configuration"]
reqwest-tls = ["reqwest/default"]
rmcp = ["dep:rmcp"]
socks = ["reqwest/socks"]
wasm = ["dep:wasm-bindgen-futures", "futures-timer/wasm-bindgen"]
[lib]
doctest = false
name = "rig"
path = "src/lib.rs"
[lints.clippy]
dbg_macro = "forbid"
todo = "forbid"
unimplemented = "forbid"
[package]
autobenches = false
autobins = false
autoexamples = false
autolib = false
autotests = false
build = false
description = "An opinionated library for building LLM powered applications."
edition = "2024"
license = "MIT"
name = "rig-core"
readme = "README.md"
repository = "https://github.com/0xPlaygrounds/rig"
version = "0.29.0"
[package.metadata.docs.rs]
all-features = true
rustdoc-args = ["--cfg", "docsrs"]
[[test]]
name = "embed_macro"
path = "tests/embed_macro.rs"
required-features = ["derive"]
[[test]]
name = "openai_response_schema"
path = "tests/openai_response_schema.rs"