Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.



Static Badge . Static Badge . unclecode%2Fcrawl4ai | Trendshift . GPT Computer Assistant - Create intelligence for your products | Product Hunt

Made_with_python . pypi_downloads

What is Upsonic?

Upsonic offers a cutting-edge enterprise-ready framework where you can orchestrate LLM calls, agents, and computer use to complete tasks cost-effectively. It provides more reliable systems, scalability, and a task-oriented structure that you need while completing real-world cases.

Key features:

  • Production-Ready Scalability: Deploy seamlessly on AWS, GCP, or locally using Docker.
  • Task-Centric Design: Focus on practical task execution, with options for:
    • Basic tasks via LLM calls.
    • Advanced tasks with V1 agents.
    • Complex automation using V2 agents with MCP integration.
  • MCP Server Support: Utilize multi-client processing for high-performance tasks.
  • Tool-Calling Server: Exception-secure tool management with robust server API interactions.
  • Computer Use Integration: Execute human-like tasks using Anthropic’s ‘Computer Use’ capabilities.
  • Easily adding tools: You can add your custom tools and MCP tools with a single line of code.
  • Client-server arthitecture: Production ready stateless enterprise ready system


🛠️ Getting Started

Prerequisites

  • Python 3.10 or higher
  • Access to OpenAI or Anthropic API keys (Azure and Bedrock Supported)

Installation

pip install 'upsonic[server]'==0.35.0a1737117468


Creating a Client

Create a client to manage tools and tasks:

from upsonic import UpsonicClient, ObjectResponse, Task, AgentConfiguration
from upsonic.client.tools import Search

# Create an Upsonic client instance
client = UpsonicClient("devserver")

client.set_config("OPENAI_API_KEY", "YOUR_API_KEY")
client.default_llm_model = "gpt-4o"


Defining a Task

1) Description

The task is based on the description. We have a mechanism to automatically generate sub-tasks from a high-level task description. For example, a task to track AI industry developments might be described as: "Research latest news in Anthropic and OpenAI." This will be turned into smaller, more manageable tasks ("Make a Google search for Anthropic and OpenAI," "Read the blogs," "Read the official descriptions of Anthropic and OpenAI").

# Define a new Task
description = "Research latest news in Anthropic and OpenAI"

2) Response Format

The output is essential for deploying an AI agent across apps or as a service. In Upsonic, we use Pydantic BaseClass as input for the task system. This allows you to configure the output exactly how you want it, such as a list of news with title, body, and URL. You can create a flexible yet robust output mechanism that improves interoperability between the agent and your app.

# Example ObjectResponse usage
class News(ObjectResponse):
    title: str
    body: str
    url: str

class response_format(ObjectResponse):
    news_list: list[News]

3) Tool Integration

Our Framework officially supports Model Context Protocol (MCP) and custom tools. You can use hundreds of MCP servers at https://glama.ai/mcp/servers or https://smithery.ai/ We also support Python functions inside a class as a tool. You can easily generate your integrations with that.

@client.mcp()
class hackernews_mcp:
    command = "uvx"
    args = ["mcp-hn"]

@client.tool()
class MyTools:
    def our_server_status():
        return True

tools = [Search, MyTools] # GitHub

4) Task Defination

After defining these terms, you are ready to generate your first task. This structure is a key component of the Upsonic task-oriented structure. Once you define a task, you can run it with agents or directly via an LLM call to obtain the result over the Task object. The automatic sub-task mechanism is also essential for enhancing quality and precision.

This simplicity is a hallmark of Upsonic.

task1 = Task(description=description, response_format=response_format, tools=tools)


Defining an Agent

Agents are the standard way to configure an LLM for your employees to work on your requests. It is essential to consider the goals and context of tasks. In Upsonic, we have an automatic characterization mechanism that enriches the given information by researchers agents working on Upsonic. For example, a Product Manager Agent can be configured with job title, company URL, and company objectives. Representing agents as roles like it supports practical agents aligned with their unique objectives.

product_manager_agent = AgentConfiguration(
    job_title="Product Manager",
    company_url="https://upsonic.ai",
    company_objective="To build AI Agent framework that helps people get things done",
)


Running Tasks

Define the task and the agent, then combine them and run. The Upsonic Server will prepare and run the task. This standard method simplifies the use of agents in your SaaS applications or your new vertical AI agents.

client.agent(product_manager_agent, task1)

