Skip to main content

The Problem

Traditional observability tools show you what went wrong, but leave you to figure out how to fix it. You end up context-switching between dashboards, code editors, and AI assistants — copying error messages, searching for relevant code, and manually piecing together solutions.

The Solution

Sentrial’s Code Integration connects the dots. When you find an issue, you can:
  • See the issue with full context (session data, events, diagnosis)
  • Chat with AI that knows both the issue AND your codebase
  • Get code suggestions with real diffs
  • Create a PR with one click

How It Works

Connect Repository

Link your GitHub repo in Settings. Sentrial indexes your codebase.

Select Files

Choose which files/folders are relevant to your agent code.

Chat with AI

Discuss issues with context. Ask questions, get explanations.

Create PR

Accept suggestions and create a pull request automatically.

Setting Up Code Integration

1

Connect GitHub

Go to Codebase in the sidebar, then click Add Repository. Authenticate with GitHub and select the repositories you want to connect.Sentrial will index your repository. This usually takes 1–5 minutes depending on size.
2

Select Relevant Files

Use the file tree to select folders containing your agent code. This helps the AI focus on relevant files when generating suggestions.Pro tip: Select your agent directory, tools, and any prompt files.
3

Start Chatting

You’re ready! When you find an issue, click “Fix in Code” to open the code integration view with context pre-loaded. Or open the Codebase page directly to chat.

Using the AI Chat

The AI chat is context-aware — it knows about:

Your Code

The selected files from your repository.

The Issue

Session data, events, and diagnosis.

Best Practices

Common patterns for agent development.

Example Prompts

  • “Why is the search_kb tool returning empty results?”
  • “How can I add a fallback when the API times out?”
  • “The agent keeps asking clarifying questions instead of acting. How do I fix the prompt?”
  • “Add error handling to the create_ticket tool”
  • “Optimize this function to reduce token usage”

Creating Pull Requests

When the AI suggests code changes, you’ll see a diff view showing exactly what will change. If you’re happy with the changes:
1

Review the diff

You can ask for modifications if needed.
2

Apply Changes

Click “Apply Changes” to stage the changes.
3

Create PR

Click “Create PR” to open a pull request on GitHub.
4

Merge

Review and merge the PR in GitHub as usual.
Sentrial creates PRs on your behalf using your GitHub credentials. You maintain full control over what gets merged.

Security & Privacy

We use GitHub OAuth — we never store your GitHub password.
We only request the permissions needed to read code and create PRs.
Your code is processed in real-time and not stored on our servers.
Revoke access anytime from your GitHub settings.

Next Steps