Skip to content

Latest commit

 

History

History
28 lines (24 loc) · 834 Bytes

File metadata and controls

28 lines (24 loc) · 834 Bytes

Restate Agent Template - Python

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?"}'