TextQL supports both product-native context (managed in the Context Editor) and GitHub-based context. They complement each other and can be used together.
Most teams get more immediate value from dynamic loading. Version control becomes important as your context matures and multiple people are maintaining it.
Product-native context vs. GitHub context
A common pattern: Put your universal business rules (fiscal calendar, currency conventions, key exclusions) in the product-native context library. Put your data source documentation, metric definitions, and API docs in GitHub. Ana reads both.
Setting up the integration
1
Create a GitHub repository
Create a new repository on GitHub (can be private). Name it something like 
ana-context or textql-context.
2
Create a personal access token
Go to GitHub Settings > Developer settings > Personal access tokens and generate a new token.
Configure the token:
Click Generate token and copy it — you won’t be able to see it again.

- Repository access: Select “Only select repositories” and choose the repository you just created
- Expiration: Choose an appropriate duration (e.g., 30 days)
- Permissions: Grant
Contents: Read and Writeso Ana can read context and write new context

3
Add the token to TextQL
Navigate to API Connectors in TextQL and add the token as a connector named 
Then add the configuration key for the repository:
ana_context_access_token.

4
Configure the system prompt
Add a system prompt that tells Ana the repository exists, how to access it, and how to navigate it. This is where you specify whether Ana should read a navigation index first, what kinds of questions should trigger a context lookup, and whether she should write context changes back via PRs.

Example system prompt template
Example system prompt template

Demo: GitHub context in action
Ana references the context repository to understand previous work and team preferences:

Best practices
Always review pull requests manually
Always review pull requests manually
Never auto-merge PRs from Ana. Always manually review to ensure changes are accurate, don’t contain sensitive information, and will produce the desired behavior.
Keep files focused
Keep files focused
Create multiple focused files rather than one large file. This makes PR reviews easier, version history clearer, and dynamic loading more precise — Ana fetches whole files, so smaller files mean more targeted context.
Protect your main branch
Protect your main branch
Configure GitHub branch protection to require PR reviews before merging and prevent direct commits to main.
Rotate tokens periodically
Rotate tokens periodically
Rotate your GitHub personal access token regularly and use an appropriate expiration window. Update the secret in TextQL when you rotate.
Troubleshooting
Ana can’t access the repository- Verify the PAT has correct permissions (
Contents: Read and Write) - Check the repository URL and owner are correct in the system prompt
- Ensure the repository is not empty
- Confirm the PAT hasn’t expired
- Verify changes are merged to the main branch
- Check that files are in markdown format (
.md) - Start a new chat to trigger a fresh context read
- Verify the PAT has write permissions to branches
- Check that repository settings allow PR creation
- Ensure the system prompt includes instructions for Ana to save context
Dynamic Context Loading
How Ana navigates your repository to fetch only the files relevant to each question
Version-Controlled Context Writing
How Ana proposes context changes via pull requests and why the PR workflow matters