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.0.tar.gz (15.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.0-py3-none-any.whl (17.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: swarmtrace-0.2.0.tar.gz
  • Upload date:
  • Size: 15.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.0.tar.gz
Algorithm Hash digest
SHA256 bc6f3a756049749b878e09eb0ccde8e1d0471fd971e30b732def2c7bbdd9593d
MD5 f0a4bb4410eb1bf3e1908e223207870c
BLAKE2b-256 bb2183781e79810ed4c0e0546b8fa133e39759009f6336d3d206cea60095106b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: swarmtrace-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 17.5 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 09ef8b5ac6d221b9751391f9ba5e63198ac39178c12cbf81d9d3804e313464f7
MD5 0f507e506ec0358b01e82746f3423d50
BLAKE2b-256 6d90717a67d7f724ca6beb03bd716bd0988d0baa0e82ff3d6a9c076234d84112

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