Metadata-Version: 2.4
Name: teraace-tracker
Version: 1.1.8
Summary: A comprehensive Python library for tracking AI agent events across LangChain, CrewAI, and AutoGPT frameworks
Author-email: Teraace <support@teraace.com>
Maintainer-email: Teraace Team <dev@teraace.com>
License: MIT
Project-URL: Homepage, https://www.teraace.com
Project-URL: Documentation, https://docs.teraace.com
Project-URL: Repository, https://github.com/hyepartners-gmail/teraace-tracker
Project-URL: Bug Tracker, https://github.com/hyepartners-gmail/teraace-tracker/issues
Keywords: ai,agents,tracking,monitoring,observability,langchain,crewai,autogpt,llm,machine-learning,analytics,telemetry,agentic,autonomous
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: System :: Monitoring
Classifier: Topic :: System :: Logging
Classifier: Framework :: AsyncIO
Classifier: Typing :: Typed
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: pydantic>=2.0.0
Requires-Dist: aiohttp>=3.8.0
Requires-Dist: python-dotenv>=1.0.0
Provides-Extra: langchain
Requires-Dist: langchain>=0.1.0; extra == "langchain"
Provides-Extra: crewai
Requires-Dist: crewai>=0.1.0; extra == "crewai"
Provides-Extra: autogpt
Requires-Dist: autogpt>=0.1.0; extra == "autogpt"
Provides-Extra: dev
Requires-Dist: pytest>=7.0.0; extra == "dev"
Requires-Dist: pytest-asyncio>=0.21.0; extra == "dev"
Requires-Dist: pytest-mock>=3.10.0; extra == "dev"
Requires-Dist: black>=23.0.0; extra == "dev"
Requires-Dist: isort>=5.12.0; extra == "dev"
Requires-Dist: flake8>=6.0.0; extra == "dev"
Requires-Dist: mypy>=1.0.0; extra == "dev"
Provides-Extra: all
Requires-Dist: langchain>=0.1.0; extra == "all"
Requires-Dist: crewai>=0.1.0; extra == "all"
Requires-Dist: autogpt>=0.1.0; extra == "all"
Dynamic: license-file

# Teraace Agentic Tracker

A comprehensive Python library for tracking AI agent events across 20 major agentic frameworks and sending them to the Teraace API for monitoring and analysis.

## 🚀 Features

- **20 Framework Support**: LangChain, CrewAI, AutoGPT, Swarm, LlamaIndex, AutoGen, Phidata, BabyAGI, MetaGPT, TaskWeaver, CAMEL, AgentGPT, SuperAGI, Semantic Kernel, Haystack, Rasa, PydanticAI, DSPy, Mirascope, Instructor
- **Unified Tracking**: Consistent event tracking across all frameworks
- **Production Ready**: Buffered delivery, async API client, graceful shutdown
- **Thread-Safe**: Safe for multi-threaded applications
- **Extensible**: Easy to add new framework integrations

## 📦 Teraace Account

Create your Teraace account at https://app.teraace.com/signup


## 📦 Installation

```bash
pip install teraace-tracker
```

## ⚡ Quick Start

### 1. Configuration

Create a `.env` file:

```env
TERAACE_API_KEY=your_api_key_here
TERAACE_BUFFER_SIZE=20
TERAACE_API_ENDPOINT=https://api.teraace.com/agents
TERAACE_REQUEST_TIMEOUT=30
TERAACE_MAX_RETRIES=3

```

### 2. Basic Usage

```python
from teraace_tracker import LangChainTracker

# Initialize tracker
tracker = LangChainTracker()

# Use with your LangChain agent
agent = initialize_agent(
    tools=your_tools,
    llm=llm,
    callbacks=[tracker]  # Add tracker as callback
)

# Use agent normally - events are tracked automatically
result = agent.run("What is 2 + 2?")
```

### 3. Other Frameworks
- **[AGENTS.md](AGENTS.md)** - Comprehensive examples for all 20 frameworks

```python
# CrewAI
from teraace_tracker import CrewAITracker
tracker = CrewAITracker()
tracker.track_crew_execution(crew)

# OpenAI Swarm
from teraace_tracker import SwarmTracker
tracker = SwarmTracker()

# LlamaIndex
from teraace_tracker import LlamaIndexTracker
tracker = LlamaIndexTracker()

# AutoGen
from teraace_tracker import AutoGenTracker
tracker = AutoGenTracker()

# And 11 more frameworks...
```

## 🎯 Supported Frameworks

| Framework | Status | Use Case |
|-----------|--------|----------|
| **LangChain** | ✅ | General-purpose agent framework |
| **CrewAI** | ✅ | Multi-agent collaboration |
| **AutoGPT** | ✅ | Autonomous task execution |
| **OpenAI Swarm** | ✅ | Multi-agent orchestration |
| **LlamaIndex** | ✅ | Data-centric agents & RAG |
| **AutoGen** | ✅ | Multi-agent conversations |
| **Phidata** | ✅ | Production AI assistants |
| **BabyAGI** | ✅ | Autonomous task prioritization |
| **MetaGPT** | ✅ | Software development teams |
| **TaskWeaver** | ✅ | Code-first stateful agents |
| **CAMEL** | ✅ | Communicative agent societies |
| **AgentGPT** | ✅ | Web-based autonomous agents |
| **SuperAGI** | ✅ | Open-source agent infrastructure |
| **Semantic Kernel** | ✅ | Microsoft AI orchestration |
| **Haystack** | ✅ | NLP/RAG with agents |
| **Rasa** | ✅ | Conversational AI |
| **PydanticAI** | ✅ | Production-grade AI applications |
| **DSPy** | ✅ | Prompt optimization framework |
| **Mirascope** | ✅ | Type-safe LLM toolkit |
| **Instructor** | ✅ | Structured data extraction |

## 📊 What Gets Tracked

- **Agent Lifecycle**: Creation, execution, completion
- **Tool Usage**: Function calls and results
- **Memory Operations**: Read, write, update operations
- **Multi-Agent Interactions**: Handoffs and collaboration
- **Code Generation**: Generated code and execution
- **Planning & Reasoning**: Agent thought processes
- **Resource Management**: File and data operations

## 🔧 Configuration

| Environment Variable | Default | Description |
|---------------------|---------|-------------|
| `TERAACE_API_KEY` | Required | Your Teraace API key |
| `TERAACE_BUFFER_SIZE` | 20 | Events to buffer before sending |
| `TERAACE_API_ENDPOINT` | `https://api.teraace.com/agent-events` | API endpoint |

## 📚 Documentation

- **[AGENTS.md](AGENTS.md)** - Comprehensive examples for all 20 frameworks
- **[API Reference](docs/api.md)** - Detailed API documentation
- **[Configuration Guide](docs/config.md)** - Advanced configuration options

## 🛠️ Development

```bash
git clone https://github.com/teraace/teraace-tracker
cd teraace-tracker
pip install -e .[dev]
pytest
```

## 🤝 Contributing

We welcome contributions! Please see our [Contributing Guide](CONTRIBUTING.md) for details.

## 📄 License

MIT License - see [LICENSE](LICENSE) file for details.

## 🆘 Support

- **Documentation**: [docs.teraace.com](https://docs.teraace.com)
- **Email**: support@teraace.com
- **Issues**: [GitHub Issues](https://github.com/teraace/teraace-tracker/issues)
