Skip to main content
This example demonstrates how to use an Upsonic Team in sequential mode to turn raw git log --oneline output into a developer-native Twitter/X post. Two agents run in a pipeline: Agent A distills commits into a technical summary; Agent B turns that summary into a single, post-ready tweet. Context passes from A → B automatically via mode="sequential" — no variable passing or glue code.

Overview

Upsonic framework provides a Team abstraction for multi-agent workflows. This example showcases:
  1. Sequential Teammode="sequential" runs agents in order and injects each agent’s output into the next agent’s context.
  2. Tech Lead Agent — Reads raw commit messages, filters out chore/docs, and produces a concise technical summary of user-facing changes.
  3. Growth Hacker Agent — Takes the summary and writes a single Twitter/X post with strict tone and format rules (no hashtags, no corporate language, minimal emoji).
  4. No Glue Code — You don’t pass strings or parse outputs between agents; the framework handles context handover.
The pipeline:
  • Input: A string of git log --oneline (mock in script; replace with real git log later).
  • Output: The final tweet from tasks[-1].response.

Project Structure

Environment Variables

Configure the OpenAI models used by both agents:
Or use a .env file in the project root.

Installation

Usage

Run the pipeline

Or from repo root:
The script uses mock commit data (RAW_COMMITS). To use real git output, replace RAW_COMMITS with the result of git log --oneline -n 5 (or pipe it in).

How It Works

Example Output

Agent A (Tech Lead) produces a technical summary:
Agent B (Growth Hacker) turns it into a tweet:
Programmatic access to the final result:

Complete Implementation

main.py

Two-agent pipeline

  • Tech Lead: Filters commits, focuses on feat/fix, outputs a structured technical summary.
  • Growth Hacker: Consumes that summary and applies strict tone/structure rules to produce one tweet.

Extensibility

You can add more agents (e.g. Editor, Translator) to the agents list and add corresponding Task entries. Context still flows in order; no extra glue code.

Cost

Roughly on the order of a few cents per run (Tech Lead on gpt-5-mini, Growth Hacker on gpt-4o). Adjust models in each Agent() if you want to trade cost vs. quality.

Repository

View the full example: Git Changelog Writer