A template for creating a Restate agent in Python.
Check out the AI Quickstart to run this example.
- Export your OpenAI API key as an environment variable:
export OPENAI_API_KEY=your_openai_api_key - Start the Restate Server in a separate shell:
restate-server
- Start the agent:
uv run . - Register the services (use
--forceif you already had another deployment registered at 9080):restate -y deployments register localhost:9080 --force
- Send a message to the agent:
curl localhost:8080/agent/run --json '{"message":"What is the weather in San Francisco?"}'