Read docs without a connector
Start with the documentation index, then read the pages relevant to your project: For example, give your coding assistant this task:Read Sentrial’s quickstart and CLI guide. Inspect my project’s language and framework, propose the integration, and preserve existing source and configuration. After I supply workspace access privately, verify that a run from my agent appears in Sentrial with matching tool inputs, results and final response.The public Markdown pages need no Sentrial key or MCP connection. The SDK and terminal setup also work independently of the documentation connector. Keep credentials and private trace content out of prompts used only to look up public documentation. If an MCP client cannot connect or reports HTTP 406, use these Markdown pages while checking the connector. Reading a guide does not verify an MCP connection or grant access to private workspace evidence.
Install with Claude Code
Run this in your terminal:/mcp in Claude Code to check the connection and available tools. By default, this command adds the server for your current project. Add --scope user if you want it available across your own projects.
Install with Cursor
Add this entry to.cursor/mcp.json in your project. Merge it with existing servers rather than replacing the file. The public endpoint supports Streamable HTTP:
What You Can Do
Once connected, just ask your AI assistant naturally:- “Instrument my agent with Sentrial”
- “Add Sentrial tracking to my LangChain agent”
- “How do I track tool calls with the Python SDK?”
- “Set up Sentrial with the Vercel AI SDK”
MCP Prompt Tips
For Claude Agent SDK integrations, include your language and runtime behavior in the prompt so the assistant returns the correct pattern:- “Set up Claude Code Python tracking with
wrap_claude_agent(forquery()) orwrap_claude_client(forClaudeSDKClient), and make sure sessions finalize with tokens/cost.” - “For Claude Code TypeScript, ensure early stream exits are handled so sessions don’t stay
running.” - “Show me the error-handling pattern for Claude Code wrappers, including generator-close behavior.”
- “I’m using
ClaudeSDKClientfor multi-turn conversations — show me how to track each turn as a Sentrial session withwrap_claude_client.”
How It Works
No API key is needed for the public documentation server. Its current tools include:
Search and page reading are read-only. Feedback is a separate action that sends the supplied text; it is not needed to set up telemetry. The documentation server does not grant access to private sessions, decisions or evidence. Use the separately scoped investigation commands below for those records.
Set up from a coding agent
For an initial human-assisted connection, runnpx --yes --package @sentrial/sdk@0.9.0 sentrial setup --browser in an interactive
terminal and approve the displayed workspace access. The CLI explains how to load
the private, gitignored .env.sentrial file. Do not paste that file into a prompt.
See the CLI guide for sign-in recovery and separate investigation access.
The published Node CLI supports an unattended setup path. Supply
SENTRIAL_API_KEY privately in the agent’s environment, then ask it to inspect the
plan and preserve existing source and configuration:
--language typescript or --language python explicitly.
Setup checks access and creates examples; it does not automatically instrument
your application or run the example. Have the coding agent adapt the example to
your workflow and retain actual tool inputs, outputs, errors and pending states.
Python projects can use Python setup or the manual
quickstart with the published Python 0.10.0 SDK without Node.
The published TypeScript CLI can then inspect that session:
sessions:read and events:read; sending telemetry needs
sessions:write and events:write. Use an API key for the same workspace and API
origin as the agent. Never paste credentials into a coding-agent prompt.
Ask the coding agent to check the recorded arguments, result and final response
before reporting delivery success. Follow returned pagination and delivery
warnings; one event page is not proof of complete capture. Delivery alone does not
establish that the agent’s behavior was correct or that a signal was evaluated.
Investigate saved decisions
The documentation MCP searches public docs. To inspect your workspace’s saved decisions and evidence, use the CLI with a separate Investigation — read only key from workspace settings. Supply it asSENTRIAL_INVESTIGATION_KEY in the local
environment; the SDK key does not inherit that access.
Run an experiment
Create an offline experiment with test cases and prompt variants in the dashboard. Copy its ID, then run those cases through your instrumented agent using the published TypeScript SDK. Use Node 18 or later and sandbox tools: this runs your agent and can incur model-provider costs.- Set
SENTRIAL_API_KEYprivately for the experiment’s workspace. Use the sameSENTRIAL_API_URLas your agent for a staging or local API. - Export a
runAgent({ input, systemPrompt })function fromagent.js. Have it apply the supplied variant prompt, await completion and flush its Sentrial session, then return{ sessionId }. Adapt this interface to your application;agent.jsis your code, not a file supplied by the SDK. - Save the following as
sentrial-experiment.mjsbeside that module, replacing<experiment-uuid>with the ID copied from the dashboard.
export in agent.js, its
package must already use "type": "module". Otherwise, save the adapter as
agent.mjs and update the import instead of changing your whole project’s module
format. For a TypeScript agent, use your usual build step and import its built
JavaScript module. Keep provider credentials in the local environment.
Return to the experiment and refresh its runs. A zero exit code means the runner
saved linked results; it does not mean the agent passed a quality check. Wait for
the configured measurements, inspect their evidence and keep missing outcomes
explicit before comparing variants.
