# Code Interpreter

### Adding Code Interpreter to Your Agent

To enable your agent to code interactive graphs and small applications, you can add the Code Interpreter tool during the agent creation process or when editing an existing agent.

<figure><img src="/files/b3xYIyScuMyBBLDp7Jb2" alt=""><figcaption></figcaption></figure>

**During agent creation:**

* In the Tools section (located in the Knowledge & Tools page), you'll find the Code Interpreter option with a terminal icon.
* Check the "Code Interpreter" checkbox to give your agents the ability to code interactive graphs and small apps.
* This tool allows your agent to execute Python code, create visualizations, and build interactive applications.

**When editing an existing agent:**

* Click the three dots on your agent's card and select "Edit Agent"
* Navigate to the Tools section
* Toggle the Code Interpreter option on or off as needed

**Code Interpreter Capabilities:** Once enabled, your agent will be able to:

* Create interactive charts, graphs, and visualizations
* Build live applications that run directly in the chat interface
* Generate complete HTML, CSS, and JavaScript code
* Process data and create dynamic content
* Develop small apps with user interfaces
* Export code for use in external projects

The tool provides a "Live Application" view where users can interact with the created applications.

<figure><img src="/files/qE7uHqxkG9JW7JRh9vVf" alt=""><figcaption></figcaption></figure>

You will also have options to :

* View the generated code
* Copy it or open it in a new window to play with it.


---

# Agent Instructions: 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:

```
GET https://docs.calk-ai.com/agents/tools-you-can-give-to-agent/code-interpreter.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
