Skip to main content

Agent Center

Agent Center - A Python project built with LangChain for managing AI agents.

Features

  • Built with LangChain for powerful AI agent capabilities
  • Clean project structure following Python best practices
  • Type hints and Pydantic models for data validation
  • Comprehensive test suite with pytest
  • Code formatting with Black and Ruff
  • Type checking with Mypy

Project Structure

agentcenter/
\x00\x00 src/
   \x00\x00 agentcenter/
       \x00\x00 __init__.py       # Package initialization
       \x00\x00 core.py           # Core agent functionality
       \x00\x00 config.py         # Configuration management
       \x00\x00 utils.py          # Utility functions
\x00\x00 tests/
   \x00\x00 __init__.py
   \x00\x00 test_core.py          # Core functionality tests
   \x00\x00 test_utils.py         # Utility function tests
\x00\x00 docs/                     # Documentation
\x00\x00 scripts/                  # Utility scripts
\x00\x00 pyproject.toml           # Project configuration
\x00\x00 README.md                # This file

Installation

Prerequisites

  • Python 3.12 or higher
  • uv package manager

Setup

  1. Clone the repository:
git clone <your-repo-url>
cd agentcenter
  1. Install dependencies:
uv sync
  1. Install development dependencies:
uv add --dev pytest pytest-cov black ruff mypy

Usage

Basic Usage

from agentcenter import AgentCenter

# Create an agent
agent = AgentCenter(name="MyAgent")

# Process input
response = agent.process("Hello, agent!")
print(response)

# Get conversation history
messages = agent.get_messages()

Running with uv

# Run the main script
uv run python main.py

# Run a specific module
uv run python -m agentcenter.core

Development

Running Tests

Our test suite has 99% code coverage with 56 comprehensive tests!

# Run all tests
uv run pytest

# Run with coverage report
uv run pytest --cov=agentcenter --cov-report=term-missing

# Generate HTML coverage report
uv run pytest --cov=agentcenter --cov-report=html
open htmlcov/index.html

# Run specific test file
uv run pytest tests/test_core.py

# Run with verbose output
uv run pytest -v

Test Coverage:

  • __init__.py: 100%
  • cli.py: 97%
  • config.py: 100%
  • core.py: 100%
  • utils.py: 100%
  • Total: 99%

Code Formatting

# Format code with Black
uv run black src/ tests/

# Lint with Ruff
uv run ruff check src/ tests/

# Type check with Mypy
uv run mypy src/

Installing Dev Dependencies

uv add --dev pytest pytest-cov black ruff mypy

Configuration

The project uses environment variables for configuration. Create a .env file in the root directory:

APP_NAME=Agent Center
DEBUG=false
LOG_LEVEL=INFO
API_KEY=your-api-key-here

Publishing

To publish a new version to PyPI:

Quick Release

# Use the automated release script
./scripts/release.sh 0.1.0

Manual Release

# 1. Update version in pyproject.toml
# 2. Update CHANGELOG.md
# 3. Run tests and checks
uv run pytest --cov=agentcenter --cov-fail-under=80
uv run black src/ tests/
uv run ruff check src/ tests/

# 4. Build and publish
uv build
uv run twine upload --repository testpypi dist/*  # Test first
uv run twine upload dist/*                         # Then publish

See Publishing Guide for detailed instructions.

Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Please ensure your PR:

  • ✅ Passes all tests (uv run pytest)
  • ✅ Has adequate test coverage (≥80%)
  • ✅ Follows code style (uv run black src/ tests/)
  • ✅ Passes linting (uv run ruff check src/ tests/)

License

This project is licensed under the MIT License - see the LICENSE file for details.

Contact

Your Name - your.email@example.com

Project Link: https://github.com/yourusername/agentcenter

Release files for agentcenter 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for agentcenter 0.1.0
File Size Uploaded
agentcenter-0.1.0.tar.gz 103.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for agentcenter 0.1.0
File Interpreter ABI Platform
agentcenter-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 111.2 kB

Release files / agentcenter-0.1.0.tar.gz

Download URL agentcenter-0.1.0.tar.gz
Size 103.9 kB
Tags Source
SHA-256 checksum
How to use checksums
c23c68b1acd7b7c629cf2c378232a13e8cd41c8bdbefa57a79cdc0787d5c2208
BLAKE2b-256 checksum
How to use checksums
1f796c1d01b2c9dcd78b58a3cacf320afa2b1269537a718c461ac42442a0117f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.9

Release files / agentcenter-0.1.0-py3-none-any.whl

Download URL agentcenter-0.1.0-py3-none-any.whl
Size 7.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e4cc8de672fd76168fad3f72e480121a7df530a08afbff5f6f98d755a7a04002
BLAKE2b-256 checksum
How to use checksums
cc6c439b5976cfeb9ae5ecb2f752bd9f8246d4af3e535b861c684594be420b4b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.9

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page