from mutagent import Mutagentwith Mutagent() as client: result = client.prompt.list_prompts() for p in result.get("data", []): print(p["name"], "v" + p["version"])
Filter by name, version, is_latest, or creator:
result = client.prompt.list_prompts( name="support", is_latest=True, created_by="user@example.com", limit=20, offset=0,)
MutagenT supports three prompt formats. Use raw_prompt for plain text, human_prompt for template-based prompts, or system_prompt + human_prompt for structured prompts. The name and input_schema fields are required.
from mutagent import Mutagentfrom mutagent.models import NameDescriptionVersionwith Mutagent() as client: prompt = client.prompt.create_prompt( NameDescriptionVersion( name="Support Assistant", system_prompt="You are a helpful support agent for {company}.", human_prompt="The customer asks: {question}", description="Customer support prompt", input_schema={ "type": "object", "properties": { "company": {"type": "string"}, "question": {"type": "string"}, }, }, tags=["production", "support"], ) ) print("Created:", prompt["id"])
Template variables use single braces: {variable}. Define matching keys in input_schema for validation.
with Mutagent() as client: client.prompt.delete_prompt(id_=123) # Force-delete (even if it has dataset items associated) client.prompt.delete_prompt(id_=123, force=True)