Looking for TypeScript? See the TypeScript guide.
typesafe-sdk). Calls to TypeSafeClient.system_one and AsyncTypeSafeClient.system_one are captured as OpenInference LLM spans.
A System One request sends a state plus a map of typed questions (Noul, Choice, Score) and returns one typed answer per question, so the span records the request state/model/questions as input.value, the response answers/usage as output.value, the request and resolved model names, and prompt/completion/total token counts.
Requires typesafe-sdk >= 0.6.0.
Install
Setup
Use theregister function to connect your application to Phoenix:
Run TypeSafe AI
A simple TypeSafe AI application that is now instrumented:AsyncTypeSafeClient is instrumented the same way, and questions can be passed as SDK objects (as above) or as raw dictionaries.
Observe
With instrumentation enabled, eachsystem_one call shows up in Phoenix as an LLM span containing:
input.value: the request body (state,model,questions) as JSONllm.invocation_parameters: the call configuration, meaning themodeland anyextra_bodyfieldsoutput.value: the response body (model,answers,usage) as JSONllm.request.model_nameandllm.response.model_name(the resolved model)llm.token_count.prompt,llm.token_count.completion, andllm.token_count.total

state and the answers are recorded only as input.value and output.value, not as llm.input_messages / llm.output_messages.
Configuration
Because thestate and the questions are recorded only in input.value, TraceConfig(hide_inputs=True) keeps the whole request off the span, and hide_outputs=True does the same for the answers. llm.invocation_parameters holds no request content, only the model and any extra_body fields; mask it with hide_llm_invocation_parameters if those are sensitive.
suppress_tracing(), and context attributes such as using_session, using_user, and using_attributes propagate session, user, metadata, and tag information onto the spans it produces.

