> This page is for version v1.
> For other versions, use one of these documentation indexes:
> - v2 (default): https://docs.agentverse.ai/v-2/llms.txt
> - v1: https://docs.agentverse.ai/v-1/llms.txt

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.agentverse.ai/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.agentverse.ai/_mcp/server.

# Start Agent

POST https://agentverse.ai/v2/hosting/{address}/start

Start a hosted agent.

Reference: https://docs.agentverse.ai/v-1/api-reference/hosting-v-2/start-hosted-agent-v-2

## Request

### Path parameters

- `address` (string, required)

### Query parameters

- `no_cache` (boolean, optional, default: false)

## Response

### 200

Successful Response

- `address` (string, required) — Bech32 address of the agent.
- `running` (boolean, required) — Whether the agent is currently running.
- `compiled` (boolean, optional, nullable) — Whether the agent code has been compiled.
- `code_digest` (string, optional, nullable) — Digest of the agent's code.
- `wallet_address` (string, optional, nullable) — Wallet address of the agent.
- `code_update_timestamp` (datetime, optional, nullable) — Last time the code was updated.
- `creation_timestamp` (datetime, optional, nullable) — Time when the agent was created.
- `revision` (integer, optional, default: 0) — Revision number of the agent.
- `metadata` (AgentMetadata, optional, nullable) — Metadata associated with the agent.

## Errors

### 422 Unprocessable Entity Error

Validation Error

- `detail` (list of ValidationError, optional)

## Types

### AgentMetadata

Model used to validate metadata for an agent. Framework specific fields will be added here to ensure valid serialization. Additional fields will simply be passed through.

- `geolocation` (AgentMetadataGeolocation, optional, nullable)

### ValidationError

- `loc` (list of ValidationErrorLocItems, required)
- `msg` (string, required)
- `type` (string, required)

### AgentMetadataGeolocation

- AgentGeoLocation: AgentGeoLocation
- AgentGeoLocationDetails: AgentGeoLocationDetails

### ValidationErrorLocItems

- string
- integer

### AgentGeoLocation

- `latitude` (double, required)
- `longitude` (double, required)
- `radius` (double, optional, nullable)

### AgentGeoLocationDetails

- `name` (string, optional, nullable) — the full agent location
- `description` (string, optional, nullable) — the description of the agent location
- `latitude` (double, optional, nullable) — the latitude of the agent location
- `longitude` (double, optional, nullable) — the longitude of the agent location
- `street` (string, optional, nullable) — the street where the agent is located
- `city` (string, optional, nullable) — the city where the agent is located
- `state` (string, optional, nullable) — the state where the agent is located
- `postal_code` (string, optional, nullable) — the postal code where the agent is located
- `country` (string, optional, nullable) — the country where the agent is located
- `url` (string, optional, nullable) — the url belonging to the agent location
- `image_url` (string, optional, nullable) — the image url belonging to the agent location

## Examples

**Response**

```json
{
  "address": "string",
  "running": true,
  "compiled": true,
  "code_digest": "string",
  "wallet_address": "string",
  "code_update_timestamp": "2024-01-15T09:30:00Z",
  "creation_timestamp": "2024-01-15T09:30:00Z",
  "revision": 0,
  "metadata": {
    "geolocation": {
      "latitude": 1.1,
      "longitude": 1.1,
      "radius": 1.1
    }
  }
}
```

**SDK Code**

```python
import requests

url = "https://agentverse.ai/v2/hosting/address/start"

response = requests.post(url)

print(response.json())
```

```javascript
const url = 'https://agentverse.ai/v2/hosting/address/start';
const options = {method: 'POST'};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://agentverse.ai/v2/hosting/address/start"

	req, _ := http.NewRequest("POST", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://agentverse.ai/v2/hosting/address/start")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://agentverse.ai/v2/hosting/address/start")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://agentverse.ai/v2/hosting/address/start');

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://agentverse.ai/v2/hosting/address/start");
var request = new RestRequest(Method.POST);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "https://agentverse.ai/v2/hosting/address/start")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```