Skip to content

AI Gateway with SDK key in sandboxes #616

@parteeksingh24

Description

@parteeksingh24

Currently, the AI Gateway only enables when a project is registered with Agentuity Cloud. This means standalone scripts, sandboxes, and unregistered projects can't use the gateway even with a valid SDK key.

Issue

When running agentuity dev without a registered project:

Local-only mode
This project is not registered with Agentuity Cloud.
The following features are disabled:
  • AI Gateway (LLM calls require provider API keys)

And standalone scripts using createAgentContext() get:

AI_LoadAPIKeyError: OpenAI API key is missing. Pass it using the 'apiKey' parameter or the OPENAI_API_KEY environment variable.

Suggested Behavior

If AGENTUITY_SDK_KEY is set, can we maybe enable AI Gateway routing automatically, without project registration required? The key itself could then be valid authentication for the AI Gateway.

Use Cases Affected

  • Standalone scripts using createAgentContext()
  • Sandbox execution (running agent code in isolated containers)
  • Quick prototyping without full project setup
  • Discord bots, cron jobs, CLI tools

Potential Fix?

createAgentContext(): For standalone use, set up the AI Gateway, Tracing, etc automatically when AGENTUITY_SDK_KEY is present

Metadata

Metadata

Assignees

No one assigned

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions