Skip to content

Allow agent-optional initialization with guided target selection #456

Description

Problem

agentops init currently requires an agent target even when the user only wants to initialize AgentOps for project-level observability, Doctor, Cockpit, or resource operations.

The generated agentops.yaml starts with the placeholder agent: "my-agent:1". The wizard recognizes that value as a placeholder, removes it as the default, and then repeatedly rejects an empty answer with Agent is required. This forces users to invent a target before they have an agent.

The prompt also combines several materially different concepts under Agent or orchestrator endpoint:

  • Foundry prompt-agent reference;
  • Foundry hosted-agent resource or protocol URL;
  • raw model deployment;
  • external HTTP/JSON API.

It shows syntax examples, but does not explain where to obtain each value, what AgentOps will do with it, or which URL should be copied from Foundry. A user with a hosted agent cannot tell whether to enter the project endpoint again, a portal URL, an agent resource URL, or the final invocation route.

An agent target is necessary for evaluation execution, but it should not be necessary to initialize or observe a Foundry project.

Expected behavior

Guided target selection

Replace the single ambiguous free-text prompt with a guided choice:

  1. Foundry prompt agent
  2. Foundry hosted agent
  3. Foundry model deployment
  4. External/custom HTTP agent
  5. Configure an agent later / project observability only

After the user selects a target type, show type-specific instructions before requesting the value.

Foundry prompt agent

Explain that AgentOps expects <name>:<version>, where both values come from the published prompt agent in the connected Foundry project.

quickstart-agent:2

Foundry hosted agent

Explain where to copy the agent URL in Foundry and explicitly distinguish it from the project endpoint and the ai.azure.com browser URL. Document the URL shapes AgentOps accepts and normalizes automatically:

https://<resource>.services.ai.azure.com/api/projects/<project>/agents/<agent>
https://<resource>.services.ai.azure.com/api/projects/<project>/agents/<agent>/versions/<version>
https://<resource>.services.ai.azure.com/api/projects/<project>/agents/<agent>/endpoint/protocols/openai/responses

Foundry model deployment

Explain that the value is the model deployment name, prefixed with model::

model:gpt-4.1

External/custom HTTP agent

Explain that the value is the callable HTTP(S) endpoint, not a documentation or portal URL:

https://api.example.com/chat

State that AgentOps defaults non-Foundry URLs to protocol: http-json and that custom request/response fields and authentication are configured in agentops.yaml.

Agent-optional workspace

Allow the user to choose Configure later or submit an empty agent value intentionally.

  • Do not persist a fake my-agent:1 target.
  • Make agent optional in the configuration schema while preserving all existing configured files.
  • Keep the Foundry project endpoint available for project/resource discovery.
  • Allow agent-independent commands and surfaces to operate, including initialization, init show, Doctor, Cockpit/Observe, and project-level Azure resource inspection.
  • Skip target-specific checks and cards honestly when no agent is configured; do not convert them into readiness failures.
  • Cockpit should identify the workspace as project-observability-only rather than universally NO-GO because an evaluation target is absent.
  • Next Actions may show one actionable Configure an evaluation target when ready item, but must not expand the missing target into multiple dependent readiness actions.
  • Tell users they can rerun agentops init or provide --agent later.

Commands that require an agent

Commands that invoke or evaluate a target must fail early and clearly when agent is absent. They must use the existing runtime/configuration error exit code 1 and explain how to configure the target. Do not allow a later attribute error, target-classification failure, or network error to obscure the real problem.

At minimum, review:

  • agentops eval run;
  • target-dependent evaluation analysis;
  • prompt pull;
  • red-team execution when its target depends on agent;
  • workflow generation paths that require a deploy/evaluation target;
  • any code that currently calls classify_agent(config.agent, ...) unconditionally.

Non-interactive behavior

  • agentops init --no-prompt must support an intentionally agent-less project workspace.
  • Supplying --agent continues to configure and validate a target directly.
  • Invalid non-empty target values must still be rejected.
  • Existing agentops.yaml files with a valid required agent value remain fully compatible.

Acceptance criteria

  • Interactive initialization offers an explicit Configure later / project observability only choice.
  • Pressing Enter can intentionally proceed without an agent instead of looping on Agent is required.
  • No fake my-agent:1 value is persisted for an agent-less workspace.
  • Each supported target type has type-specific instructions, an example, and guidance about where to obtain the value.
  • Hosted-agent guidance distinguishes the Foundry project endpoint, portal URL, agent identity URL, version URL, and protocol route.
  • Agent-less configuration is valid and backward compatible with existing configured workspaces.
  • Doctor, Cockpit/Observe, and project-level resource discovery work without an agent target.
  • Agent-dependent checks are skipped or marked not applicable rather than failed.
  • Agent-dependent commands fail early with exit code 1 and actionable remediation.
  • Project-only workspaces do not receive a blanket readiness NO-GO solely because no agent exists.
  • Next Actions contains at most one target-configuration action instead of cascading dependent actions.
  • Interactive, non-interactive, configured-agent, configure-later, and rerun flows are covered by tests.
  • Schema, CLI help, init explain, README, and configuration documentation describe the project-only mode and all target formats.

Out of scope

Cloud-backed discovery and selection of Foundry prompt agents, hosted agents, versions, and model deployments is tracked separately in #457. This issue must remain deliverable with guided manual entry and the project-observability-only option even when discovery APIs or permissions are unavailable.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions