AgentRuntime interface in the UI, so nothing in the application code branches on "am I really calling a model." It just asks the runtime to run, and the runtime decides how.PORT Yes, for the frontend artifacts/agentdesk Vite dev/build server port BASE_PATH Yes, for the frontend artifacts/agentdesk Base path the frontend is served from (e.g. /) OPENAI_API_KEY Optional artifacts/api-server Enables real agent execution via OpenAI ANTHROPIC_API_KEY Optional artifacts/api-server Enables real agent execution via Anthropic (Claude) OPENROUTER_API_KEY Optional artifacts/api-server Enables real agent execution via OpenRouter (routes to many model vendors through one key) API_PROXY_TARGET Optional artifacts/agentdesk (dev only) Where the frontend dev server proxies /api requests. Defaults to http://localhost:5000. DATABASE_URL Not currently needed @workspace/db Scaffolded for future use; the API server doesn't import @workspace/db yet, so you can ignore this until you wire up persistence.AgentRuntime and ProviderAdapterartifacts/agentdesk/src/lib/runtime.tsgetRuntime() reads the mode and active provider persisted from the Settings page and returns DemoRuntime or the selected provider runtime. Every page that runs an agent (RunModal) calls runtime.run(...) and doesn't otherwise care which one it got. Demo runs return a simulated multi-step trace and placeholder output. Provider runs make one real round trip and return the model's actual output — no fabricated tool calls, no hidden reasoning — with a clean "Failed" result (not a crash) if the provider errors or isn't configured.artifacts/api-server/src/providers/providers/registry.ts holds the list every provider is registered in. routes/runtime.ts is entirely generic over that list — it never mentions any provider by name. It exposes:GET /api/runtime/status — which providers exist and whether each has usable credentials. Never returns the credential itself.POST /api/runtime/run — { provider, agentName, model?, instructions?, task } → { provider, model, output, tokens?, durationMs }, or a structured { error, message } with 400/503/502 depending on what went wrong.providers/<name>.ts implementing ProviderAdapter.providers/registry.ts.createProviderRuntime('<name>', '<Label>') on the client (runtime.ts), and register it in the small PROVIDER_RUNTIMES lookup next to it.GET /api/runtime/status reports, and the Settings provider picker already lists whatever's in that array.lib/api-spec/openapi.yaml:pnpm run typecheck — typecheck every packagepnpm run build — typecheck + build every packagepnpm --filter @workspace/agentdesk run dev — frontend dev serverpnpm --filter @workspace/api-server run dev — API server (build + start)GET /api/runtime/status Settings Toggle only changes local state Lets you pick which configured provider is active, and shows whether its key is actually set on the server Credentials None Read from server environment variables only — never touch the browserPosted Aug 10, 2026
Developed AgentDesk, a control room for AI agent configuration and execution.
0
0