agnt 0.1.0

A dense, sync-first Rust agent engine — multi-backend inference, parallel tool dispatch, SQLite persistence, streaming
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use std::sync::{Arc, OnceLock};

static AGENT: OnceLock<ureq::Agent> = OnceLock::new();

/// Single shared ureq Agent wired to a native-tls connector so HTTPS
/// verifies against the system CA store (not the baked-in webpki-roots).
pub fn agent() -> &'static ureq::Agent {
    AGENT.get_or_init(|| {
        let connector = native_tls::TlsConnector::new()
            .expect("native-tls connector");
        ureq::AgentBuilder::new()
            .tls_connector(Arc::new(connector))
            .build()
    })
}