Learn how to build an interactive AI chat assistant using Atlas’s ConversationAgent. This tutorial will teach you how to create a conversational AI that maintains context and can help with various tasks.
version: "1.0"workspace: name: "chat-assistant" description: "Interactive AI chat assistant"agents: assistant: type: "system" agent: "conversation" config: model: "claude-3-5-sonnet-20241022" system_prompt: | You are a helpful AI assistant named Atlas. You're knowledgeable, friendly, and eager to help with any questions or tasks. Your capabilities include: - Answering questions on a wide range of topics - Helping with analysis and problem-solving - Providing coding assistance - General conversation and support Always be concise but thorough, and ask clarifying questions when needed. # Enable conversation features memory_enabled: true streaming: true max_conversation_length: 50signals: chat: provider: "cli" description: "Start a chat conversation" schema: type: "object" properties: message: type: "string" conversation_id: type: "string" description: "Optional ID to continue a conversation"jobs: chat-session: triggers: - signal: "chat" execution: agents: - id: "assistant" input_source: "signal"
Continue the same conversation by including a conversation ID:
Copy
Ask AI
# First messageatlas signal trigger chat --data '{ "message": "My name is Alice and I need help planning a trip to Japan", "conversation_id": "trip-planning-123"}'# Follow-up message (assistant remembers you're Alice)atlas signal trigger chat --data '{ "message": "What cities should I visit?", "conversation_id": "trip-planning-123" }'
agents: technical-assistant: type: "system" agent: "conversation" config: system_prompt: | You are a technical assistant specializing in software development. Focus on providing code examples, technical explanations, and best practices. creative-assistant: type: "system" agent: "conversation" config: system_prompt: | You are a creative writing assistant. Help with storytelling, character development, and creative ideas. Be imaginative! temperature: 0.8 # Higher for creativity