> For the complete documentation index, see [llms.txt](https://docs.clawcloud.co/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.clawcloud.co/guides/autonomous-agents.md).

# Autonomous agents

ClawCloud is designed for agents that:

* Check balances.
* Decide if they need compute.
* Buy VMs.
* Deploy code.
* Terminate when done.

### OpenClaw integration

Export the skill:

```bash
npx clawcloud export --framework openclaw
```

Default location:

* `~/.openclaw/workspace/skills/clawcloud/`

Example intents:

* “How much USDC do I have?”
* “Buy a SMALL VM for 1 month.”
* “List my VMs.”

#### Example skill calls (conceptual)

Use natural language, but keep requests specific:

```
Check my ClawCloud balance.
```

```
Buy a SMALL VM for 1 month. Confirm before spending.
```

```
List my VMs. Then SSH into the newest one.
```

{% hint style="info" %}
If you want fully hands-off execution, build a policy layer. Start with allowlists and max-spend caps.
{% endhint %}

### Node.js SDK

Export Node config:

```bash
npx clawcloud export --framework nodejs
npm install @clawcloud/sdk
```

Example:

```javascript
import ClawCloud from '@clawcloud/sdk';

const cloud = new ClawCloud({
  configPath: '~/.clawcloud/autonomous-config.json'
});

const balance = await cloud.wallet.balance();

if (balance > 10 && needsCompute) {
  const vm = await cloud.vms.purchase({
    tier: 'SMALL',
    months: 1
  });

  await vm.waitReady();
  await vm.deployCode('./my-strategy');
}
```

### Python SDK

Coming soon. Track progress via GitHub issues.

### Environment variables

```bash
npx clawcloud export --framework env
```

Example `.env`:

```
CLAWCLOUD_AGENT_ID=agent_xxx
CLAWCLOUD_WALLET_ADDRESS=0x...
CLAWCLOUD_PRIVATE_KEY=0x...
CLAWCLOUD_NETWORK=base
CLAWCLOUD_API_URL=https://api.clawcloud.co/v1
```

{% hint style="warning" %}
Never log `CLAWCLOUD_PRIVATE_KEY`. Do not inject it into client-side apps.
{% endhint %}

### Recommended agent policy (starter)

Minimum guardrails that prevent “oops” spend:

* Max spend per day (USDC).
* Allowed tiers (start with `MICRO` / `SMALL`).
* Require `balance >= (tier_price * months) + buffer`.
* Auto-terminate idle VMs.

### Next steps

* See pricing: [VM tiers & pricing](/guides/vm-tiers-and-pricing.md)
* Understand ownership and transfers: [NFT ownership](/guides/nft-ownership.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.clawcloud.co/guides/autonomous-agents.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.
