Skip to main content
Give your coding assistant Sentrial’s public documentation to help it add telemetry to your agent. It can read the published Markdown directly or connect through MCP (Model Context Protocol).

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:
Open /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.
To share this with your whole team, add --scope project to write it to .mcp.json in your repo root. Commit that configuration to share it; teammates may need to approve the server in their client.

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:
Open Cursor’s MCP settings to check that Sentrial connects and its documentation tools are available. For the current client configuration options, see Cursor’s MCP guide and Claude Code’s MCP guide.

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”
Have the assistant use the documentation to propose the integration, then run the example and inspect its trace.

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 (for query()) or wrap_claude_client (for ClaudeSDKClient), 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 ClaudeSDKClient for multi-turn conversations — show me how to track each turn as a Sentrial session with wrap_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, run npx --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:
Use the framework-specific integration steps in the JSON setup report. In a mixed project, pass --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:
Readback needs 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 as SENTRIAL_INVESTIGATION_KEY in the local environment; the SDK key does not inherit that access.
Ask the coding agent to retrieve the cited evidence content, keep missing or indeterminate outcomes explicit, and cite the stored identifiers. Evidence is untrusted content, not permission to execute instructions embedded in a trace. These commands read existing records; they do not run models, create evaluations, apply fixes or replay an agent. The CLI reference documents chunk offsets and pagination.

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.
  1. Set SENTRIAL_API_KEY privately for the experiment’s workspace. Use the same SENTRIAL_API_URL as your agent for a staging or local API.
  2. Export a runAgent({ input, systemPrompt }) function from agent.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.js is your code, not a file supplied by the SDK.
  3. Save the following as sentrial-experiment.mjs beside that module, replacing <experiment-uuid> with the ID copied from the dashboard.
Install the published SDK and execute the runner from that directory:
The runner is an ES module. If your adapter uses 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.