Quickstart Guide
Get up and running with SmartGraph in minutes
Welcome to SmartGraph! This guide will help you set up your first SmartGraph application in just a few minutes. We’ll create a simple AI assistant that can answer questions and perform web searches.
Prerequisites
- Python 3.11 or higher
- pip (Python package installer)
Installation
Install SmartGraph
First, let’s install SmartGraph and its dependencies. Open your terminal and run:
Set Up Your Environment
Create a new directory for your project and navigate into it:
Create a new file called .env
in this directory and add your OpenAI API key:
Replace your_api_key_here
with your actual OpenAI API key.
Create Your First SmartGraph Application
Create a new file called app.py
and add the following code:
This script sets up a simple AI assistant that can answer questions and perform web searches when needed.
Run Your Application
Now, let’s run your SmartGraph application:
You should see a prompt asking you to input a question. Try asking various questions, including some that might require a web search.
Example interaction:
What’s Next?
Congratulations! You’ve just created your first SmartGraph application. This simple example demonstrates the power of SmartGraph in creating reactive, AI-powered applications.
To learn more and expand your SmartGraph skills, check out these resources:
Core Concepts
Understand the fundamental building blocks of SmartGraph
Pipelines and Branching
Learn how to create more complex workflows
AI Assistants
Dive deeper into creating sophisticated AI assistants
Custom Components
Extend SmartGraph’s functionality with your own components
Happy coding with SmartGraph!
Was this page helpful?