Allow an existing Answer account to be operated by an AI agent (personal access token, minimal scope)
还没有人认领这个 Issue。
评估
- 难度
- 5/5
- 预计耗时
- 一周以上
- 新手友好度
- 38/100
- Issue 类型
- 功能
- 描述清晰度
- 基本清楚
- 活跃度
- 冷清
- 技术栈
- go
调研方向
首先定位现有的 session 或 API-key 身份验证路径,以及 account-settings 和 Admin → Advanced → Security 的入口点。在实现之前定义 token 的作用域和生命周期,然后验证基于 curl 的问题、答案和投票请求、撤销以及实例范围内的禁用是否会按规范使访问失效。
由索引模型根据 Issue 内容生成。
描述
Background / Motivation
Users increasingly want their AI agents (e.g. Claude Code, Cursor, etc.) to act on their behalf on an Answer instance, asking questions, posting answers, and voting, using their own existing account. Today Answer only supports browser/cookie-based sessions, so there is no way for an agent to authenticate as "me" and perform these actions programmatically.
Stack Overflow's agents.stackoverflow.com is a related effort in this space, but it introduces a much larger system: a separate agent identity, reputation/trust scores, new content types such as Blueprints and Playbooks, and review gates. This proposal intentionally does not aim to replicate that. The goal here is the smallest possible change: let an agent drive an existing account through a token, with the same permissions and limits the account already has on the web.
Proposed minimal scope
Add a personal access token (or extend the existing API key mechanism, if one already exists) that a user can generate from their own account settings. Requests authenticated with this token act exactly as if the account holder performed the action via the web UI: same permissions, same rate limits, same anti-spam and moderation rules. It should cover the core write actions needed for basic participation: creating a question, posting an answer, and voting. Token management (create, view, revoke) lives in existing account settings, with no new roles or approval workflow. This capability is gated by a toggle under Admin -> Advanced -> Security, for example "Enable agent access tokens", which defaults to off. When disabled, the token-generation option is hidden from account settings and any previously issued tokens stop working, so an instance owner decides whether to expose this surface at all.
Explicit non-goals
This proposal does not introduce an agent-specific identity, badge, or "posted by an agent" marker. It does not add a new reputation or trust-score mechanism, and does not add new content types such as Blueprint or Playbook style posts. It does not change existing moderation, rate-limiting, or anti-abuse behavior; token-based actions should be constrained the same way web actions already are.
Acceptance criteria
A logged-in user can generate a personal access token from account settings. Using that token, for example via curl or an HTTP client, a caller can create a question, post an answer, and vote, with results identical to doing so via the web UI. The user can revoke the token at any time, immediately invalidating it. An instance admin can find the "Enable agent access tokens" toggle under Admin -> Advanced -> Security; turning it off immediately hides the token UI from users and invalidates existing tokens.
Open questions
Should token scope be all-or-nothing, or split into read/write (or per-action) permissions from the start? Should there be a way to visually distinguish agent-originated posts from human-originated ones in the UI? Neither is required for a first version.
- 主要语言
- Go
- 星标
- 15.7k
- 派生
- 1.4k
- 平均合并
- 1 天 20 小时
- 30 天内合并 PR
- 6
贡献指南
这个仓库没有索引到贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
apache/answer 的其他 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 65/100
-
Hardening: cap the invite_user list size in UpdateQuestionInviteUser to bound notification fan-out 未关闭
难度 2/5 1-3 小时 新手友好度 72/100
-
难度 2/5 1-3 小时 新手友好度 84/100
-
难度 2/5 1-3 小时 新手友好度 88/100
-
Gravatar hash is computed from the un-lowercased email, so mixed-case accounts render an identicon 未关闭
难度 2/5 1-3 小时 新手友好度 85/100
相似的 Issue
-
难度 1/5 1 小时以内 新手友好度 60/100
github/gh-aw-mcpg#13748 ·
-
agentic-workflows
难度 2/5 1-3 小时 新手友好度 65/100
-
needs-triage
难度 2/5 1-3 小时 新手友好度 75/100
-
难度 2/5 1-3 小时 新手友好度 65/100
-
难度 2/5 1-3 小时 新手友好度 75/100
googleapis/librarian#7670 · 2 条评论 ·