Skip to main content

prompt_library

Saved prompts for reuse across agents.
type prompt_library {
  id: ID!
  name: String!
  content: String!
  tags: JSON          # string[]
  category: String
  description: String
  createdAt: Date!
  updatedAt: Date!
  RBAC: RBACData
}
Example query:
query {
  prompt_libraryPagination(
    filters: [
      { tags: { contains: ["support", "greeting"] } }
    ]
  ) {
    items {
      id
      name
      content
      tags
    }
  }
}

prompt_favorites

User’s favorited prompts.
type prompt_favorites {
  id: ID!
  user: ID!
  prompt: ID!
  createdAt: Date!
  updatedAt: Date!
}

Usage

The prompt library allows teams to:
  • Share prompts across multiple agents
  • Organize prompts with tags and categories
  • Version control prompt templates
  • Favorite prompts for quick access

Example: Creating a Reusable Prompt

mutation {
  prompt_libraryCreateOne(
    input: {
      name: "Customer Greeting"
      content: "Hello! I'm here to help you with {{topic}}. What can I assist you with today?"
      tags: ["greeting", "support", "customer-service"]
      category: "support"
      description: "Standard greeting for customer support agents"
    }
  ) {
    item {
      id
      name
    }
  }
}