Skip to main content

Synthora is a lightweight and extensible framework for LLM-driven Agents and ALM research. It provides essential components to build, test and evaluate agents. At its core, Synthora aims to assemble an agent with a single config, thus minimizing your effort in building, tuning, and sharing agents.

Project description

Synthora

Read the Docs

Synthora is a lightweight and extensible framework for LLM-driven Agents and ALM research. It provides essential components to build, test and evaluate agents. At its core, Synthora aims to assemble an agent with a single config, thus minimizing your effort in building, tuning, and sharing agents.

Note: This project is in its very early stages of development. The APIs are unstable and subject to significant changes, which may introduce breaking updates. Use with caution, as there are inherent risks in adopting this framework at its current maturity level. Feedback and contributions are welcome to help improve its stability and functionality.

Motivation 🧠

Agent practitioners start to realize the difficulty in tuning a "well-rounded" agent with tons of tools or instructions in a single layer. Recent studies like TinyStories, Specializing Reasoning, Let's Verify SbS, ReWOO, etc. also point us towards an intuitive yet undervalued direction 👉

An LLM is more capable if you create a context/distribution shift specialized to some target tasks.

Sadly, there is no silver bullet for agent specialization. For example, you can

  • Simply add Let's think step by step. in your prompt for more accurate Math QA.
  • Give a few-shot exemplar in your prompt to guide a better reasoning trajectory for novel plotting.
  • Supervise fine-tuning (SFT) your 70B llama2 like this to match reasoning of 175B GPT-3.5.
  • And more ...

Isn't it beautiful if one shares his effort in specialized intelligence, allowing others to reproduce, build on, or interact with it? 🤗 This belief inspires us to build Synthora, designed for agent specialization, sharing, and interaction, to stackingly achieve collective growth towards greater intelligence..

Core Features 💡

  • ⚙️ Config-driven agent assembling and chat.
  • 🚀 Large amount of prebuilt agent types, LLM clients, tools, memory systems, and more.
  • 🪶 Lightweight and highly extensible implementation of essential components.
  • 🧪 Aligning with state-of-the-art AI research.
  • 🤝 Enabling multi-agent interactions.
  • 🔧 Powerful workflows to assist in accomplishing diverse tasks.

Installation

To install Synthora Python Library from PyPI, simply run:

pip install synthora

What Makes Synthora Different

Existing agent frameworks are too heavy. We aim to provide users with a solution that is as lightweight as possible while remaining fully functional.

Synthora provides most of the core features you need, such as Agents, including various types of predefined agents (e.g., COT, TOT, ReAct, etc.). It also offers a multi-agent interaction framework, allowing users to combine multiple agents through configuration files or simple code. As for Tools, Synthora provides multiple ways to convert functions or classes into forms that agents can call. Synthora itself only offers the most basic tools. We encourage users to leverage tools from other open-source projects or create custom tools. Finally, there’s Workflow. Synthora provides a powerful workflow system that allows users to define complex workflows. Workflows support parallel and sequential operations, as well as loops and branches, meeting the needs of most scenarios.

At present, Synthora does not support Retrieval. Many retrieval libraries already exist, offering robust features that Synthora is unlikely to surpass. However, these libraries can be easily integrated with Synthora. All you need to do is treat them as a tool or use a sequential workflow to obtain retrieval results.

Quick Start

Chat with Agent

import warnings

from synthora.callbacks import RichOutputHandler
from synthora.agents import VanillaAgent

warnings.filterwarnings("ignore")

agent = VanillaAgent.default("You are a Vanilla Agent.", handlers=[RichOutputHandler()])
agent.run("Hi! How are you?")

Define Tools

from synthora.toolkits.decorators import tool


@tool
def add(a: int, b: int) -> int:
    r"""Add two numbers together."""
    return a + b

Workflow

def add(x: int, y: int) -> int:
    return x + y

flow = (BaseTask(add) | BaseTask(add)) >> BaseTask(add)
flow.run(1, 2)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

synthora-0.1.3.tar.gz (56.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

synthora-0.1.3-py3-none-any.whl (111.2 kB view details)

Uploaded Python 3

File details

Details for the file synthora-0.1.3.tar.gz.

File metadata

  • Download URL: synthora-0.1.3.tar.gz
  • Upload date:
  • Size: 56.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.5 CPython/3.13.1 Linux/5.15.153.1-microsoft-standard-WSL2

File hashes

Hashes for synthora-0.1.3.tar.gz
Algorithm Hash digest
SHA256 2f0ac137842d9c2260bdf64a5bdb1fb3b5c1fd05c871eeb94bc654705d94d991
MD5 f779e4d38c5c55736789bd700837a303
BLAKE2b-256 6e068d4b97358aafc12561c3399a9971909a08b9a7cd230f0cabf4a49ce6bf0c

See more details on using hashes here.

File details

Details for the file synthora-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: synthora-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 111.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.5 CPython/3.13.1 Linux/5.15.153.1-microsoft-standard-WSL2

File hashes

Hashes for synthora-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 c471b93f888d65584f4e4be63f3bfc0fe128bf50de9e9f8a2a97c7ff4c189282
MD5 c712d41628af5bbc53583b9f0dcd67a4
BLAKE2b-256 6d919351d1e9aa6d1542f1fdcb508f62f7f4793122b439fca75a13c77d0b0d29

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page