Skip to main content
This example demonstrates how to create and use an Upsonic Agent with DeepAgent architecture to analyze customer needs, search the internet for real products, and generate a personalized sales offer. The example shows how to leverage Upsonic’s coordination capabilities to manage multiple specialized agents.

Overview

Upsonic framework provides seamless integration for multi-agent systems. This example showcases:
  1. DeepAgent Integration β€” Using DeepAgent to coordinate sub-agents
  2. Real-Time Data β€” Using ddgs (DuckDuckGo) to fetch live market prices
  3. Task Execution β€” Running complex multi-step tasks (Research -> Strategy -> Content)
  4. FastAPI Server β€” Running the agent as a production-ready API server
The agent uses three specialized sub-agents:
  • Product Researcher β€” Finds real products matching criteria
  • Pricing Strategist β€” Analyzes competition and suggests pricing
  • Creative Copywriter β€” Drafts the final email

Project Structure

Environment Variables

You can configure the model using environment variables:

Installation

Managing Dependencies

Sections: api, streamlit, development

Usage

Option 1: Run Directly

Runs the agent with a default test query.

Option 2: Run as API Server

Server starts at http://localhost:8000. API documentation at /docs. Example API call:

How It Works

Example Output

Query:
Response:

Complete Implementation

main.py

upsonic_configs.json

Repository

View the complete example: Sales Offer Generator