[package]
edition = "2021"
rust-version = "1.86"
name = "yoagent"
version = "0.22.0"
authors = ["Yuanhao <yuanhao@yolog.dev>"]
build = false
exclude = [
"docs/images/*",
"docs/theme/*",
".github/*",
"scripts/*",
]
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Simple, effective agent loop with tool execution and event streaming"
homepage = "https://yologdev.github.io/yoagent/"
documentation = "https://docs.rs/yoagent"
readme = "README.md"
keywords = [
"agent",
"llm",
"ai",
"anthropic",
"openai",
]
categories = [
"api-bindings",
"asynchronous",
"development-tools",
"web-programming::http-client",
"network-programming",
]
license = "MIT"
repository = "https://github.com/yologdev/yoagent"
resolver = "3"
[package.metadata.docs.rs]
all-features = true
rustdoc-args = [
"--cfg",
"docsrs",
]
[features]
decision = []
gasp = ["dep:yoagent-state"]
openapi = [
"dep:openapiv3",
"dep:serde_yaml_ng",
"reqwest/query",
]
[lib]
name = "yoagent"
path = "src/lib.rs"
[[example]]
name = "basic"
path = "examples/basic.rs"
[[example]]
name = "callbacks"
path = "examples/callbacks.rs"
[[example]]
name = "cli"
path = "examples/cli.rs"
[[example]]
name = "code_review"
path = "examples/code_review.rs"
[[example]]
name = "compaction_sweep"
path = "examples/compaction_sweep/main.rs"
[[example]]
name = "decision"
path = "examples/decision.rs"
required-features = ["decision"]
[[example]]
name = "gasp_emit"
path = "examples/gasp_emit.rs"
required-features = ["gasp"]
[[example]]
name = "headroom_sweep"
path = "examples/headroom_sweep.rs"
[[example]]
name = "llm_compaction_live"
path = "examples/llm_compaction_live.rs"
required-features = ["gasp"]
[[example]]
name = "long_horizon"
path = "examples/long_horizon.rs"
[[example]]
name = "persistence"
path = "examples/persistence.rs"
[[example]]
name = "release_smoke"
path = "examples/release_smoke.rs"
[[example]]
name = "rlm"
path = "examples/rlm.rs"
[[example]]
name = "shared_state"
path = "examples/shared_state.rs"
[[example]]
name = "sub_agent"
path = "examples/sub_agent.rs"
[[example]]
name = "telemetry"
path = "examples/telemetry.rs"
[[test]]
name = "agent_loop_test"
path = "tests/agent_loop_test.rs"
[[test]]
name = "agent_test"
path = "tests/agent_test.rs"
[[test]]
name = "anthropic_stream_test"
path = "tests/anthropic_stream_test.rs"
[[test]]
name = "azure_openai_test"
path = "tests/azure_openai_test.rs"
[[test]]
name = "bedrock_auth_test"
path = "tests/bedrock_auth_test.rs"
[[test]]
name = "bedrock_stream_test"
path = "tests/bedrock_stream_test.rs"
[[test]]
name = "context_cache_test"
path = "tests/context_cache_test.rs"
[[test]]
name = "decision_agent_test"
path = "tests/decision_agent_test.rs"
required-features = ["decision"]
[[test]]
name = "decision_calibrate_test"
path = "tests/decision_calibrate_test.rs"
required-features = ["decision"]
[[test]]
name = "decision_env_test"
path = "tests/decision_env_test.rs"
required-features = ["decision"]
[[test]]
name = "decision_fallback_test"
path = "tests/decision_fallback_test.rs"
required-features = ["decision"]
[[test]]
name = "decision_guard_test"
path = "tests/decision_guard_test.rs"
required-features = ["decision"]
[[test]]
name = "decision_live"
path = "tests/decision_live.rs"
required-features = ["decision"]
[[test]]
name = "decision_logprobs_test"
path = "tests/decision_logprobs_test.rs"
required-features = ["decision"]
[[test]]
name = "decision_test"
path = "tests/decision_test.rs"
required-features = ["decision"]
[[test]]
name = "gasp_test"
path = "tests/gasp_test.rs"
[[test]]
name = "google_stream_test"
path = "tests/google_stream_test.rs"
[[test]]
name = "hooks_test"
path = "tests/hooks_test.rs"
[[test]]
name = "integration_anthropic"
path = "tests/integration_anthropic.rs"
[[test]]
name = "integration_gemini"
path = "tests/integration_gemini.rs"
[[test]]
name = "integration_opencode"
path = "tests/integration_opencode.rs"
[[test]]
name = "mcp_http_chunking_test"
path = "tests/mcp_http_chunking_test.rs"
[[test]]
name = "mcp_http_streaming_test"
path = "tests/mcp_http_streaming_test.rs"
[[test]]
name = "mcp_http_transport_test"
path = "tests/mcp_http_transport_test.rs"
[[test]]
name = "openai_compat_stream_test"
path = "tests/openai_compat_stream_test.rs"
[[test]]
name = "openapi_test"
path = "tests/openapi_test.rs"
[[test]]
name = "prefix_cache_harness"
path = "tests/prefix_cache_harness.rs"
[[test]]
name = "preset_prices_test"
path = "tests/preset_prices_test.rs"
[[test]]
name = "price_audit"
path = "tests/price_audit.rs"
[[test]]
name = "price_env_bad_test"
path = "tests/price_env_bad_test.rs"
[[test]]
name = "price_env_test"
path = "tests/price_env_test.rs"
[[test]]
name = "price_env_unset_test"
path = "tests/price_env_unset_test.rs"
[[test]]
name = "price_explicit_cost_test"
path = "tests/price_explicit_cost_test.rs"
[[test]]
name = "price_fetch_test"
path = "tests/price_fetch_test.rs"
[[test]]
name = "price_override_test"
path = "tests/price_override_test.rs"
[[test]]
name = "provider_metadata_guard"
path = "tests/provider_metadata_guard.rs"
[[test]]
name = "reasoning_effort_test"
path = "tests/reasoning_effort_test.rs"
[[test]]
name = "refusal_loop_test"
path = "tests/refusal_loop_test.rs"
[[test]]
name = "responses_rebill_test"
path = "tests/responses_rebill_test.rs"
[[test]]
name = "responses_stream_test"
path = "tests/responses_stream_test.rs"
[[test]]
name = "serialization_test"
path = "tests/serialization_test.rs"
[[test]]
name = "session_test"
path = "tests/session_test.rs"
[[test]]
name = "shared_state_test"
path = "tests/shared_state_test.rs"
[[test]]
name = "sub_agent_test"
path = "tests/sub_agent_test.rs"
[[test]]
name = "telemetry_test"
path = "tests/telemetry_test.rs"
[[test]]
name = "tools_test"
path = "tests/tools_test.rs"
[dependencies.async-trait]
version = "0.1"
[dependencies.base64]
version = "0.22"
[dependencies.futures]
version = "0.3"
[dependencies.hmac]
version = "0.13"
[dependencies.openapiv3]
version = "2"
optional = true
[dependencies.rand]
version = "0.10.0"
[dependencies.reqwest]
version = "0.13"
features = [
"json",
"stream",
"socks",
]
[dependencies.reqwest-eventsource]
version = "0.6"
package = "kameleoon-reqwest-eventsource"
[dependencies.serde]
version = "1.0.177"
features = ["derive"]
[dependencies.serde_json]
version = "1"
[dependencies.serde_yaml_ng]
version = "0.10"
optional = true
[dependencies.sha2]
version = "0.11"
default-features = false
[dependencies.thiserror]
version = "2"
[dependencies.tokio]
version = "1"
features = [
"rt",
"sync",
"fs",
"macros",
"process",
"time",
"io-util",
]
[dependencies.tokio-stream]
version = "0.1"
[dependencies.tokio-util]
version = "0.7"
[dependencies.tracing]
version = "0.1"
[dependencies.uuid]
version = "1"
features = ["v4"]
[dependencies.yoagent-state]
version = "0.5"
optional = true
[dev-dependencies.tempfile]
version = "3"
[dev-dependencies.tokio]
version = "1"
features = [
"full",
"test-util",
]
[dev-dependencies.tracing-subscriber]
version = "0.3"
features = [
"registry",
"fmt",
]
[dev-dependencies.wiremock]
version = "0.6"
[profile.mutants]
opt-level = 1
debug = 0
inherits = "test"