1. Create the actor project
To follow this tutorial you need:- Node.js 22.19 or later
- A Terse account
- An OpenAI API key
- TypeScript
- Python
.env in agent-chat/. Add your provider key:
.env
2. Define the actor
- TypeScript
- Python
src/actor.ts
3. Run locally and generate the client
Start the actor server:agent-chat/. Generate the backend client:
- TypeScript
- Python
4. Add the application backend
- TypeScript
- Python
app.ts
5. Connect the browser
frontend/vite.config.js
frontend/src/App.jsx
6. Try streaming and persistence
Start the app:- TypeScript
- Python
agent-chat/. Start React:
7. Deploy to Terse
From the actor project:Test the deployed actor locally
Keep React and your backend on your machine. Connect them to the actor running on Terse. Add these values toagent-chat/.env. Use the URL from terse deploy and your Terse API token:
agent-chat/:
- TypeScript
- Python
