Contributing¶
Thank you for your interest in contributing to TBD Agent! This document explains how to get involved.
Code of Conduct¶
Be respectful and constructive. Harassment or abusive behavior will not be tolerated.
How to Contribute¶
Reporting Issues¶
- Search existing issues before opening a new one.
- Use a clear, descriptive title.
- Include steps to reproduce, expected vs actual behavior, and environment details (OS, Python version, Docker version).
Suggesting Features¶
- Open a feature request issue with a clear description of the use case.
- Explain why existing functionality doesn't cover your need.
Submitting Pull Requests¶
-
Fork the repository and create a branch from
main: -
Set up your development environment:
-
Make your changes. Follow the coding standards below.
-
Run tests and ensure they all pass:
-
Run the linter:
-
Commit with a clear message using Conventional Commits format:
Prefix Meaning feat:New feature fix:Bug fix docs:Documentation only test:Adding or updating tests refactor:Code change (no fix, no feature) chore:Maintenance tasks -
Push and open a Pull Request against
main.
Coding Standards¶
- Python 3.12+ — use modern syntax (type hints,
matchstatements where appropriate). - Formatting & linting — we use Ruff. Run
ruff checkandruff formatbefore committing. - Type hints — all public function signatures should include type annotations.
- Tests — every new feature or bug fix should include tests. We use
pytestwithpytest-asyncio. - Async first — this is a FastAPI + Motor/Beanie project; prefer
async/awaitthroughout.
Project Structure¶
app/
├── api/routes/ ← FastAPI route handlers
├── core/ ← Agent engine, event bus, guardrails, registry
├── models/ ← Beanie ODM document models
├── schemas/ ← Pydantic request/response schemas
├── services/ ← Business logic (auth, MCP, tokens, Copilot)
└── tasks/ ← Celery background tasks
tests/ ← Unit tests (mirrors app/ structure)
docs/ ← Architecture and feature documentation
observability/ ← Grafana dashboards, Prometheus, Loki, Tempo
Pull Request Guidelines¶
- Keep PRs focused — one feature or fix per PR.
- Include a description of what changed and why.
- Reference related issues (e.g.,
Closes #42). - All CI checks must pass before review.
- At least one maintainer approval is required to merge.
Development Tips¶
- Docker Compose is the fastest way to run the full stack locally:
- MongoDB, Redis, and observability services are included in the compose file.
- See Local Setup for bare-metal setup.
License¶
By contributing, you agree that your contributions will be licensed under the Apache License 2.0.