Create an agent
An agent user wants to create a new agent by naming it and choosing its provider, model and standing instruction.

As an agent user, I want to create an agent with a name, a provider, a model and a standing instruction, so that I have an assistant of my own to talk to from my phone.

Situation

I have an identity, my agent server is "Online" and at least one model provider is configured. I am on the Agents list.

What I do

    Tap the add button in the bar, or "Create an agent" when the list is empty.

    Type a name.

    Check the provider that is ticked, or tap another.

    Check the model that is ticked, or tap another.

    Read the system prompt and change it if I want.

    Tap "Create".

What I should see

    The New agent sheet rises with "Cancel", the title "New agent" and "Create".

    Sections in this order: "Name", "Provider", "Model", "System prompt".

    The name field is empty with the hint "Agent name".

    "Provider" lists my configured providers. The first one is already ticked with a check mark in the brand colour.

    "Model" lists the recommended chat models of the chosen provider. Once they arrive, a default is already ticked.

    Tapping another provider moves the tick, clears the model and loads that provider's models.

    The system prompt starts as "You are a helpful assistant working inside Seed Hypermedia." with the note "The standing instruction for every conversation." under it.

    "Create" is dimmed until there is a name, a provider and a model, and while the agent is being created.

    After "Create" the sheet is replaced by the new agent's detail screen, titled with the name I typed, with "New conversation" ready to tap.

    The new agent is in "Your agents" when I go back.

    "Cancel" closes the sheet and creates nothing.

    The next time I open the sheet the name is empty again. A prompt I edited is still there.

When something goes wrong

    With no provider configured the sheet says a model provider must be configured first and offers a row "Model providers". "Create" stays dimmed. I tap the row, add a provider and come back.

    If the provider's models cannot be listed, the reason is shown in red under "Model" and nothing can be ticked. I check the provider's key or pick another provider.

    If the server refuses to create the agent, the sheet stays open with the reason in red at the bottom and everything I entered is kept. I tap "Create" again.

Not included

    I cannot choose the agent's tools. Every agent made on the phone gets the same fixed set (current limits).

    An agent cannot be edited, renamed or deleted on the phone after it is created.

    Only the recommended models are listed, not every model the provider has.

Trace

Story US-AGENT-04, status Shipped. These links are kept in step with the traceability matrix and with the "User stories" section of every page listed here.

Design

Page

Part it plays

New agent sheet

The sheet: name, provider, model, system prompt

Provider and model rows

Provider and model radio rows with the check mark

Agents list

The add button and Create an agent row that open the sheet

Agent detail

Where Create lands

Providers sheet

Where the no provider notice sends the person

Forms and inputs

Sheet with Cancel and a confirming action, defaults chosen

Every form

This form among all forms

Every bar button

Cancel and Create in the bar

Stacks, pushes and sheets

Why this is a sheet and why it is replaced by the agent

Roles, headings and labels

Radio role on the choice rows

Honest state: loading, failure and empty

The blocker names its fix

Representative strings

The notice, footer and error wording

Implementation

Page

Part it plays

Agents: screens and components

AgentCreateScreen

Agents: providers, models and tool summaries

Model curation, the default model and model labels

Agents: reads, commands and the clock

agentsModels and the create-agent command with its fixed tool list

Agents: signed action envelope and endpoints

The signed CreateAgent action

Agents: chat with Seed agents

Package overview and known limits

Agents server

ListProviderModels and CreateAgent

Root declarations: Activity and Agents

agentsName, agentsPrompt, agentsProvider, agentsModel, agentsModelData and the form tasks

Navigation and routes

The new-agent route and the replace to the agent

State, refresh and stale-reply patterns

Mutation then refresh of the list

Contract UI tests

The UI test of validated creation

Mock agents server

The mock's CreateAgent and model list

Bun unit tests

Unit test of model choices

Current limits and known gaps

A new agent is created with a fixed tool list

Code

File

What

agents.contract L635-717

AgentCreateScreen

agents.contract L48-55

AgentModel and AgentModels shapes

app.contract L45-45

new-agent route

app.contract L153-156

agentsName, agentsPrompt, agentsProvider, agentsModel

app.contract L172-172

agentsModelData resource

app.contract L193-196

agentsNewForm and agentsDefaultModel tasks

app.contract L488-506

agentsInitCreate to agentsCreate

app.contract L525-531

agentsAfterChange: replace the sheet with the new agent

app.contract L821-839

AgentCreateScreen wiring

src/agents/sources.ts L245-260

agentsModels

src/agents/sources.ts L473-485

create-agent command with the fixed tool list

src/agents/model-utils.ts L94-175

curateProviderModels, pickDefaultProviderModel, modelLabel

Tests

File

What it checks

agents.test.contract

agents list, configuration, providers and validated creation

src/agents/__tests__/agents.test.ts

model choices retain chat aliases and the RN preferred defaults

src/agents/__tests__/parity.test.ts

the merged identity store signs agent commands through the production signer path

Delivery

Delivered by #1470.

Do you like what you are reading? Subscribe to receive updates.

Unsubscribe anytime

Attributes
Epic
Agents
name
Create an agent
Story
US-AGENT-04
Status
Shipped
summary
An agent user wants to create a new agent by naming it and choosing its provider, model and standing instruction.