Restate Agent Template - Python

April 24, 2026 ยท View on GitHub

A template for creating a Restate agent in Python.

Run the example

Check out the AI Quickstart to run this example.

  1. Export your OpenAI API key as an environment variable:
    export OPENAI_API_KEY=your_openai_api_key
    
  2. Start the Restate Server in a separate shell:
    restate-server
    
  3. Start the agent:
    uv run .
    
  4. Register the services (use --force if you already had another deployment registered at 9080):
    restate -y deployments register localhost:9080 --force
    
  5. Send a message to the agent:
    curl localhost:8080/agent/run --json '{"message":"What is the weather in San Francisco?"}'
    

Using AI coding tools

If you use Claude Code or Codex, then the Restate plugin will automatically be installed. For Cursor, consult the skills repo README.

Plugin repo: https://github.com/restatedev/skills/tree/main