App Kit Quickstart
Create an Agent and connect it to a local React chat UI.This example connects a React chat UI to a hosted Rebyte Agent. It includes streaming, Conversations, file and image uploads, stop control, and an event inspector. You need Git, Node.js 22 or later, and pnpm.
1. Get your API key
Create an organization Agent API key in
Platform → API Keys with
tasks:read, tasks:write, and files:write. Export it in your terminal:
export REBYTE_API_KEY="rbk_replace_me"
2. Create an Agent
Install the Rebyte CLI from GitHub Releases:
pnpm add --global https://github.com/ReByteAI/rebyte-agent-toolkit/releases/latest/download/rebyte-cli.tgz
Save this definition as agent.toml:
name = "Research assistant"
llm = "deepseek-v4-pro"
prompt = "Answer clearly and cite the evidence you use."
rebyte agent validate -f agent.toml
rebyte agent create -f agent.toml
The CLI prints Created Agent <agent-id> (Research assistant). Keep that ID
for the app configuration below. Create this Agent once, not on each app start.
3. Start the app
git clone --depth 1 https://github.com/ReByteAI/rebyte-agent-toolkit.git
cd rebyte-agent-toolkit
pnpm install
pnpm build
cp examples/react-chat/.env.example examples/react-chat/.env.local
Edit examples/react-chat/.env.local with your key and the returned Agent ID:
REBYTE_API_KEY=rbk_replace_me
REBYTE_AGENT_ID=your_returned_agent_id
These are server settings. Do not put the key in a VITE_ variable or browser
source code. Start both the UI and its local server:
pnpm dev
Open http://127.0.0.1:4100 and send a message. Follow-up messages reuse the Conversation; New conversation starts a separate one with the same Agent. Try attaching a file or image as well.
What runs where
React UI → your Node server → OpenAI SDK → Rebyte Agent
The Node server on port 4101 holds the API key, selects the Agent, and forwards the Responses stream to the browser. Rebyte runs the Agent and its tools in the cloud. No Agent Loop runs in this example's Node server.
Make it yours
- Change the React UI.
- Edit the Agent configuration and apply it with the CLI.
- Use the OpenAI SDK directly without the example UI.
- Deploy the Cloudflare variant.
- Inspect Conversations and Runs.