Interface: SeatHandle
Defined in: packages/agentos/src/api/runtime/agencyLaunch/sessionSeat.ts:49
A roster member that runs one session of its own; built by sessionSeat and by launch_agency. Its first call
opens the session, and fails when the member already serves a session under the seat's id: generate() rejects and
stream() throws, with the TypeError that names the id (a launch's seat, with that error's name alone).
Extends
Agent.SeatMetadata
Properties
dependsOn?
optionaldependsOn:string[]
Defined in: packages/agentos/src/api/types.ts:1764
Seats this one waits for under the graph strategy. An agency that names no strategy and is not adaptive
runs graph when any seat's dependsOn lists a seat.
Inherited from
description?
optionaldescription:string
Defined in: packages/agentos/src/api/types.ts:1759
What a hierarchical manager reads about the seat; without it the manager sees "General purpose".
Inherited from
seatId
readonlyseatId:string
Defined in: packages/agentos/src/api/runtime/agencyLaunch/sessionSeat.ts:51
The seat's session id on its member.
Methods
close()
close():
Promise<void>
Defined in: packages/agentos/src/api/types.ts:1310
Releases all in-memory state held by this agent.
Returns
Promise<void>
Inherited from
Agent.close
connect()?
optionalconnect():Promise<void>
Defined in: packages/agentos/src/api/types.ts:1329
Connects the agent to configured channel adapters (e.g. Discord, Slack). Present on agency instances only.
Returns
Promise<void>
Inherited from
Agent.connect
export()?
optionalexport(metadata?,options?):unknown
Defined in: packages/agentos/src/api/types.ts:1340
Exports the agent's full configuration as a portable object.
The returned AgentExportConfig (imported from ./agentExport.js)
can be serialized to JSON or YAML and re-imported via importAgent().
Parameters
metadata?
Record<string, unknown>
Optional human-readable metadata to attach.
options?
Redaction options; secrets are redacted unless redactSecrets is false.
redactSecrets?
boolean
Returns
unknown
A portable config object.
Inherited from
Agent.export
exportJSON()?
optionalexportJSON(metadata?,options?):string
Defined in: packages/agentos/src/api/types.ts:1348
Exports the agent's full configuration as a pretty-printed JSON string.
Parameters
metadata?
Record<string, unknown>
Optional human-readable metadata to attach.
options?
Redaction options; secrets are redacted unless redactSecrets is false.
redactSecrets?
boolean
Returns
string
JSON string with 2-space indentation.
Inherited from
Agent.exportJSON
generate()
generate(
prompt,opts?):Promise<unknown>
Defined in: packages/agentos/src/api/types.ts:1281
Generates a single reply (non-streaming).
Parameters
prompt
string
User prompt text.
opts?
Record<string, unknown>
Optional per-call overrides.
Returns
Promise<unknown>
The complete generation result including text, usage, and tool calls.
Inherited from
Agent.generate
listen()?
optionallisten(opts?):Promise<{close: () =>Promise<void>;port:number;url:string; }>
Defined in: packages/agentos/src/api/types.ts:1322
Starts a loopback WebSocket listener on 127.0.0.1 that exchanges JSON text:
{ "text": "..." } in, { "text": "..." } out, one request at a time per
connection. It performs no speech recognition or synthesis; a binary frame
receives an audio_not_supported error and close code 1003. Present on
agency instances created with voice: { enabled: true }. Spoken calls use
VoiceSessionFactory.
Parameters
opts?
Listener options; port 0, the default, picks a free port.
port?
number
Returns
Promise<{ close: () => Promise<void>; port: number; url: string; }>
Resolves to the bound port, URL, and a close() teardown function.
Inherited from
Agent.listen
record()
record():
LaunchSeatRecord
Defined in: packages/agentos/src/api/runtime/agencyLaunch/sessionSeat.ts:53
What the seat did so far; read by the launch for its result.
Returns
session()
session(
id?):unknown
Defined in: packages/agentos/src/api/types.ts:1302
Returns (or creates) a named conversation session.
Parameters
id?
string
Optional session identifier; auto-generated when omitted.
Returns
unknown
The session object for this ID.
Inherited from
Agent.session
stream()
stream(
prompt,opts?):AgentStreamResult
Defined in: packages/agentos/src/api/types.ts:1295
Streams a reply, returning a streaming result surface.
Single agents return a StreamTextResult with textStream, text,
usage, and toolCalls. Agencies return an AgencyStreamResult
with additional agentCalls, parsed, and finalTextStream fields.
Both are assignable to AgentStreamResult.
Parameters
prompt
string
User prompt text.
opts?
Record<string, unknown>
Optional per-call overrides.
Returns
AgentStreamResult
A streaming result with at least textStream, fullStream,
text, and usage.
Inherited from
Agent.stream
usage()
usage(
sessionId?):Promise<unknown>
Defined in: packages/agentos/src/api/types.ts:1308
Returns cumulative usage totals for the agent or a specific session.
Parameters
sessionId?
string
Optional session filter.
Returns
Promise<unknown>
Inherited from
Agent.usage