print(task1.response)


Features (Beta)

Only One LLM Call

LLMs have always been intelligent. We know exactly when to call an agent or an LLM. This creates a smooth transition from LLM to agent systems. The call method works like an agent, based on tasks and optimizing cost and latency for your requirements. Focus on the task. Don't waste time with complex architectures.

client.call(task1)

Memory

Humans have an incredible capacity for context length, which reflects their comprehensive context awareness and consistently produces superior results. In Upsonic, our memory system adeptly handles complex workflows, delivering highly personalized outcomes. It seamlessly remembers prior tasks and preferences, ensuring optimal performance. You can confidently set up memory settings within AgentConfiguration, leveraging the agent_id system. Agents, each with their distinct personality, are uniquely identified by their ID, ensuring precise and efficient execution.

agent_id_ = "product_manager_agent"

product_manager_agent = AgentConfiguration(
    agent_id_=agent_id_
    ...
    memory=True
)

Knowledge Base

The Knowledge Base provides private or public content to your agent to ensure accurate and context-aware tasks. For example, you can provide a PDF and URL to the agent. The Knowledge Base seamlessly integrates with the Task System, requiring these sources.

from upsonic import KnowledgeBase

my_knowledge_base = KnowledgeBase(files=["sample.pdf", "<https://upsonic.ai>"])

task1 = Task(
    ...
    context[my_knowledge_base]
)

Connecting Task Outputs

Chaining tasks is essential for complex workflows where one task's output informs the next. You can assign a task to another as context for performing the job. This will prepare the response of task 1 for task 2.

task1 = Task(
    ...
)

task2 = Task(
    ...
    context[task1]
)

Be an Human

Agent and characterization are based on LLM itself. We are trying to characterize the developer, PM, and marketing. Sometimes, we need to give a human name. This is required for tasks like sending personalized messages or outreach. For these requirements, we have name and contact settings in AgentConfiguration. The agent will feel like a human as you specify.

product_manager_agent = AgentConfiguration(
    ...
    name="John Walk"
    contact="john@upsonic.ai"
)

Multi Agent

Distribute tasks effectively across agents with our automated task distribution mechanism. This tool matches tasks based on the relationship between agent and task, ensuring collaborative problem-solving across agents and tasks.

client.multi_agent([agent1, agent2], [task1, task2])

Reliable Computer Use

Dockerized Server Deploy

Refrection (Soon)

Verifiers (Soon)

Release files for upsonic 0.35.0a1737195981

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for upsonic 0.35.0a1737195981
File Size Uploaded
upsonic-0.35.0a1737195981.tar.gz 179.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for upsonic 0.35.0a1737195981
File Interpreter ABI Platform
upsonic-0.35.0a1737195981-py3-none-any.whl Python 3 none any Details

Total release size: 238.7 kB

Release files / upsonic-0.35.0a1737195981.tar.gz

Download URL upsonic-0.35.0a1737195981.tar.gz
Size 179.0 kB
Tags Source
SHA-256 checksum
How to use checksums
f7c426d919f7a89770b351cfdd61fc416c714b62565dfc37a1076c7be710c2b3
BLAKE2b-256 checksum
How to use checksums
697bfc7fd65fea48c22d3283c131490080b52de6fb3a1f0a12a8e5879f928d5c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.5.21

Release files / upsonic-0.35.0a1737195981-py3-none-any.whl

Download URL upsonic-0.35.0a1737195981-py3-none-any.whl
Size 59.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b76c30aa06388f82b6e4d8994e19f0848303207b73114624ede55775dd5ebd5d
BLAKE2b-256 checksum
How to use checksums
ee441442349261e7720cde12e1162bb3bf5f9e61b37d7aaf0662993c37cce7e5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.5.21

Release history Release notifications | RSS feed

0.77.3

2 release files

0.77.2

2 release files

0.77.1

2 release files

0.76.3

2 release files

0.76.2

2 release files

0.76.1

2 release files

0.76.0

2 release files

0.75.0

2 release files

0.74.3

2 release files

0.74.2

2 release files

0.74.1

2 release files

0.74.0

2 release files

0.73.2

2 release files

0.73.1

2 release files

0.72.6

2 release files

0.72.5

2 release files

0.72.4

2 release files

0.72.3

2 release files

0.72.2

2 release files

0.72.1

2 release files

0.71.4

2 release files

0.71.3

2 release files

0.71.2

