Skip to main content

Documentation Index

Fetch the complete documentation index at: https://playgent.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

Agents

An Agent is your AI system configuration in Playgent. It includes your LLM provider, credentials, system prompt, and default evaluation metrics.

Quick Start

from playgent import Playgent

client = Playgent(api_key="your-api-key")

agent = client.agents.create(
    name="Customer Support Agent",
    provider="openai",
    credentials={"OPENAI_API_KEY": "sk-xxx..."},
    system_prompt="You are a helpful customer support agent for Acme Corp...",
    default_scorers=["answer_relevancy", "faithfulness", "bias"]
)

Configuration Options

Supported Providers

ProviderValue
OpenAIopenai
Anthropicanthropic
AWS Bedrockbedrock
LangChainlangchain
Customcustom

System Prompt

Base instructions for your agent. Used during test execution and prompt optimization.

Default Scorers

Automatic evaluation metrics for all test runs:
agent = client.agents.create(
    name="Support Agent",
    provider="openai",
    default_scorers=["answer_relevancy", "faithfulness", "bias"]
)

Custom Endpoints

For custom agent invocation:
agent = client.agents.create(
    name="Custom Agent",
    provider="custom",
    invocation={
        "url": "https://your-api.com/chat",
        "headers": {"X-API-Key": "your-key"}
    }
)

Next Steps

Test Cases

Create test scenarios for your agent

API Reference

Full API documentation