Set resource caps and inference when creating an agent
POST /api/agents takes optional limits and inference objects, checked by the same rules as the two PUT routes before anything is queued and stored ahead of the job graph. The create form gets collapsed sections for both, reusing the fields of the detail-panel editors.
This commit is contained in:
parent
aaac754356
commit
e36a15de91
8 changed files with 389 additions and 100 deletions
|
|
@ -296,6 +296,18 @@ row shows the new value before the agent runs under it. The panel reads
|
|||
`GET /api/agents/{agent}/limits`. [hivectl](../tools/hivectl.md#per-agent-resource-limits)
|
||||
sets the hive's own limits.
|
||||
|
||||
### Settings at creation
|
||||
|
||||
The **+ agent** dialog has two collapsed sections, **resource caps** and
|
||||
**inference**, with the same fields as the detail panel's editors. Leave them
|
||||
closed or empty and the request is the plain name and hive. Fill them and
|
||||
`POST /api/agents` carries them as optional `limits` and `inference` objects,
|
||||
the same shapes the two `PUT` routes take. The controller checks them with the
|
||||
`PUT` rules before it queues anything, so a bad value gets a refusal with its
|
||||
reason and creates no agent. It stores them ahead of the job graph, so they
|
||||
are in place before the agent first runs. Creating a name that already exists with no settings
|
||||
leaves any stored ones alone.
|
||||
|
||||
### Linking external accounts
|
||||
|
||||
Each agent on `/agents` opens three dialogs that write a credential for it
|
||||
|
|
|
|||
Loading…
Reference in a new issue