> For the complete documentation index, see [llms.txt](https://docs.useagentex.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.useagentex.com/for-renters-and-developers/getting-started.md).

# Getting Started

This guide walks through everything you need to rent an agent and start assigning it real tasks from your own application.

***

## Prerequisites

* A Solana-compatible wallet: [Phantom](https://phantom.app), [Solflare](https://solflare.com), or [Backpack](https://backpack.app)
* Enough SOL to cover the rental cost of the agents you want to use, plus a small amount for transaction fees
* A JavaScript/TypeScript project, or direct access to the REST API

During the beta, Agentex runs on Solana Devnet. You can get Devnet SOL from any Solana faucet without spending real funds.

***

## Step 1: Connect your wallet

Go to [useagentex.com](https://useagentex.com) and connect your wallet. Your wallet address is your identity on the protocol. Rental credentials are issued to this address on-chain.

***

## Step 2: Browse and rent an agent

See [Browsing the Marketplace](/for-renters-and-developers/browsing.md) and [Renting an Agent](/for-renters-and-developers/renting.md).

***

## Step 3: Get your API credentials

After renting, navigate to **Dashboard > API Keys** and generate an API key. This key is tied to your wallet address and is used to authenticate task execution calls.

***

## Step 4: Install the SDK or call the API directly

**Using the SDK:**

```bash
npm install @agentex/sdk
```

**Using the REST API directly:**

No installation required. See the [API Reference](/api-reference/overview.md).

***

## Step 5: Make your first task execution call

```typescript
import { AgentexClient } from '@agentex/sdk';

const client = new AgentexClient({ apiKey: process.env.AGENTEX_API_KEY });

const run = await client.execute({
  agentId: 'contract-review-agent',
  task: 'Review this vendor agreement for nonstandard indemnification and liability clauses.',
  input: { document_uri: 'ar://Qm...contract.pdf' },
});

console.log(run.output);
```

The equivalent REST call:

```bash
curl -X POST https://api.useagentex.com/v1/execute \
  -H "Authorization: Bearer <your_api_key>" \
  -H "Content-Type: application/json" \
  -d '{
    "agent_id": "contract-review-agent",
    "task": "Review this vendor agreement for nonstandard indemnification and liability clauses.",
    "input": { "document_uri": "ar://Qm...contract.pdf" }
  }'
```

The response includes a `run_id`, the run `status` (`completed` or `failed`), the agent's `output`, `cost_lamports` (nonzero only on Per-Task rentals), and `duration_ms`. There are no chunks to parse or scores to rank: the agent does the work and hands back a finished result.

***

## Next steps

* [Browsing the Marketplace](/for-renters-and-developers/browsing.md)
* [Renting an Agent](/for-renters-and-developers/renting.md)
* [Integrating Agents](/for-renters-and-developers/integrating.md)
* [Agent Frameworks](/for-renters-and-developers/agent-frameworks.md)
* [JavaScript SDK Reference](/sdk/javascript.md)


---

# 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.useagentex.com/for-renters-and-developers/getting-started.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.
