Skip to main content

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​

  1. Navigate to your project
  2. Go to the Prompts tab
  3. Click on your prompt to open the editor
  4. Test it thoroughly with different inputs
  5. Verify the outputs meet your requirements

Step 2: Deploy as Agent​

  1. In the prompt editor, click "Deploy as Agent"
  2. 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 deterministic
    • 0.7 = Balanced (recommended)
    • 0.9 = More creative and varied
  • Max Tokens: Limit response length (optional)
    • 500 = Short responses
    • 1000 = Medium responses
    • 2000 = Long responses

API Access​

Enable API Access: Toggle ON to allow external calls

Important

Only enable API access for agents you want to use externally. Draft agents don't need this.

Step 4: Deploy​

  1. Review all settings
  2. Click "Deploy Agent"
  3. Your agent is now created with status "draft"

Step 5: Generate API Key (If API Enabled)​

  1. Go to Agents tab
  2. Click on your new agent
  3. Click "API Keys" button
  4. Click "Create New API Key"
  5. 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)
  6. Click "Create"
  7. Copy the API key immediately (shown only once!)
pk_live_1234567890abcdef...
Security

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​

  1. Go to your project
  2. Click Agents tab
  3. Click "Create Agent" button

Step 2: Select Prompt​

  1. Choose from existing prompts in your project
  2. Select a specific version to pin
  3. 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:

StatusWhen to Use
DraftInitial creation, still configuring
TestingValidating with test cases
DeployedProduction-ready, actively used
PausedTemporarily disabled

To change status:

  1. Open agent settings
  2. Change Status dropdown
  3. 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​

  1. Open your agent
  2. Click "Execute" button
  3. Fill in required variables
  4. Click "Run"
  5. 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​

  1. Go to Testing tab in your agent
  2. Create test cases with expected inputs/outputs
  3. Run automated tests
  4. 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:

  1. Open your agent
  2. Click "Analytics" tab
  3. View charts and metrics

Updating Agents​

Update Configuration​

  1. Open agent settings
  2. Modify any settings (name, description, model, etc.)
  3. Click "Save"
  4. Changes apply immediately
Version Pinning

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​

  1. Open the agent from the Agents list to reach its detail page.
  2. Go to the Overview tab
  3. Find the Prompt Version section
  4. Click the Version Selector dropdown
  5. Browse available versions with their labels and dates
  6. Select the new version you want to use
  7. Review the change summary (what's different)
  8. 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

  1. Create a duplicate agent with status "Testing"
  2. Update it to the new version
  3. Run test executions
  4. When confident, update your production agent

Option 2: Use Analytics

  1. Update the production agent
  2. Monitor the Analytics tab closely
  3. Watch for changes in:
    • Success rate
    • Average latency
    • Token usage
    • Cost per execution
  4. Rollback immediately if metrics degrade

Rollback​

Made a mistake? Rollback is instant and safe:

Quick Rollback​

  1. Open your agent's detail page
  2. Click the Version Selector
  3. Select the previous version
  4. Click "Update Version"
  5. Confirm the rollback

From Execution History​

If you notice issues after an update:

  1. Go to the Executions tab
  2. Filter executions by date (before/after update)
  3. Compare performance metrics
  4. If new version is problematic, rollback using Version Selector

Rollback is instant - all new executions will use the previous version immediately.

Version Management Best Practice

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​

Warning

Deletion is permanent and will break any integrations using this agent.

To delete an agent:

  1. Open agent settings
  2. Scroll to Danger Zone
  3. Click "Delete Agent"
  4. Confirm deletion
  5. 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​


Need help? Check our FAQ or contact support.