Skip to main content
POST
/
v1
/
agents
curl -X POST https://api.playgent.com/v1/agents \
  -H "Authorization: Bearer your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Customer Support Agent",
    "provider": "openai",
    "credentials": {
      "OPENAI_API_KEY": "sk-xxx..."
    },
    "system_prompt": "You are a helpful customer support agent...",
    "default_scorers": ["relevance", "faithfulness", "safety"]
  }'
{
  "id": "agent_abc123",
  "name": "Customer Support Agent",
  "provider": "openai",
  "created_at": "2024-12-16T10:00:00Z",
  "api_key": "pk_live_xxx..."
}

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.

Create a new agent configuration with provider credentials and invocation settings.
name
string
required
Name for the agent
provider
string
required
LLM provider. Options: openai, anthropic, bedrock, langchain, custom
credentials
object
Provider credentials (encrypted at rest)
invocation
object
Custom invocation configuration for calling your agent
system_prompt
string
System prompt for the agent. Used for prompt optimization.
default_scorers
array
Default scorers to use for evaluation. Options: relevance, faithfulness, safety, hallucination_score
id
string
required
Unique agent identifier
name
string
required
Agent name
provider
string
required
LLM provider
created_at
string
required
ISO 8601 timestamp
api_key
string
required
Agent-specific API key for SDK authentication
curl -X POST https://api.playgent.com/v1/agents \
  -H "Authorization: Bearer your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Customer Support Agent",
    "provider": "openai",
    "credentials": {
      "OPENAI_API_KEY": "sk-xxx..."
    },
    "system_prompt": "You are a helpful customer support agent...",
    "default_scorers": ["relevance", "faithfulness", "safety"]
  }'
{
  "id": "agent_abc123",
  "name": "Customer Support Agent",
  "provider": "openai",
  "created_at": "2024-12-16T10:00:00Z",
  "api_key": "pk_live_xxx..."
}