{"id":44046112,"url":"https://github.com/kmcallorum/agent-marketplace-ld-api","last_synced_at":"2026-02-07T22:09:50.947Z","repository":{"id":332212605,"uuid":"1133082217","full_name":"kmcallorum/agent-marketplace-ld-api","owner":"kmcallorum","description":"FastAPI backend for Agent Marketplace - central registry for discovering, publishing, and managing AI agents built with pytest-agents","archived":false,"fork":false,"pushed_at":"2026-01-12T22:31:41.000Z","size":278,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-01-13T01:56:27.693Z","etag":null,"topics":["ai-agents","api","async","backend","celery","docker","fastapi","marketplace","postgresql","pytest-agents","python","redis","sqlalchemy"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kmcallorum.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2026-01-12T21:23:49.000Z","updated_at":"2026-01-12T22:31:41.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/kmcallorum/agent-marketplace-ld-api","commit_stats":null,"previous_names":["kmcallorum/agent-marketplace-ld-api"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/kmcallorum/agent-marketplace-ld-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kmcallorum%2Fagent-marketplace-ld-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kmcallorum%2Fagent-marketplace-ld-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kmcallorum%2Fagent-marketplace-ld-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kmcallorum%2Fagent-marketplace-ld-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kmcallorum","download_url":"https://codeload.github.com/kmcallorum/agent-marketplace-ld-api/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kmcallorum%2Fagent-marketplace-ld-api/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29210009,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-07T21:35:21.898Z","status":"ssl_error","status_checked_at":"2026-02-07T21:35:20.106Z","response_time":63,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai-agents","api","async","backend","celery","docker","fastapi","marketplace","postgresql","pytest-agents","python","redis","sqlalchemy"],"created_at":"2026-02-07T22:09:50.209Z","updated_at":"2026-02-07T22:09:50.939Z","avatar_url":"https://github.com/kmcallorum.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Agent Marketplace API\n\n[![PyPI](https://img.shields.io/pypi/v/agent-marketplace-ld-api)](https://pypi.org/project/agent-marketplace-ld-api/)\n[![CI](https://github.com/kmcallorum/agent-marketplace-ld-api/actions/workflows/ci.yml/badge.svg)](https://github.com/kmcallorum/agent-marketplace-ld-api/actions/workflows/ci.yml)\n[![codecov](https://codecov.io/gh/kmcallorum/agent-marketplace-ld-api/branch/main/graph/badge.svg)](https://codecov.io/gh/kmcallorum/agent-marketplace-ld-api)\n[![Snyk Security](https://snyk.io/test/github/kmcallorum/agent-marketplace-ld-api/badge.svg)](https://snyk.io/test/github/kmcallorum/agent-marketplace-ld-api)\n[![Python 3.11+](https://img.shields.io/badge/python-3.11%2B-blue)](https://www.python.org/downloads/)\n[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](LICENSE)\n[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)\n[![Type Checked: mypy](https://img.shields.io/badge/type%20checked-mypy-blue)](https://mypy-lang.org/)\n[![pytest-agents](https://img.shields.io/badge/built%20for-pytest--agents-purple)](https://github.com/pytest-agents/pytest-agents)\n\nFastAPI backend for Agent Marketplace - the central hub for discovering, publishing, and managing AI agents built with pytest-agents.\n\n## Features\n\n- **Agent Discovery** - Search and browse AI agents by category, rating, and popularity\n- **Agent Publishing** - Upload, validate, and publish agents with version management\n- **Validation Pipeline** - Automated security scanning and quality checks\n- **Reviews \u0026 Ratings** - Community-driven feedback system\n- **Analytics** - Track downloads, stars, and trending agents\n- **GitHub OAuth** - Secure authentication via GitHub\n\n## Tech Stack\n\n- **Framework**: FastAPI 0.109+ with async/await\n- **Database**: PostgreSQL with SQLAlchemy 2.0 (async)\n- **Migrations**: Alembic\n- **Cache**: Redis\n- **Background Tasks**: Celery\n- **Storage**: S3/MinIO\n- **Metrics**: Prometheus\n\n## Quick Start\n\n### Prerequisites\n\n- Python 3.11+\n- Docker and Docker Compose\n- uv (recommended) or pip\n\n### Installation\n\n1. Clone the repository:\n```bash\ngit clone https://github.com/kmcallorum/agent-marketplace-ld-api.git\ncd agent-marketplace-ld-api\n```\n\n2. Start infrastructure services:\n```bash\ndocker-compose up -d\n```\n\n3. Install dependencies:\n```bash\nuv sync\n```\n\n4. Set up environment variables:\n```bash\ncp .env.example .env\n# Edit .env with your configuration\n```\n\n5. Run database migrations:\n```bash\nuv run alembic upgrade head\n```\n\n6. Start the development server:\n```bash\nuv run uvicorn agent_marketplace_api.main:app --reload\n```\n\nThe API will be available at http://localhost:8000\n\n### API Documentation\n\n- **Swagger UI**: http://localhost:8000/docs\n- **ReDoc**: http://localhost:8000/redoc\n- **OpenAPI JSON**: http://localhost:8000/openapi.json\n\n## Configuration\n\nConfiguration is managed via environment variables. Key settings:\n\n| Variable | Description | Default |\n|----------|-------------|---------|\n| `DATABASE_URL` | PostgreSQL connection string | `postgresql+asyncpg://user:pass@localhost:5432/agent_marketplace` |\n| `REDIS_URL` | Redis connection string | `redis://localhost:6379/0` |\n| `S3_ENDPOINT` | S3/MinIO endpoint | `http://localhost:9000` |\n| `S3_ACCESS_KEY` | S3 access key | - |\n| `S3_SECRET_KEY` | S3 secret key | - |\n| `S3_BUCKET` | S3 bucket name | `agents` |\n| `JWT_SECRET_KEY` | Secret for JWT signing | - |\n| `JWT_ALGORITHM` | JWT algorithm | `HS256` |\n| `GITHUB_CLIENT_ID` | GitHub OAuth client ID | - |\n| `GITHUB_CLIENT_SECRET` | GitHub OAuth client secret | - |\n\n## API Endpoints\n\n### Authentication\n- `POST /api/v1/auth/github` - GitHub OAuth callback\n- `POST /api/v1/auth/refresh` - Refresh access token\n- `POST /api/v1/auth/logout` - Logout user\n- `GET /api/v1/auth/me` - Get current user\n\n### Agents\n- `GET /api/v1/agents` - List agents\n- `POST /api/v1/agents` - Publish new agent\n- `GET /api/v1/agents/{slug}` - Get agent details\n- `PUT /api/v1/agents/{slug}` - Update agent\n- `DELETE /api/v1/agents/{slug}` - Unpublish agent\n- `GET /api/v1/agents/{slug}/versions` - Get version history\n- `POST /api/v1/agents/{slug}/versions` - Publish new version\n- `GET /api/v1/agents/{slug}/download/{version}` - Download agent\n- `POST /api/v1/agents/{slug}/star` - Star agent\n- `DELETE /api/v1/agents/{slug}/star` - Unstar agent\n\n### Reviews\n- `GET /api/v1/agents/{slug}/reviews` - List reviews\n- `POST /api/v1/agents/{slug}/reviews` - Create review\n- `PUT /api/v1/reviews/{id}` - Update review\n- `DELETE /api/v1/reviews/{id}` - Delete review\n\n### Search\n- `GET /api/v1/search` - Global search\n- `GET /api/v1/search/agents` - Search agents\n- `GET /api/v1/search/suggestions` - Get suggestions\n\n### Analytics\n- `GET /api/v1/stats` - Platform statistics\n- `GET /api/v1/trending` - Trending agents\n- `GET /api/v1/popular` - Popular agents\n\n### System\n- `GET /health` - Health check\n- `GET /metrics` - Prometheus metrics\n\n## Development\n\n### Running Tests\n\n```bash\n# Run all tests\nuv run pytest\n\n# Run with coverage\nuv run pytest --cov --cov-report=term-missing\n\n# Run specific test file\nuv run pytest tests/unit/test_agent_service.py\n\n# Run with verbose output\nuv run pytest -v\n```\n\n### Code Quality\n\n```bash\n# Lint code\nuv run ruff check src tests\n\n# Fix linting issues\nuv run ruff check src tests --fix\n\n# Type checking\nuv run mypy src\n\n# Format code\nuv run ruff format src tests\n```\n\n### Database Migrations\n\n```bash\n# Create a new migration\nuv run alembic revision --autogenerate -m \"Description\"\n\n# Apply migrations\nuv run alembic upgrade head\n\n# Rollback one version\nuv run alembic downgrade -1\n\n# Show current version\nuv run alembic current\n```\n\n## Deployment Tutorials\n\nDetailed step-by-step guides for deploying to production:\n\n| Tutorial | Description |\n|----------|-------------|\n| [Linux VM](docs/TUTORIAL_LINUX_VM.md) | Deploy on Ubuntu/Debian with systemd, Nginx, and Let's Encrypt |\n| [Docker](docs/TUTORIAL_DOCKER.md) | Deploy with Docker Compose for development and production |\n| [Kubernetes / K3s](docs/TUTORIAL_KUBERNETES.md) | Deploy on K8s or lightweight K3s with autoscaling and monitoring |\n| [Windows](docs/TUTORIAL_WINDOWS.md) | Deploy on Windows 10/11 or Windows Server with WSL2, native, or IIS |\n\n## Docker\n\n### Build Image\n\n```bash\ndocker build -t agent-marketplace-api .\n```\n\n### Run with Docker Compose\n\n```bash\n# Start all services\ndocker-compose up\n\n# Start in background\ndocker-compose up -d\n\n# Stop services\ndocker-compose down\n```\n\n## Project Structure\n\n```\nsrc/agent_marketplace_api/\n├── __init__.py\n├── main.py              # FastAPI application\n├── config.py            # Configuration settings\n├── database.py          # Database setup\n├── security.py          # JWT and password utilities\n├── auth.py              # Authentication helpers\n├── storage.py           # S3/MinIO client\n├── api/\n│   ├── deps.py          # Dependency injection\n│   └── v1/\n│       ├── agents.py    # Agent endpoints\n│       ├── auth.py      # Auth endpoints\n│       ├── reviews.py   # Review endpoints\n│       ├── categories.py# Category endpoints\n│       ├── users.py     # User endpoints\n│       ├── search.py    # Search endpoints\n│       └── analytics.py # Analytics endpoints\n├── models/\n│   ├── agent.py         # Agent model\n│   ├── user.py          # User model\n│   ├── review.py        # Review model\n│   └── category.py      # Category model\n├── schemas/\n│   ├── agent.py         # Agent schemas\n│   ├── user.py          # User schemas\n│   ├── review.py        # Review schemas\n│   ├── search.py        # Search schemas\n│   └── analytics.py     # Analytics schemas\n├── services/\n│   ├── agent_service.py # Agent business logic\n│   ├── review_service.py# Review business logic\n│   ├── search_service.py# Search functionality\n│   └── analytics_service.py # Analytics\n├── repositories/\n│   ├── base.py          # Base repository\n│   ├── agent_repo.py    # Agent data access\n│   └── review_repo.py   # Review data access\n├── validation/\n│   ├── scanner.py       # Security scanning\n│   ├── quality.py       # Code quality\n│   └── runner.py        # Test runner\n├── tasks/\n│   ├── celery.py        # Celery configuration\n│   └── validation.py    # Background validation\n└── core/\n    └── metrics.py       # Prometheus metrics\n```\n\n## Contributing\n\nSee [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.\n\n## Security\n\nSee [SECURITY.md](SECURITY.md) for security policy and reporting vulnerabilities.\n\n## License\n\nThis project is licensed under the MIT License - see [LICENSE](LICENSE) for details.\n\n## Acknowledgments\n\n- [FastAPI](https://fastapi.tiangolo.com/) - Modern web framework\n- [SQLAlchemy](https://www.sqlalchemy.org/) - SQL toolkit and ORM\n- [pytest-agents](https://github.com/pytest-agents/pytest-agents) - Agent testing framework\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkmcallorum%2Fagent-marketplace-ld-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkmcallorum%2Fagent-marketplace-ld-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkmcallorum%2Fagent-marketplace-ld-api/lists"}