Manta Developers
GitHub
Menu

@manta-eu/horns-server/studio-agent-class

Reference for @manta-eu/horns-server/studio-agent-class in @manta-eu/horns-server 0.2.3.

Classes

HornStudioAgent

Extends

Constructors

Constructor

new HornStudioAgent(): HornStudioAgent

Returns

HornStudioAgent

Inherited from

Think<StudioAgentEnv, StudioAgentState>.constructor

Properties

initialState

initialState: StudioAgentState

maxSteps

maxSteps: number

Methods

beforeStep()

beforeStep(): { activeTools: string[]; system: string; } | undefined

Returns

{ activeTools: string[]; system: string; } | undefined

beforeTurn()

beforeTurn(): Promise<{ instructions: string; messages: ModelMessage[]; tools: {[x: string]: any; }; }>

Returns

Promise<{ instructions: string; messages: ModelMessage[]; tools: {[x: string]: any; }; }>

getModel()

getModel(): LanguageModel

Returns

LanguageModel

onConnect()

onConnect(connection, ctx): void | Promise<void>

Parameters
connection

Connection

ctx

ConnectionContext

Returns

void | Promise<void>

onRequest()

onRequest(request): Promise<Response>

Parameters
request

Request

Returns

Promise<Response>

Type Aliases

StudioAgentEnv

StudioAgentEnv = StudioModelEnv & object

Type Declaration

MANTA_AGENTS_URL?

optional MANTA_AGENTS_URL?: string

UPSTREAM?

optional UPSTREAM?: UpstreamFetcher

VITE_KEYCLOAK_REALM?

optional VITE_KEYCLOAK_REALM?: string


StudioAgentProps

StudioAgentProps = object

Handed over when the connection opens: the worker has already authorized it.

Properties

datastoreId

datastoreId: string

realm

realm: string

Narrowed below: props cross a boundary, so this arrives as whatever the host sent.

session

session: MantaSessionState


StudioAgentState

StudioAgentState = object

Properties

draft

draft: Horn | null

mode

mode: StudioMode


StudioOpening

StudioOpening = object

Properties

datastoreId

datastoreId: string

realm

realm: Realm

session

session: MantaSessionState

Functions

studioOpening()

studioOpening(props): StudioOpening

What the worker handed over, checked. A turn without it is a turn nobody authorized.

Parameters

props

StudioAgentProps | undefined

Returns

StudioOpening