> For the complete documentation index, see [llms.txt](https://docs.owkin.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.owkin.com/what-you-can-do-with-k-pro/code-execution.md).

# Code execution

Run custom analyses on uploaded files in K Pro.

## Code Execution

Code Execution lets K Pro run custom analyses during a conversation, with or without an uploaded file. Describe your scientific question in natural language or provide code when needed. K Pro returns the analysis results in the same workflow.

### What can I do with Code Execution?

Use Code Execution to:

* Analyze uploaded datasets or data retrieved through authorized internet access.
* Clean, transform, compare, and summarize data.
* Run calculations and generate tailored plots or output files.

Review all outputs before using them to support scientific decisions.

### How do I start?

1. Optionally, upload a supported file in chat.
2. Describe the question or analysis you need.
3. Review the generated results and any downloadable outputs.

See [File upload](/integrate-your-data/file-upload.md) for supported formats and file-size limits.

### How is my data protected?

Code Execution runs in a secure, isolated environment within Owkin-managed infrastructure. Internet access is restricted and managed through specific allowlists.

Uploaded files are available only to the user who added them. Keep uploads limited to data approved for your intended use.

### What are common use cases?

* Summarize a publication or compare several documents.
* Explore a tabular dataset and validate calculations.
* Create a custom chart or export an analysis result.

### Can Code Execution be used in every workflow?

Code Execution is available in supported conversation workflows. Availability may depend on your K Pro plan and enabled features.


---

# 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.owkin.com/what-you-can-do-with-k-pro/code-execution.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.
