The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.
Rust agent-orchestrationai-agentsai-assistantdesktopllmlocal-firstmcppersonal-aiprivacyrustsecond-braintauri
chore(AGENTS.md): update backend API documentation to reflect recent refactoring
Steven Enamakela489491d6d47
diff --git a/AGENTS.md b/AGENTS.mdindex b1233d2305..bda303c7bc 100644--- a/AGENTS.md+++ b/AGENTS.md@@ -464,7 +464,7 @@ module release before migrating a host call to it.## Backend APIThe core does not depend on `tinyhumans-sdk`. It reaches the hosted backend-only through the port `crates/openhuman-core/src/api/transport/`+only through the port `crates/openhuman-core/src/backend/transport/`(`BackendTransport`, `BackendRequest`, `BackendTransportError`); the SDK-backedimplementation is `crates/openhuman-tinyhumans` (`SdkBackendTransport`), whichsits above `openhuman-embed` and is installed once per process@@ -478,34 +478,48 @@ openhuman -i tinyhumans-sdk` must stay empty). Every host that boots a core(`crates/openhuman-app/src/main.rs` and `lib.rs::run`,`crates/openhuman-tui/src/runner.rs`, `crates/openhuman-cli/src/main.rs`)calls `openhuman_tinyhumans::install` first; it also registers the hosted RPC-proxies (`billing`, `team`, `referral`, `announcements` —-`crates/openhuman-tinyhumans/src/hosted/`) into the core's controller-registry through `core::all::register_controller_extension`+proxies (`billing`, `team`, `referral`, `announcements`, `webhooks`,+`channel_link`, `oauth` — `crates/openhuman-tinyhumans/src/hosted/`) into the+core's controller registry through `core::all::register_controller_extension`(`DomainGroup::Hosted`). New backend-only proxy domains belong there, not inthe core.Add missing backend routes to the vendored SDK (its unexposed-route registryis the route policy the transport enforces) and name them from the core;-do not recreate route implementations in `crates/openhuman-core/src/api/`.--`crates/openhuman-core/src/api/` owns OpenHuman session-token lookup, base URL-selection, attribution headers and client profiles (`headers.rs`), and error-classification. Authenticated `BackendOAuthClient` requests go through-`authed_json`, whose private `finish_authed_json`-(`crates/openhuman-core/src/api/rest.rs`) classifies transient transport-failures and maps 401/404 responses to typed `BackendApiError` variants;-`IntegrationClient::map_transport_error`+do not recreate route implementations in `crates/openhuman-core/src/backend/`.++The core holds no hosted URL, default, environment variable, header policy or+product identity of its own any more — it only *asks* the installed+transport, through `crates/openhuman-core/src/backend/mod.rs`'s+`backend::base_url`, `backend::inference_base_url`, `backend::product_identity`+and `backend::attribution_headers`. That state now lives with the transport+implementation, in `crates/openhuman-tinyhumans/src/backend/`: `url.rs`+(defaults, `BACKEND_URL`/`VITE_BACKEND_URL` overrides, the local-AI/inference+guard), `headers.rs` (attribution headers and per-profile `reqwest` clients)+and `product.rs` (`ProductIdentity`, re-exported at+`openhuman_tinyhumans::{product_identity, set_product_identity,+ProductIdentity}`).++`crates/openhuman-core/src/backend/client.rs` owns the authenticated JSON+client (`BackendClient`, renamed from `BackendOAuthClient`) and error+classification. Authenticated `BackendClient` requests go through+`authed_json`, whose private `finish_authed_json` classifies transient+transport failures and maps 401/404 responses to typed `BackendApiError`+variants; `IntegrationClient::map_transport_error`(`crates/openhuman-core/src/integrations/client/errors.rs`) plays the samerole for integrations. Route new backend calls through those helpers insteadof matching `BackendTransportError` by hand.-Every TinyHumans backend request must carry a sanitized `x-sdk-name`:+Every TinyHumans backend request must carry a sanitized `x-sdk-name`, now+stamped by the installed transport's `attribution_headers` (called through+`backend::attribution_headers`):-- `BackendOAuthClient`+- `BackendClient`- `IntegrationClient`, except redirected file downloads- the host session owner's `POST /auth/login-token/consume` and`GET /auth/me` (`openhuman_tinyhumans::session`, through `ClientHeaders`)-- the agent Langfuse ingestion request+- the agent's Langfuse and OTLP ingestion push+- the managed model catalog listingSet `ProductIdentity` once during startup before building clients. Do not addthis header to third-party endpoints, MCP servers, BYOK inference endpoints, or