Equity Strategist

New
Updated

Public-markets analyst agent. Invoked through the standard chat.responses.create entry point with model: EQUITY_MODEL. Equity is query-only — no wallet attachment is required or accepted.

Signature

client.chat.responses.create({
  model: typeof EQUITY_MODEL,
  input: InputItem[],            // { type: 'message', role: 'user' | 'assistant' | 'system', content: string }
  metadata: { user_id: string; session_id: string },
  onStreamEvent?: (event: ChaosSDKMessage) => void,
}): Promise<ChatCreateResponse>

Inputs

  • model: typeof EQUITY_MODEL — required. Import EQUITY_MODEL from @chaoslabs/ai-sdk.
  • input — your conversation messages as InputItem[]: { type: 'message', role: 'user' | 'assistant' | 'system', content: string }[].
  • metadata.user_idrequired.
  • metadata.session_idrequired; reuse the same value across calls for multi-turn correlation.
  • onStreamEvent — optional callback fired for every NDJSON line as it arrives.

Response shape

Returns a ChatCreateResponse with all collected V2 messages. The agent emits four message types:

  • status — lifecycle (processing, done, error).
  • text — interim thinking text.
  • block — structured payload under data.block.
  • metadata — heterogeneous run metadata.

Block types emitted today

The Equity Strategist emits two block discriminators:

  • info{ type: 'info', content: string } — text summary or rationale.
  • table{ type: 'table', title?: string, tableHeaders: string[], tableRows: unknown[][] } — stock comparison grid.

Values in tableRows arrive in wire shape — strings, numbers, or null. Cast or coerce at the consumption site.

[@portabletext/react] Unknown block type "callout", specify a component for it in the `components.types` prop

Conversations

The Conversation class accepts EQUITY_MODEL for multi-turn:

import { Conversation, EQUITY_MODEL } from '@chaoslabs/ai-sdk';
 
const conversation = new Conversation(chaos, {
  model: EQUITY_MODEL,
  userId: 'demo',
});
 
await conversation.send('Is NVDA fairly valued?');
await conversation.send('Compare it with AMD.');

End of stream

A terminal status message with data.status === 'done' signals successful completion. Errors arrive as status with data.status === 'error' or as a typed error envelope.

See also

Was this helpful?