Skip to main content

Module key_route

Module key_route 

Source
Expand description

A container turn on the model gateway: a model route, or an API-key account (model_gateway::catalog::KEY_ROUTE_ID). The container is given only the gateway’s address and a token for that one agent (and account); a key stays in the keychain. At the start of each turn this module makes that token current (a changed address or account, or a container made again, gets a new one and the earlier ends; a turn that overlaps another on the same grant shares its token) and ties it to the container’s own address on the agents network, so the gateway accepts it from that container and no other:

  • Linux: srv listens on the network’s gateway address and sees each container’s own (listener::check_gateway).
  • Docker Desktop (macOS, Windows): every container reaches srv from one address, so the container is pointed at a small forwarder on the agents network (gateway_fwd) which sees the container’s own address and says it to srv in a stamp (agentmux_common::gateway_stamp). With no forwarder there is no way in, and the turn is refused.