2 release files

0.71.1

2 release files

0.71.0

2 release files

0.70.0

2 release files

0.69.3

2 release files

0.69.2

2 release files

0.69.1

2 release files

0.69.0

2 release files

0.68.3

2 release files

0.68.2

2 release files

0.67.4

2 release files

0.67.3

2 release files

0.67.2

2 release files

0.67.1

2 release files

0.67.0

2 release files

0.65.1

2 release files

0.65.0

2 release files

0.64.1

2 release files

0.63.0

2 release files

0.61.1

2 release files

0.61.0

2 release files

0.59.9

2 release files

0.59.8

2 release files

0.59.7

2 release files

0.59.6

2 release files

0.59.5

2 release files

0.59.4

2 release files

0.59.3

2 release files

0.59.2

2 release files

0.59.1

2 release files

0.59.0

2 release files

0.58.0

2 release files

0.56.1

2 release files

0.56.0

2 release files

0.55.6

2 release files

0.55.5

2 release files

0.53.1

2 release files

0.53.0

2 release files

0.52.4

2 release files

0.50.5

2 release files

0.50.4

2 release files

0.50.3

2 release files

0.50.2

2 release files

0.50.1

2 release files

0.50.0

2 release files

0.49.0

2 release files

0.48.0

2 release files

0.45.4

2 release files

0.45.3

2 release files

0.45.2

2 release files

0.45.1

2 release files

0.45.0

2 release files

0.44.2

2 release files

0.44.1

2 release files

0.44.0

2 release files

0.39.0

2 release files

0.38.1

2 release files

0.38.0

2 release files

0.37.0

2 release files

0.36.0

2 release files

This release

0.34.3

1 release file

0.34.2

1 release file

0.34.1

1 release file

0.34.0

1 release file

0.33.1

1 release file

0.32.0

1 release file

0.30.7

1 release file

0.30.2

1 release file

0.30.0

1 release file

0.28.4

1 release file

0.28.3

1 release file

0.28.2

1 release file

0.28.1

1 release file

0.28.0

1 release file

0.27.0

1 release file

0.26.0

1 release file

0.25.0

1 release file

0.24.2

1 release file

0.24.1

1 release file

0.24.0

1 release file

0.23.4

1 release file

0.23.3

1 release file

0.23.2

1 release file

0.23.1

1 release file

0.23.0

1 release file

0.22.0

1 release file

0.21.0

1 release file

0.20.3

1 release file

0.20.2

1 release file

0.20.1

1 release file

0.20.0

1 release file

0.19.4

1 release file

0.19.3

1 release file

0.19.2

1 release file

0.19.1

1 release file

0.19.0

1 release file

0.18.0

1 release file

0.17.1

1 release file

0.17.0

1 release file

0.16.1

1 release file

0.16.0

1 release file

0.15.0

1 release file

0.14.3

1 release file

0.14.2

1 release file

0.14.1

1 release file

0.14.0

1 release file

0.13.3

1 release file

0.13.2

1 release file

0.13.1

1 release file

0.13.0

1 release file

0.12.5

1 release file

0.12.4

1 release file

0.12.3

1 release file

0.12.2

1 release file

0.12.1

1 release file

0.12.0

1 release file

0.11.10

1 release file

0.11.9

1 release file

0.11.8

1 release file

0.11.7

1 release file

0.11.6

1 release file

0.11.5

1 release file

0.11.4

1 release file

0.11.3

1 release file

0.11.2

1 release file

0.11.1

1 release file

0.11.0

1 release file

0.10.2

1 release file

0.10.1

1 release file

0.10.0

1 release file

0.9.0

1 release file

0.8.4

1 release file

0.8.3

1 release file

0.8.2

1 release file

0.8.1

1 release file

0.8.0

1 release file

0.7.2

1 release file

0.7.1

1 release file

0.7.0

1 release file

0.6.4

1 release file

0.6.3

1 release file

0.6.2

1 release file

0.6.1

1 release file

0.6.0

1 release file

0.5.0

1 release file

0.4.15

1 release file

0.4.14

1 release file

0.4.13

1 release file

0.4.12

1 release file

0.4.11

1 release file

0.4.10

1 release file

0.4.9

1 release file

0.4.8

1 release file

0.4.7

1 release file

0.4.6

1 release file

0.4.5

1 release file

0.4.4

1 release file

0.4.3

1 release file

0.4.2

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page