Significant-Gravitas/AutoGPT · error · HTTPException

Otto service is not configured

Error message

Otto service is not configured

What it means

Thrown by OttoService.ask when the OTTO_API_URL setting is empty — the backend cannot proxy chat requests to Otto because no upstream endpoint is configured. It is a 503 signalling server-side misconfiguration, not a client error.

Source

Thrown at autogpt_platform/backend/backend/api/features/otto/service.py:76

            return GraphData(
                nodes=nodes_data,
                edges=[],
                graph_name=graph.name,
                graph_description=graph.description,
            )
        except Exception as e:
            logger.error(f"Failed to fetch graph data: {str(e)}")
            return None

    @staticmethod
    async def ask(request: ChatRequest, user_id: str) -> ApiResponse:
        """
        Send request to Otto API and handle the response.
        """
        # Check if Otto API URL is configured
        if not OTTO_API_URL:
            logger.error("Otto API URL is not configured")
            raise HTTPException(
                status_code=503, detail="Otto service is not configured"
            )

        try:
            async with aiohttp.ClientSession() as session:
                headers = {
                    "Content-Type": "application/json",
                    "Accept": "application/json",
                }

                # If graph data is requested, fetch it
                graph_data = await OttoService._fetch_graph_data(request, user_id)

                # Prepare the payload with optional graph data
                payload = {
                    "query": request.query,
                    "conversation_history": [
                        msg.model_dump() for msg in request.conversation_history

View on GitHub (pinned to 9c8bb5550f)

Solutions

  1. Set OTTO_API_URL in the backend environment (.env or deployment config) to the Otto API endpoint.
  2. Restart/redeploy the backend so settings are re-read.
  3. Verify with a quick settings dump or log check that the value is non-empty at startup.
  4. If Otto is intentionally disabled in an environment, disable/hide the chat UI so users don't hit the 503.

Example fix

# before — env missing
# OTTO_API_URL=
# after
OTTO_API_URL=https://otto.internal.example.com/chat
Defensive patterns

Strategy: validation

Validate before calling

import { settings } from '@/config';
export function assertOttoConfigured() {
  if (!settings.OTTO_API_URL) throw new Error('OTTO_API_URL is not set — Otto chat disabled');
}

Type guard

const ottoConfigured = (): boolean => Boolean(process.env.OTTO_API_URL);

Try / catch

try { await otto.ask(req); }
catch (e) {
  if (e.status === 503 && e.detail === 'Otto service is not configured') {
    hideOttoUi(); // feature legitimately unavailable here
  } else throw e;
}

Prevention

When it happens

Trigger: Calling the Otto chat endpoint on a deployment where the OTTO_API_URL environment variable / setting was never set, was cleared during a config refactor, or where the settings loader failed to read it (e.g. .env not loaded in the container).

Common situations: Local dev environments without Otto configured; staging/production deployments missing the env var after infra changes; the secret/settings provider returning None for the key.

Related errors


AI-assisted analysis of Significant-Gravitas/AutoGPT@9c8bb5550f (2026-08-14). Data as JSON: /api/errors/871a80ea61068565. Report an issue: GitHub.