Skip to main content

Build Your First Agent

Create an AI agent that can answer questions about your data.

Prerequisites

Step 1: Create the Agent

In the console, go to Agents > New Agent:

  • Name: support-bot
  • Type: Customer Support
  • Model: Auto (recommended)
  • System Prompt:
You are a helpful customer support agent. Answer questions clearly and concisely.
If you don't know the answer, say so honestly.

Step 2: Test via API

curl -X POST https://llm.zihin.ai/api/v3/llm/public/call \
-H "X-Api-Key: zhn_live_xxxxx" \
-H "Content-Type: application/json" \
-d '{
"query": "What are your business hours?",
"model": "auto"
}'

Step 3: Add Tools (Optional)

Connect a database to give the agent access to real data:

  1. Go to Connections > Add Connection
  2. Enter your PostgreSQL credentials
  3. Select allowed tables
  4. Attach the connection to your agent

Now the agent can query your database to answer questions.

Step 4: Add a Trigger (Optional)

Create a webhook so external systems can invoke the agent:

  1. Go to Triggers > New Trigger
  2. Select your agent
  3. Copy the webhook URL
  4. Send POST requests to trigger conversations

Next Steps