Skip to main content

Multi-agent orchestration and testing framework with LangGraph, CrewAI, and FastAPI.

Project description

Agent Testing Library

This repository provides a comprehensive framework for building, testing, and orchestrating agentic workflows in Python. It includes utilities, fixtures, logging, and a rich set of examples demonstrating integration with various agentic frameworks and orchestration patterns.

Project Structure

  • agent_test/: Core testing library for agents

    • src/agent_utils/: Utilities for agent orchestration and metadata
      • remoterunnable_utils.py, models/agent_info.py, models/api_mock_type.py, models/global_metadata.py
    • common/: Logging and shared utilities
      • agent_test_logger.py
    • fixture/: Test fixtures and API mocks
      • fixture_class.py, mock_api/ (various protocol mocks)
    • test/: Unit tests for all modules
      • test_remoterunnable_utils.py, test_agent_info.py, test_api_mock_type.py, test_global_metadata.py, test_agent_test_logger.py, test_fixture_class.py
  • examples/: Practical agentic workflow examples

    • common/: Shared example code
      • api1/api_code.py, worker1/main.py, worker2/main.py, worker3/main.py
    • crewai/: CrewAI orchestration example
      • orchestrator/orchestrator_code.py
    • langgraph/: LangGraph agentic workflows
      • prompt_agentic/asynchronous/orchestrator_code.py, prompt_agentic/asynchronous/test_orchestrator.py
      • prompt_agentic/synchronous/orchestrator_code.py, prompt_agentic/synchronous/test_orchestrator.py
      • simple_graph/orchestrator_code.py, simple_graph/test_orchestrator.py

Examples Section

The examples/ directory demonstrates how to build and orchestrate agentic workflows using different frameworks and patterns. Below are direct code snippets from key example files:

common/api1/api_code.py

def api_call(input_data):
	# Simulate API logic
	return {"result": f"Processed {input_data}"}

common/worker1/main.py

from common.api1.api_code import api_call

def worker1_task(data):
	response = api_call(data)
	print("Worker1 received:", response)

crewai/orchestrator/orchestrator_code.py

def orchestrate_agents(agent_list, task):
	results = []
	for agent in agent_list:
		result = agent.run(task)
		results.append(result)
	return results

langgraph/prompt_agentic/asynchronous/orchestrator_code.py

import asyncio

async def async_orchestrate(agents, task):
	tasks = [agent.run_async(task) for agent in agents]
	return await asyncio.gather(*tasks)

langgraph/prompt_agentic/synchronous/orchestrator_code.py

def sync_orchestrate(agents, task):
	return [agent.run(task) for agent in agents]

langgraph/simple_graph/orchestrator_code.py

def simple_graph_orchestrate(nodes, input_data):
	output = input_data
	for node in nodes:
		output = node.process(output)
	return output

Testing

Unit tests are provided in the agent_test/test/ directory. Run all tests with:

pytest agent_test/test

Run the uvicorn code

License

See LICENSE for details.

Future Work

Agentic Framework Alternatives (besides langgraph):

CrewAI (multi-agent orchestration) Autogen (Microsoft’s multi-agent framework) LangChain (chains, agents, tools) Haystack (for RAG and agent pipelines) OpenAI Function Calling (tool-using agents) Semantic Kernel (Microsoft’s orchestration) Custom agent frameworks (your own classes) HuggingFace Transformers Agents LlamaIndex (for agentic workflows) DSPy (for programmatic LLM pipelines) PromptChainer (open-source agentic framework) Direct function/callback-based agents

#TODO

  1. API Payload type translation from feature file

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

agentic_testing-0.2.0.tar.gz (23.7 kB view details)

Uploaded Source

Built Distribution

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

agentic_testing-0.2.0-py3-none-any.whl (42.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: agentic_testing-0.2.0.tar.gz
  • Upload date:
  • Size: 23.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for agentic_testing-0.2.0.tar.gz
Algorithm Hash digest
SHA256 fc5bc2de9dca60f7057dd47b223db3f29e6ad44cef7aa7191990467b9858d0d5
MD5 ebee3c2183551f793e218dc51577f266
BLAKE2b-256 c9bea283a0a13e3f4a0bcf405ec61eaf0710b2a99edd98d719aed4a95d1c0777

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for agentic_testing-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b4ca34b714fe99dfe86c122ab8af41536e07a14394088887f8057c0b59658c06
MD5 9ae49b4afbcc545c21c1a25a79b68cc0
BLAKE2b-256 a9925f91c7c6b0accefde36a2fba06b31592190d9413d720e737e76b6d94346e

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