Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

feat(tinyhumans): add tinyhumans crate with host registration

Steven Enamakel6d9a3eed9f93
diff --git a/crates/openhuman-embed/src/host_internals.rs b/crates/openhuman-embed/src/host_internals.rs
index 0771bb35d8..b36b040c54 100644
--- a/crates/openhuman-embed/src/host_internals.rs
+++ b/crates/openhuman-embed/src/host_internals.rs
@@ -236,6 +236,9 @@ pub mod security {
list_provider_credentials, store_provider_credentials,
};
}
+ pub mod api_key {
+ pub use openhuman_core::security::credentials::api_key::store_api_key;
+ }
pub mod session_support {
pub use openhuman_core::security::credentials::session_support::{
build_session_state, current_session_is_local, resolve_backend_credential,
diff --git a/crates/openhuman-tinyhumans/Cargo.toml b/crates/openhuman-tinyhumans/Cargo.toml
index 22e56d535f..4ae2ee8b1e 100644
--- a/crates/openhuman-tinyhumans/Cargo.toml
+++ b/crates/openhuman-tinyhumans/Cargo.toml
@@ -25,7 +25,7 @@ documents = ["openhuman-embed/documents"]
hosting = ["openhuman-embed/hosting"]
tinymemes = ["openhuman-embed/tinymemes"]
modules = ["openhuman-embed/modules"]
-voice = ["openhuman-embed/voice"]
+voice = ["openhuman-embed/voice", "dep:tinyagents-live"]
web3 = ["openhuman-embed/web3"]
# Storage drivers for `[storage] url` (see the core `storage` domain).
storage-sqlite = ["openhuman-embed/storage-sqlite"]
@@ -79,6 +79,10 @@ reqwest = { version = "0.12", default-features = false, features = ["json", "mul
serde = { version = "1", features = ["derive"] }
serde_json = "1"
thiserror = "2"
+# Hosted speech (`voice` feature): the live-provider types the hosted Gemini /
+# ElevenLabs sessions build, and the transcription / reply-speech wire helpers.
+tinyagents-live = { path = "../../vendor/tinyagents/crates/tinyagents-live", optional = true }
+tinyinference-voice = { path = "../../vendor/tinyagents/vendor/tinyinference/crates/tinyinference-voice", features = ["schemars"] }
tinyinference-providers = { path = "../../vendor/tinyagents/vendor/tinyinference/crates/tinyinference-providers" }
urlencoding = "2.1"
tracing = "0.1"
diff --git a/crates/openhuman-tinyhumans/src/lib.rs b/crates/openhuman-tinyhumans/src/lib.rs
index 6f4cc3e9a4..e3746cb5b4 100644
--- a/crates/openhuman-tinyhumans/src/lib.rs
+++ b/crates/openhuman-tinyhumans/src/lib.rs
@@ -89,7 +89,8 @@ mod register;
mod runtime;
pub mod session;
pub mod transport;
-pub(crate) mod voice;
+#[cfg(feature = "voice")]
+pub mod voice;
pub use backend::{product_identity, set_product_identity, ProductIdentity};
pub use hosted::extension as hosted_controllers;
diff --git a/crates/openhuman-tinyhumans/src/register.rs b/crates/openhuman-tinyhumans/src/register.rs
index a90c4bdd57..74d08650f9 100644
--- a/crates/openhuman-tinyhumans/src/register.rs
+++ b/crates/openhuman-tinyhumans/src/register.rs
@@ -9,13 +9,16 @@
//! second `install` is harmless.
use crate::install::InstallOptions;
-use crate::{channels, client, inference, integrations, memory, voice};
+#[cfg(feature = "voice")]
+use crate::voice;
+use crate::{channels, client, inference, integrations, memory};
/// Registers every area's hooks with the core.
pub(crate) fn register_all(options: &InstallOptions) {
log::debug!("[tinyhumans] register_all: registering core hooks");
client::register(options);
integrations::register(options);
+ #[cfg(feature = "voice")]
voice::register(options);
inference::register(options);
channels::register(options);