Creating Agents
Learn how to create production-ready agents from your prompts in just a few steps.
Prerequisites
- A PrompTick account
- A project created
- A tested prompt (or use Generate Prompt to create one)
Method 1: From an Existing Prompt
The recommended way - test your prompt first, then deploy it as an agent.
Step 1: Test Your Prompt
- Navigate to your project
- Go to the Prompts tab
- Click on your prompt to open the editor
- Test it thoroughly with different inputs
- Verify the outputs meet your requirements
Step 2: Deploy as Agent
- In the prompt editor, click "Deploy as Agent"
- A dialog will open with your prompt details pre-filled
Step 3: Configure Agent Settings
Basic Information
- Name: Give your agent a descriptive name
Example: "E-commerce Product Description Generator" - Description: Explain what the agent does
Example: "Generates SEO-optimized product descriptions for online stores" - Icon: Choose an emoji or icon (optional)
Example: 🛍️ - Category: Classify your agent
Options: General, Content, Support, Analysis, Coding, etc.
Variables Configuration
PrompTick automatically detects variables from your prompt ({{variable_name}}).
Required Variables: Must be provided in every API call
requiredVariables: ['product_name', 'features'];
Optional Variables: Can be omitted (use defaults if configured)
optionalVariables: ["tone", "length"]
defaultVariableValues: {
tone: "professional",
length: "medium"
}
Model Configuration
Override the prompt's default model settings:
- Model: Select AI model
gemini-1.5-flash(Fast, cost-effective)gemini-1.5-pro(Higher quality)gpt-4(Premium quality)
- Temperature: Control creativity (0.0 - 1.0)
0.3= More focused and deterministic0.7= Balanced (recommended)0.9= More creative and varied
- Max Tokens: Limit response length (optional)
500= Short responses1000= Medium responses2000= Long responses
API Access
Enable API Access: Toggle ON to allow external calls
Only enable API access for agents you want to use externally. Draft agents don't need this.
Step 4: Deploy
- Review all settings
- Click "Deploy Agent"
- Your agent is now created with status "draft"
Step 5: Generate API Key (If API Enabled)
- Go to Agents tab
- Click on your new agent
- Click "API Keys" button
- Click "Create New API Key"
- Configure the key:
- Name: Identify the key's purpose
- Rate Limits: Set per-minute, per-hour, per-day limits
- Expiration: Set expiry date (optional)
- Allowed Origins: For CORS (web apps)
- Click "Create"
- Copy the API key immediately (shown only once!)
pk_live_1234567890abcdef...
Store API keys securely! Never commit them to version control or share them publicly.
Method 2: Create Agent from Scratch
Create an agent directly without using an existing prompt.
Step 1: Open Agent Creation Dialog
- Go to your project
- Click Agents tab
- Click "Create Agent" button
Step 2: Select Prompt
- Choose from existing prompts in your project
- Select a specific version to pin
- Or create a new prompt first
Step 3: Configure (same as Method 1)
Follow the same configuration steps as Method 1.
Agent Settings
Status Management
Update agent status as it progresses:
| Status | When to Use |
|---|---|
| Draft | Initial creation, still configuring |
| Testing | Validating with test cases |
| Deployed | Production-ready, actively used |
| Paused | Temporarily disabled |
To change status:
- Open agent settings
- Change Status dropdown
- Click "Save"
Visibility
Control who can see and use your agent:
- Private: Only you and your organization
- Public: Anyone with the API key (if sharing)
Rate Limits
Set limits to prevent abuse and control costs:
{
requestsPerMinute: 100, // Burst protection
requestsPerHour: 5000, // Hourly cap
requestsPerDay: 100000 // Daily budget
}
When limits are exceeded, the API returns 429 Too Many Requests.
Testing Your Agent
Method 1: Dashboard Execution
- Open your agent
- Click "Execute" button
- Fill in required variables
- Click "Run"
- View the response
Method 2: API Call
Test with cURL:
curl -X POST https://api.promptick.ai/api/v1/agents/YOUR_AGENT_ID/execute \
-H "Authorization: Bearer pk_live_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"variables": {
"product_name": "Test Product",
"features": "Feature 1, Feature 2"
}
}'
Method 3: Built-in Test Cases
- Go to Testing tab in your agent
- Create test cases with expected inputs/outputs
- Run automated tests
- Review results
Monitoring & Analytics
Track your agent's performance:
Execution History
- View all API calls
- See input variables used
- Check response times
- Review error rates
Usage Analytics
- Requests per day/hour/minute
- Total cost
- Success/failure rates
- Average latency
Cost Tracking
- Tokens consumed
- Model costs
- Total spend
- Cost per request
Access analytics:
- Open your agent
- Click "Analytics" tab
- View charts and metrics
Updating Agents
Update Configuration
- Open agent settings
- Modify any settings (name, description, model, etc.)
- Click "Save"
- Changes apply immediately
Agents stay pinned to their prompt version. To use a new prompt version, you must update the pinned version manually.
Change Pinned Version
NEW: You can now update an agent's prompt version without recreating the agent!
Using the Version Selector
- Navigate to your agent's detail page (
/agents/[agentId]) - Go to the Overview tab
- Find the Prompt Version section
- Click the Version Selector dropdown
- Browse available versions with their labels and dates
- Select the new version you want to use
- Review the change summary (what's different)
- Click "Update Version" to confirm
What Happens
- ✅ Agent ID stays the same
- ✅ API keys remain valid
- ✅ All integrations continue working
- ✅ New executions use the new prompt version
- ✅ Previous executions remain unchanged
Testing New Versions
Best Practice: Test before updating production agents
Option 1: Create Test Agent
- Create a duplicate agent with status "Testing"
- Update it to the new version
- Run test executions
- When confident, update your production agent
Option 2: Use Analytics
- Update the production agent
- Monitor the Analytics tab closely
- Watch for changes in:
- Success rate
- Average latency
- Token usage
- Cost per execution
- Rollback immediately if metrics degrade
Rollback
Made a mistake? Rollback is instant and safe:
Quick Rollback
- Open your agent's detail page
- Click the Version Selector
- Select the previous version
- Click "Update Version"
- Confirm the rollback
From Execution History
If you notice issues after an update:
- Go to the Executions tab
- Filter executions by date (before/after update)
- Compare performance metrics
- If new version is problematic, rollback using Version Selector
Rollback is instant - all new executions will use the previous version immediately.
Always keep notes about what changed in each prompt version. This makes it easier to understand the impact of version updates and troubleshoot issues.
Deleting Agents
Deletion is permanent and will break any integrations using this agent.
To delete an agent:
- Open agent settings
- Scroll to Danger Zone
- Click "Delete Agent"
- Confirm deletion
- All API keys are automatically revoked
Best Practices
1. Test Before Deploying
- Create with status "Draft"
- Test extensively with various inputs
- Only mark "Deployed" when confident
2. Use Descriptive Names
Good: "Product Description Generator - E-commerce" Bad: "Agent 1"
3. Document Variables
Add clear descriptions for each variable so API users know what to provide.
4. Set Reasonable Rate Limits
Start conservative, increase based on actual usage:
- Small project: 10 req/min
- Medium project: 100 req/min
- Large project: 1000 req/min
5. Monitor Costs
- Check daily cost reports
- Set up budget alerts
- Use Flash models for simple tasks
6. Version Control
- Pin specific prompt versions for production
- Test new versions in separate agents first
- Keep version history documentation
Troubleshooting
Agent Not Executing
Check:
- ✅ Status is not "Paused"
- ✅ API access is enabled
- ✅ API key is valid and not expired
- ✅ Rate limits not exceeded
- ✅ All required variables provided
Unexpected Responses
Check:
- ✅ Correct prompt version pinned
- ✅ Variables being substituted correctly
- ✅ Model settings (temperature, max tokens)
- ✅ Test cases passing
Rate Limit Errors
Solutions:
- Increase rate limits in agent settings
- Implement retry logic with exponential backoff
- Upgrade to higher plan
- Cache responses on client side
Next Steps
- Manage API Keys - Secure your agents
- Integration Guide - Connect your application
- API Reference - Full endpoint documentation
- Best Practices - Production tips
Need help? Check our FAQ or contact support.