name: openclaw_chat description: Execute Solaris workflow by sending user input to POST http://localhost:8000/api/chat, preserving thread history, and waiting for long-running backend completion.
OpenClaw Chat Skill
Use when
Use this as the default Solaris execution path for user prompts.
Base URL
http://localhost:8000- Do not use
127.0.0.1,0.0.0.0, or any remote host in this skill.
Endpoint (single source of truth)
POST /api/chaton base URLhttp://localhost:8000- Final URL:
http://localhost:8000/api/chat
Required execution workflow
- Accept user input text.
- Build request body with
message, stablethread_id, and fullhistory. - Send request to
POST http://localhost:8000/api/chat. - Wait for backend completion. This backend can take multiple minutes.
- Use response payload as final output (
messages,history,run_id,loc_id,satellite). - Replace local history with returned
history.
Request payload
Send this shape:
{
"message": "Analyze solar energy demand for Nairobi for 150 households",
"thread_id": "session-id",
"history": [
{ "role": "user", "content": "..." },
{ "role": "assistant", "content": "..." }
]
}
Optional fields accepted by backend:
lat,lon,households,horizon_days,usage_profile
If coordinates are unknown, omit lat/lon instead of forcing 0,0.
Headers
Content-Type: application/jsonx-api-key: <SOLARIS_API_TOKEN>(if auth enabled)
Timeout and retries
- Treat
/api/chatas long-running. - Use request timeout of at least
300sbefore declaring failure. - Do not switch to local/synthetic analysis because of slow response.
- Retry only for network/transport errors, not for successful long-running requests.
Response fields to use
messages(assistant completion text)history(normalized conversation history)run_id,loc_id(only when analysis is triggered)satellite(preview/NDVI/NDWI payload)
Runtime behavior rules
- Always call only
/api/chatfor prompt handling in this skill. - Keep a stable
thread_idper conversation. - Send full
historyeach turn; then replace local history with server-returnedhistory. - Pass user location as text in
message; backend resolves coordinates/geocoding. - Never fabricate
run_id,loc_id, coordinates, or satellite fields. - Never replace backend workflow with offline estimates, synthetic CSV generation, or local fallback logic.
Analysis trigger guidance
The backend only persists a run when the prompt looks like an energy analysis request. Include:
- An energy term:
energy|power|solar|demand|usage|load|forecast|optimiz|size - An action term:
analy|plan|generate|run|estimate|calculate|design - A location phrase, usually with
for|in|at|near
Working example:
Analyze solar energy demand for Nairobi for 150 households
Failure handling
- Non-2xx: return backend
detailexactly. run_idmissing: report that analysis was not triggered or location could not be resolved.- If
historyis missing in response, keep prior history and append current turn safely.