Docs / built-apps / listSiteAgents

listSiteAgents

utilitysince 0.2.7not for built apps

Client function: list a site's registered agent personas.

import { listSiteAgents } from 'flowstack-sdk'

Non-React client function. GET /api/v1/sites/{siteId}/agents. Each returned SiteAgent carries a usage snippet showing the matching useAgent(...) call for the built app.

Signature

listSiteAgents(credentials, siteId, config?): Promise<ApiResponse<{ site_id: string; agents: SiteAgent[] }>>

Parameters

ParamTypeNotesDescription
credentialsFlowstackCredentialsrequiredThe app owner's credentials (owner-scoped JWT).
siteIdstringrequiredThe site/app id whose personas to list.
configFlowstackClientConfigClient config (baseUrl, tenantId as needed).

Returns

FieldTypeDescription
Promise<ApiResponse<{ site_id: string; agents: SiteAgent[] }>>The personas registered on the site.

Examples

List personas
const res = await listSiteAgents(credentials, siteId);
if (res.ok) for (const a of res.data.agents) console.log(a.name, a.model ?? '(no pinned model)');
WarningOwner/management operation — call it with the app owner's credentials from a builder/dashboard/server context, not from inside the generated app's end-user runtime. builtAppSafe is false.
NoteThe returned SiteAgent does not include system_prompt — that lives on SiteAgentInput (write side) only. Reading back a persona will not give you its prompt.

See also

upsertSiteAgent · updateSiteAgent · SiteAgent · useAgent

Source: src/api/client.ts (Site Ops, P0-156) · Also available in llms-full.txt and registry.json.