Skip to content

Agent Studio ​

Agent Studio is the agent module of the HPD AI Platform shell. Its Agent, Harness, and Provider pages read and change the host's agent runtime through the public agent client (@hpd-research/hpd-agent-client), against the same hosted routes any client uses. Studio serves no agent, harness, or function read of its own.

Setup ​

Add the Studio module to the platform host, and map the agent API Studio reads:

csharp
using HPD.Agent;
using HPD.Agent.AspNetCore;
using HPD.Agent.Providers.OpenAI;

var assistant = new AgentConfig()
    .WithOpenAI(model: "gpt-5-mini")
    .WithInstructions("You are a concise helpful assistant.");

builder.Services.AddHPDAgentRuntime(runtime => runtime
    .AddAgent("assistant", assistant)
    .WithFileSessionStore("App_Data/sessions")
    .WithAgentStore("App_Data/agents")
    .WithTracing());

builder.Services.AddHPDAIPlatform()
    .AddAgentStudio();

var app = builder.Build();

app.MapHPDAgent(options => options.RoutePrefix = "/api/hpd").RequireStudioAuthorization();

MapHPDAgent(...) maps the agent definition routes (/agents), the capability route, and the composition routes (/composition/*) Studio reads. WithAgentStore(...) gives stored agents a durable home; without it, agents created in Studio live in memory until the host stops.

Pages ​

PageReads
Agentsclient.agents.list(): code and stored agents together, each with its source
Agentthe chat, the agent's runs, and its definition: the portable settings and, for a code agent, its process-local parts
Create agentsaves a stored agent with client.agents.create
Harnesses, harness, functionclient.composition.harnesses(); "used by" lists the agents whose definition references the harness
Providersclient.composition.providers(): each provider's client families, models, and the secret names it reads

Code And Stored Agents ​

A code agent is registered by the application with AddAgent(...) in the runtime recipe, and is read-only. Its page shows its portable settings and lists each process-local part (kind, path, description, and details), such as a chat client instance or a native function. It has no edit or delete, and says why.

Duplicate as stored agent creates a stored agent from a code agent's portable settings under an id you choose, and lists the process-local parts the copy does not carry. The copy is an ordinary stored agent: it can be edited and deleted.

A stored agent's page edits it with client.agents.update, sending every portable field the editor holds and clearing the optional sections it removed, and deletes it with client.agents.delete behind an inline confirmation. A refused definition comes back as a 400 with errors keyed by code, each naming its definition path; the editor shows each error on the field or harness row it names and counts errors per section. A 409 for a code agent's id or a taken id is shown on the id. See Stored Agent Definitions for the codes.

Harnesses And Functions ​

The Harnesses page lists the runtime's composition: every harness a definition can reference, by its exact activation identity, with the functions it declares. A harness or function page opens only for an identity the runtime has; a function page is addressed by the harness's activation identity and the declared function name.

"Used by" counts the agents whose definition references the harness. A harness that a setting implies, such as plan mode, goals, content retrieval, or user questions, shows on its page when an agent built with that setting is picked. A detail page calls client.agents.capabilities(id) only when it opens, for the agent it shows the harness built for, and shows the function's actions from those capabilities.

Chat ​

The chat composer has a provider and model picker. A choice is sent as runConfig.clients with each message while it is selected; the agent's definition does not change. A code agent whose chat client is set in code keeps that client, because a process-local client replaces a provider client, so the picker is offered only for agents whose chat client comes from a provider.

The Runs panel labels each run with the models it called, read from ThreadExecutionDto.models.

Built for production .NET agent applications.