> For the complete documentation index, see [llms.txt](https://docs.sealights.io/knowledgebase/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.sealights.io/knowledgebase/setup-and-configuration/troubleshooting-faq/python/how-can-i-use-the-sealights-python-agent-without-modifying-my-repository.md). Agents can also search and read this documentation through its [MCP server](https://docs.sealights.io/knowledgebase/~gitbook/mcp).

# How can I use the SeaLights Python Agent without modifying my repository?

Choose a deployment strategy when application source and Dockerfiles cannot change.

### Problem

Use this approach when SeaLights references cannot be committed to the application source or Dockerfiles.

### Solution

CI-managed injection keeps instrumentation changes in the delivery pipeline:

```
inject
  ↓
build
  ↓
test
  ↓
revert
```

The pipeline adds the Python startup hook and agent before testing. It removes temporary changes afterward. The application still needs `SL_TOKEN`, `SL_BUILDSESSIONIDFILE`, and `SL_LABID`.

This is a deployment strategy. The [Python startup hook](https://docs.sealights.io/knowledgebase/setup-and-configuration/sealights-agents-and-plugins/python-agent/capturing-coverage-from-runtime-application/running-backend-server-using-sealights-agent.md) remains the runtime loading mechanism.

### When to use it

Use CI-managed injection for:

* Regulated environments with strict repository controls.
* Shared product images owned by another team.
* Central platform teams running temporary coverage campaigns.

### Choose the simplest option

**Build-time installation** is best when you own the image. Install the agent during the image build.

**Kubernetes injection** is best when you can change deployment manifests. Use an init container and shared volume.

**CI-managed injection** is best only when repository changes must be avoided.

{% hint style="info" %}
Keep the SeaLights token in a Kubernetes Secret or your CI secret store. Do not commit it to source control.
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.sealights.io/knowledgebase/setup-and-configuration/troubleshooting-faq/python/how-can-i-use-the-sealights-python-agent-without-modifying-my-repository.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
