Skip to main content

pytest for AI agents — trace, debug and catch regressions in LLM swarms

Project description

SwarmTrace 🐝

Pytest framework for AI Multi-Agents — trace, debug, and catch regressions in LLM swarms.

Built for the AMD Hackathon, SwarmTrace brings software engineering rigor to agentic AI systems. Test your multi-agent workflows like you test your code.


🎯 Why SwarmTrace?

LLM agents are unpredictable. SwarmTrace gives you:

  • Trace agent reasoning — see every decision, tool call, and output
  • Catch regressions — when agent behavior changes unexpectedly
  • Debug failures — pinpoint exactly where the swarm broke
  • CI/CD ready — integrates with any pytest pipeline

📦 Installation

git clone https://github.com/ravi3594444/swarmtrace.git
cd swarmtrace
pip install -r requirements.txt

🚀 Quick Start

from swarmtrace import SwarmTest, Agent

# Define your agent
agent = Agent(name="researcher", model="gpt-4")

# Write a test
def test_research_accuracy():
    result = agent.run("What is the capital of France?")
    assert "Paris" in result.output
    assert result.latency < 5.0  # seconds

🛠️ Tech Stack

  • Python 3.10+
  • pytest — test framework
  • LangChain / custom agent orchestration
  • OpenAI / Anthropic / Local LLM APIs

📝 License

MIT — built by Ravi Kumar

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

swarmtrace-0.2.1.tar.gz (16.5 kB view details)

Uploaded Source

Built Distribution

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

swarmtrace-0.2.1-py3-none-any.whl (18.7 kB view details)

Uploaded Python 3

File details

Details for the file swarmtrace-0.2.1.tar.gz.

File metadata

  • Download URL: swarmtrace-0.2.1.tar.gz
  • Upload date:
  • Size: 16.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.11

File hashes

Hashes for swarmtrace-0.2.1.tar.gz
Algorithm Hash digest
SHA256 16aad9895629b0994b21e6b7db7ae6d5b7f136dbfbd8e9a871d41b066ae73a70
MD5 b7c0a89556533ed69aa4a233972e26eb
BLAKE2b-256 57c343a341cf6da7340cd3ee1fe0e593ac7432cb9d7c9a4bafa5049c91b56b13

See more details on using hashes here.

File details

Details for the file swarmtrace-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: swarmtrace-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 18.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.11

File hashes

Hashes for swarmtrace-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 2cef061fc121d18f0fefbebe63b5fc5530a6aa526726f11fa0476b5854429b30
MD5 16936bf35603a2d9a51e0549eae9eaa6
BLAKE2b-256 f54a51df6f4f488d0297fcd02829ed202912520853fb441ded6bbaa05bc3cb63

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