Equity Strategist
NewPublic-markets analyst agent. Read-only research; the agent does not emit transaction action blocks. Invoked through chat.responses.create with model: EQUITY_MODEL.
Stocks-only. Attach a portfolio by passing stock_positions (structured stock holdings) under metadata to unlock the portfolio toolset: concentration, VaR, beta, fundamentals, correlation, stress test, optimization. wallets and wallet_context_override are rejected on this surface — use WALLET_MODEL for on-chain crypto flows.
Signature
client.chat.responses.create({
model: typeof EQUITY_MODEL,
input: InputItem[], // { type: 'message', role, content }
metadata: {
user_id: string;
session_id: string;
stock_positions?: StockPosition[];
portfolio_id?: string;
sources_context?: SourceContext[];
context_urls?: string[];
},
onStreamEvent?: (event: ChaosSDKMessage) => void,
}): Promise<ChatCreateResponse>Inputs
model: typeof EQUITY_MODEL— required. ImportEQUITY_MODELfrom@chaoslabs/ai-sdk.input: InputItem[]— conversation messages:{ type: 'message', role: 'user' | 'assistant' | 'system', content: string }[].metadata.user_id— required.metadata.session_id— required; reuse across calls for multi-turn correlation.metadata.stock_positions?: StockPosition[]— optional structured stock holdings. Shape per row:{ ticker: string (required, uppercase), quantity?, value_usd?, weight_pct?, average_price?, price?, source? }. Provide at least one ofquantity,value_usd, orweight_pctper row.metadata.portfolio_id?: string— optional persisted portfolio identifier.metadata.sources_context?: SourceContext[]— optional research-context items[{ url?, title?, content? }].metadata.context_urls?: string[]— optional research URLs.onStreamEvent?— optional callback fired for every NDJSON line.
wallets and wallet_context_override are not accepted on this surface. Pass them on WALLET_MODEL instead.
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.');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.