Skip to main content
This example demonstrates how to create and use an Upsonic Agent with DeepAgent architecture to conduct comprehensive business research and develop sales strategies. The example showcases how to leverage Upsonic’s coordination capabilities to manage multiple specialized agents working together on complex, multi-step research tasks.

Overview

Upsonic framework provides seamless integration for multi-agent systems. This example showcases:
  1. DeepAgent Integration β€” Using DeepAgent to coordinate specialized sub-agents
  2. Web Research β€” Using DuckDuckGo and Tavily for real-time company and industry data
  3. Financial Analysis β€” Using YFinance tools for stock and financial data
  4. Task Planning β€” Automatic task decomposition using planning tools
  5. Memory Persistence β€” SQLite-based session memory for continuity
  6. FastAPI Server β€” Running the agent as a production-ready API server
The agent uses four specialized sub-agents:
  • Company Researcher β€” Gathers comprehensive company information
  • Industry Analyst β€” Analyzes industry trends and market dynamics
  • Financial Analyst β€” Performs financial analysis using YFinance
  • Sales Strategist β€” Develops tailored sales strategies

Project Structure

Environment Variables

You can configure the model and search tools using environment variables:

Installation

Managing Dependencies

Sections: api, streamlit, development

Usage

Option 1: Run Directly

Runs the agent with default test inputs (OpenAI company research).

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

orchestrator.py

subagents.py

upsonic_configs.json

Key Features

DeepAgent Orchestration

The orchestrator uses DeepAgent’s planning capabilities to automatically break down complex research tasks into manageable steps and delegate them to specialized subagents.

Specialized Subagents

Each subagent is optimized for its specific domain:
  • Company Researcher: Web search tools for comprehensive company information
  • Industry Analyst: Advanced search for industry trends and market analysis
  • Financial Analyst: YFinance integration for real-time financial data
  • Sales Strategist: Strategy development based on research synthesis

Memory Persistence

Uses SQLite database for session persistence, allowing the agent to:
  • Maintain conversation history
  • Store research findings
  • Build upon previous sessions
  • Generate summaries for context

Repository

View the complete example: Company Research & Sales Strategy Agent