OpenClaw EnterpriseDOCSGitHub

Deploy your first Agent

Create your own Agent in the Kubernetes installation from Local setup, deploy it, and get a real response from an OpenAI model. You choose the Agent name and supply your own OpenAI API key. The Agent stays in your installation after the command exits.

Before you start

The walkthrough runs from the repository root on your own development installation. If you followed Kubernetes Setup on an existing cluster, use Deploy and verify production Agents.

Steps

1. Check that the Namespace is ready

In the terminal where you set the OCC URL and service-key file during Local setup, run:

bash
./bin/occ namespace list

Wait until default shows ready. This is where the command will create your Agent.

2. Create and deploy your Agent

Choose a name for your Agent; this example uses my-agent:

bash
node scripts/first-agent.mjs my-agent --prompt 'What is 2 + 2?'

Enter the OpenAI API key when prompted. The command stores it in a platform Secret, creates the named Agent with the Embedded OpenClaw Harness, grants that Agent access to its Secret, and requests the first deployment. It then waits for the gateway and sends a verification prompt before sending your own. Initial startup can take several minutes.

This starter answers model prompts only. Tools and the native admin UI are disabled. The command refuses to reuse it if you change its Configuration elsewhere. For an Agent that can use tools or the native admin UI, create a separate console-managed Agent; see Agent Configuration, Plugins, and local native admin setup.

Keep the command running until it prints Model response verified: followed by the phrase it asked the model to repeat. Under Agent response:, it then prints the model's answer to your question. It also prints the Agent ID, active revision, and console URL. These returned responses complete the model check; see what each check establishes.

3. Find your Agent in the console

Open the console link from the command and sign in with the local credentials from Local setup. Current version shows the revision selected by OCC; Deployment activity shows persisted deployment progress. Use the terminal command for further model prompts. For browser access to the Agent's files, follow workspace verification.

The Agent remains available after the command exits. Run the same command with the same Agent name and a different --prompt to ask another question; you do not need to enter the model key again. Stopping the local stack with dev down deletes the installation and its Agents.

Troubleshoot

Search documentation