Skip to main content

Crate agent_first_http

Crate agent_first_http 

Source
Expand description

afhttp — URL acquisition for AI agents.

The library exposes the same surface as the CLI, in-process. It speaks CDP/HTTP to an afhttp host; it does not embed a browser engine. Everything that physically requires Chromium (launch, profile locking, takeover panel) lives behind the host feature.

Pure SDK consumers depend with default-features = false, features = ["sdk"] and connect to an externally started afhttp host. The Client::inline_ephemeral convenience that spawns a private host in-process is only available with the host feature.

Re-exports§

pub use sdk::client::Client;
pub use shared::error::Error;
pub use shared::error::ErrorCode;

Modules§

cli
CLI layer. Resolves argv against the closed-world registry, calls into the SDK, and formats output.
host
Browser host: launches Chromium, holds the profile lock, runs the listener that exposes CDP, /health, /capabilities, and the takeover panel. Behind the host feature so SDK-only consumers don’t link chromiumoxide.
sdk
Client-side SDK. Never imports chromiumoxide; speaks CDP over raw WebSocket and HTTP over reqwest. Everything browser-dependent goes through an afhttp host endpoint.
shared
Feature-agnostic types: error enum, ids, artifact tokens, the protocol AFDATA adapter, redaction list, and duration parsing. Compiles in both sdk-only and host builds; never touches chromiumoxide or axum.