Skip to main content

Configure Your Bot

This tutorial walks you through setting up the AI chatbot — choosing a model, writing a system prompt, and enabling tools.

Prerequisites

Complete the Quick Start first. You need a running backend and an admin API key.

Choose your model

Chat-in-Bio supports three LLM providers. Set the corresponding API key in .env, then configure via the Admin API:

Providermodel_providerExample model_nameEnv var
Anthropicanthropicclaude-sonnet-4-20250514CHATINBIO_ANTHROPIC_API_KEY
OpenAIopenaigpt-4oCHATINBIO_OPENAI_API_KEY
Google AIgoogle-glagemini-2.0-flashCHATINBIO_GOOGLE_AI_API_KEY
curl -X PUT http://localhost:8000/api/admin/bot \
-H "Authorization: Bearer $ADMIN_KEY" \
-H "Content-Type: application/json" \
-d '{
"model_provider": "anthropic",
"model_name": "claude-sonnet-4-20250514",
"temperature": 0.7
}'

Write a system prompt

The system prompt defines your bot's personality. It's automatically augmented with your profile info and enabled tools, so keep it focused on tone and behavior:

curl -X PUT http://localhost:8000/api/admin/bot \
-H "Authorization: Bearer $ADMIN_KEY" \
-H "Content-Type: application/json" \
-d '{
"system_prompt": "You are a friendly assistant for Alex, a developer and content creator. Be concise and helpful. When visitors ask about projects, use the portfolio tool. When they ask about upcoming events, use the events tool. Always be welcoming."
}'
tip

The system prompt is combined with auto-generated context about your profile and tools. You don't need to repeat information that's already in your owner profile.

Enable tools

Tools let the AI agent interact with your content. Each tool renders rich A2UI components in the chat:

ToolWhat it does
linksDisplay your bio links
productsShow products with purchase buttons
eventsList events with RSVP capability
bookingShow available consultation slots
newsletterCollect email subscriptions
faqAnswer from your FAQ knowledge base
portfolioShowcase project cards

Enable the ones you need:

curl -X PUT http://localhost:8000/api/admin/bot \
-H "Authorization: Bearer $ADMIN_KEY" \
-H "Content-Type: application/json" \
-d '{
"enabled_tools": ["links", "products", "events", "faq", "portfolio"]
}'

Set up quick actions

Quick actions appear as suggestion buttons in the greeting message:

curl -X PUT http://localhost:8000/api/admin/bot \
-H "Authorization: Bearer $ADMIN_KEY" \
-H "Content-Type: application/json" \
-d '{
"greeting_message": "Hey! I am the AI assistant for Alex. What would you like to know?",
"quick_actions": [
{"label": "Upcoming events", "action": "show_events"},
{"label": "View portfolio", "action": "show_portfolio"},
{"label": "Book a call", "action": "book_call"}
]
}'

Verify your configuration

curl http://localhost:8000/api/admin/bot \
-H "Authorization: Bearer $ADMIN_KEY" | python -m json.tool

Next steps