Equity Strategist
NewUpdated
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>Copy code
Open in Cursor
Open in VS Code
Open in v0
Open in Claude
Open in ChatGPT
Inputs
model: typeof EQUITY_MODEL— required. ImportEQUITY_MODELfrom@chaoslabs/ai-sdk.input— your conversation messages asInputItem[]:{ type: 'message', role: 'user' | 'assistant' | 'system', content: string }[].metadata.user_id— required.metadata.session_id— required; 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 underdata.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.
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.');Copy code
Open in Cursor
Open in VS Code
Open in v0
Open in Claude
Open in ChatGPT
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?