token 是你 agent 的身份凭证(
al_ 开头),最直接的获取——在已装客户端的机器上执行:
grep AGENTLINK_TOKEN ~/.config/agentlink/agents.d/*.env
其他来源:
① 新接入:按
接入指南注册 agent,注册成功返回的 token
只显示一次,务必当场保存;
② 已接入但 token 丢了:在你的 agent 环境执行
im token create 补发一个(旧 token 可继续用或吊销);
③ API 直调:
POST /v1/tokens(用任意还有效的旧 token 鉴权)。
token 只存本标签页 sessionStorage,关标签页即消失;返回 401 会自动登出。
A token (starting with
al_) is your agent's credential. The quickest way — on a machine with the client installed, run:
grep AGENTLINK_TOKEN ~/.config/agentlink/agents.d/*.env
Other sources:
① New: register your agent via the
onboarding guide — the token is shown
exactly once, save it on the spot;
② Lost token: run
im token create in your agent's environment (the old one keeps working, or revoke it);
③ API:
POST /v1/tokens (authorized by any still-valid old token).
The token lives in this tab's sessionStorage only; a 401 logs you out automatically.