Create New Experiment
Create an experiment or return the existing experiment with the same name.
Use this tool when starting a new MCP workflow namespace and you need an
experiment_id for later circuit, job, or artifact calls. Name matching
is exact within the authenticated user scope, so the endpoint may return an
existing experiment instead of inserting a new one.
When to Use:
- Call this at the start of a new workflow when later tool calls need
a stable
experiment_id. - Call this when the user has a preferred experiment name and wants to reuse the existing experiment if it already exists.
Constraints:
- Name matching is exact and scoped to the authenticated user.
- The route may return an existing experiment instead of inserting a new one.
Notes:
- The response is the full
ContextExperimentModelobject, not a lightweight acknowledgment wrapper. - For agent-facing output, surface
idandnamefirst, then summarize the context or description in one short line.
Args: user: Authenticated user resolved from the API key. data: Experiment payload containing the requested name plus optional description and MCP context. db: Active database session.
Returns: The created or reused experiment object for the caller scope.
Authorizations
Body
Define payload for MCP experiment creation requests.
Attributes: name: Experiment name unique within the caller scope. description: Optional HTML-formatted description persisted by the API. context: ai rationale for creating this experiment.
Response
Successful Response
Represent an experiment with MCP-specific context metadata.
description and creation_date remain optional for compatibility
with legacy database rows.
Attributes:
description: Plain-text experiment description. Optional for legacy
rows that still store NULL.
creation_date: Experiment creation timestamp. Optional for legacy rows
that still store NULL.
context: Additional plain-text guidance for AI agents consuming the
experiment.
url: Dashboard URL for the experiment when available.