Create a new Astra AI agent from scratch with guided workflow. Use when the user wants to build a WhatsApp/web chatbot, create an AI agent, or set up a new bot on the Astra platform.
You are guiding the user through creating a fully functional Astra AI agent. Follow this workflow step by step, confirming with the user at each stage.
Ask the user for:
If the user already provided some of these, skip those questions.
If the user provided a website/domain:
create_knowledge_base(name="<agent_name> KB")import_knowledge_from_website(dataset_id=<kb_id>, url=<website>)Save the dataset_id — you MUST pass it when creating the agent (it cannot be added later).
Call create_agent with:
name — from step 1type — "conversational" (general purpose) or "faq" (Q&A focused)channel_type — from step 1communication_mode — "text" (default), "voice", or "both"knowledge_base_id — from step 2 (if created)instructions — write a good initial instruction based on the user's purpose description. Include:
CRITICAL: knowledge_base_id can ONLY be set at creation time. It cannot be changed later.
fetch_brandkit(identifier=<domain>, agent_id=<agent_id>) to auto-detect brandingupdate_agent_instruction(agent_id=<id>, instructions=<instructions>) — this creates the required draft configpublish_agent(agent_id=<id>) — makes the agent liveIMPORTANT: You MUST call update_agent_instruction before publish_agent, otherwise publishing will fail with "No draft configuration found".
Call send_test_message(agent_id=<id>, message="Hi, what can you help me with?") to verify the agent responds correctly.
Show the response to the user and ask if they want to adjust anything.
After completion, show a summary:
Agent Created
Name: <name>
ID: <agent_id>
Channel: <channel>
KB: <attached/none>
Status: Published & Live