A multi-agent pipeline built with the Upsonic AI Agent Framework. This example demonstrates how to use Team with mode="sequential" to turn raw git log output into a ready-to-post Twitter/X update — two agents pass context automatically, no glue code required.
- Sequential Team: Two agents run in sequence with automatic context handover (
mode="sequential") - Tech Lead Agent: Filters noise commits (
chore,docs) and extracts user-facing changes fromfeatandfixentries - Growth Hacker Agent: Converts the technical summary into a developer-native Twitter/X post (max 280 characters)
- No Glue Code: Output from Agent A flows into Agent B automatically — no variable passing or string parsing
- Python 3.10+
- OpenAI API key
-
Navigate to this directory:
cd examples/multi_agent/git_changelog_writer -
Install dependencies:
uv sync
-
Set up environment variables:
export OPENAI_API_KEY="your-api-key"
uv run main.pygit_changelog_writer/
├── main.py # Sequential Team pipeline
└── README.md # This file
-
Input: A changelog or
git log --onelinestring is passed to the first task. The example ships with mock data — swap it for realgit logoutput in production. -
Agent A (Tech Lead): Reads the commits, ignores housekeeping tags (
chore,docs), and produces a clean technical summary of user-facingfeatandfixentries. -
Context Handover: Upsonic's
mode="sequential"automatically injects Agent A's output into Agent B's task context. No manual wiring needed. -
Agent B (Growth Hacker): Applies strict tone and formatting rules to write a single Twitter/X post (max 280 characters) that reads like an engineer sharing something useful, not a marketing announcement.
-
Output:
tasks[-1].responsecontains the final tweet.
Agent A (Tech Lead) summarizes:
Summary of User-Facing Changes:
1. New Feature: Telegram Interface
- What Changed: Full Telegram bot interface for agents via webhook.
- Why Users Care: Agents can now be used over Telegram chat.
2. Bug Fix: LLM Usage Tracking
- What Changed: Fixed tracking for direct LLM call metrics.
- Why Users Care: Accurate usage data in dashboards.
Agent B (Growth Hacker) turns it into a tweet:
Upsonic v0.72.0 is out.
New Telegram interface so your agents can run over chat.
CLI now starts interfaces directly — no programmatic setup.
- Telegram bot interface (webhook, messages, media)
- CLI + interface compatibility
- LLM usage tracking fix
Changelog: [link]
- No glue code:
mode="sequential"handles all context passing between agents. - Tone-tuned: Agent B's instructions use specific constraints ("no hashtags", "no 'we're thrilled'") rather than vague guidelines.
- Extendable: Add more agents to the list (e.g., Editor, Translator) — context still flows automatically.
- Cost: ~$0.01 per run (both agents combined).