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..."
}
Agents
Create Agent
Create a new agent configuration
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..."
}
Create a new agent configuration with provider credentials and invocation settings.
string
required
Name for the agent
string
required
LLM provider. Options:
openai, anthropic, bedrock, langchain, customobject
object
string
System prompt for the agent. Used for prompt optimization.
array
Default scorers to use for evaluation. Options:
relevance, faithfulness,
safety, hallucination_scorestring
required
Unique agent identifier
string
required
Agent name
string
required
LLM provider
string
required
ISO 8601 timestamp
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..."
}

