> For the complete documentation index, see [llms.txt](https://docs.agentipy.fun/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.agentipy.fun/get-started/installation-and-setup.md).

# Installation and Setup

#### Prerequisites

Before you begin, ensure you have the following in place:

1. **Python 3.8+:** AgentiPy requires a modern Python version. Verify your installation by running:

Generated bash

```bash
python --version
# or
python3 --version
```

If you need to install or upgrade Python, please refer to the [official Python documentation](https://www.google.com/url?sa=E\&q=https%3A%2F%2Fwww.python.org%2Fdownloads%2F).

2. **Create a Virtual Environment (Highly Recommended):**\
   This isolates your project's dependencies from your system's global Python environment, preventing conflicts.

```bash
python -m venv venv
```

3. **Activate the Virtual Environment:**\
   The command to activate depends on your operating system:

* **Linux / macOS:**

  ```bash
  source venv/bin/activate
  ```
* **Windows:**

  ```bash
  venv\Scripts\activate
  ```

You'll see (venv) prepended to your terminal prompt, indicating the environment is active.

4. **Install AgentiPy:**\
   With your virtual environment activated, install AgentiPy using pip:

<pre class="language-bash"><code class="lang-bash"><strong>pip install agentipy
</strong></code></pre>

This command downloads and installs the latest stable version of AgentiPy and its dependencies.

5. **Langchain (Optional, for AI Integration):** If your project involves integrating AgentiPy with AI agent frameworks like Langchain, you'll need to install it separately:

```bash
pip install langchain
```

**Wallet with Private Keys:** To authorize and send transactions on the blockchain, you will need access to a wallet with its private keys. **Security is paramount:** never hardcode your private keys directly into your scripts. It is strongly recommended to use environment variables or a secure key management system.

***

###


---

# 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.agentipy.fun/get-started/installation-and-setup.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.
