Skip to main content
Get started with Upsonic by building your first agent in minutes. The Quickstart guide walks you through the essential features of Upsonic, from creating your first agent to adding memory, knowledge bases, and building multi-agent teams. Each section provides practical examples you can run immediately.

Your First Agent

Your first agent with a simple and powerful AI Agent Development framework. Let’s create your first agent with Upsonic by creating an Agent, Task, and Tool.
pip install upsonic 
stock_analysis.py
from upsonic import Agent, Task from upsonic.tools.common_tools import YFinanceTools  agent = Agent(model="openai/gpt-4o", name="Stock Analyst Agent")  task = Task(description="Give me a summary about tesla stock with tesla car models", tools=[YFinanceTools()])  agent.print_do(task) 

Add Memory

Add conversational memory to your agent to remember past interactions.
with_memory.py
from upsonic import Agent, Task from upsonic.storage import Memory, InMemoryStorage  memory = Memory(  storage=InMemoryStorage(),  session_id="session_001",  full_session_memory=True )  agent = Agent(model="openai/gpt-4o", memory=memory)  task1 = Task(description="My name is John") agent.print_do(task1)  task2 = Task(description="What is my name?") agent.print_do(task2) # Agent remembers: "Your name is John" 

Add Knowledge Base

Add a knowledge base to provide context and information to your agent.
pip install "upsonic[loaders]" 
with_knowledge.py
from upsonic import Agent, Task, KnowledgeBase from upsonic.embeddings import OpenAIEmbedding from upsonic.vectordb import QdrantProvider from upsonic.vectordb.config import Config, CoreConfig, ProviderName, Mode  embedding_provider = OpenAIEmbedding()  config = Config(  core=CoreConfig(  provider_name=ProviderName.QDRANT,  mode=Mode.EMBEDDED,  db_path="./upsonic_vectors",  collection_name="upsonic_knowledge",  vector_size=1536  ) ) vectordb = QdrantProvider(config)  kb = KnowledgeBase(  sources=["README.md"],  embedding_provider=embedding_provider,  vectordb=vectordb )  agent = Agent(model="openai/gpt-4o")  task = Task(  description="What is the telemetry information of the upsonic",  context=[kb] ) agent.print_do(task) 

Create Team

Create a team of agents that work together to solve complex tasks.
with_team.py
from upsonic import Agent, Task, Team  researcher = Agent(  model="openai/gpt-4o",  name="Researcher",  role="Research Specialist",  goal="Find accurate information and data" )  writer = Agent(  model="openai/gpt-4o",  name="Writer",  role="Content Writer",  goal="Create clear and engaging content" )  team = Team(agents=[researcher, writer], mode="sequential")  tasks = [  Task(description="Research the latest developments in quantum computing"),  Task(description="Write a blog post about quantum computing for general audience") ]  result = team.do(tasks) print(result)