> 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).

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

### 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](/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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
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=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
