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.1.9.tar.gz (15.2 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.1.9-py3-none-any.whl (17.3 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for swarmtrace-0.1.9.tar.gz
Algorithm Hash digest
SHA256 c2456e97452bbff824bebd5b05b179f9102357be12ff8a8ea9054a2f063587ee
MD5 f110d49f660abad0c8c6c64c7394d695
BLAKE2b-256 eb45f8e72e468cb216479bd3c6c3e4d4f3f6f054fed0a9011651c0918c42f66f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: swarmtrace-0.1.9-py3-none-any.whl
  • Upload date:
  • Size: 17.3 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.1.9-py3-none-any.whl
Algorithm Hash digest
SHA256 2b8cf6196128257cd8fa1361a202bfa90dfdd9ed10d02e22acc41c442a46976f
MD5 d48e578ce37453b174dde34a656be5e2
BLAKE2b-256 5071e1f28bc6361551fbe860c444d64f49afc3e5f469d7b44e616ebfeec76304

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