This is a Python 3.13 uv project for a live voice visitor-registration agent. Runtime code lives under src/: src/agent contains the LangGraph workflow, domain model, configuration, registration tools, and guard notification logic; src/voice contains the FastAPI/Twilio transport layer, audio handling, speech adapters, and app entrypoint. Tests are split into tests/unit_tests and tests/integration_tests, with shared fixtures in tests/conftest.py. Project notes and vendor references live in DOCS/ and TODO/.
Use the Makefile targets as the stable interface:
make syncsyncs runtime and development dependencies withuv.make devsyncs dependencies and starts LangGraph + FastAPI viaovermind.make runstarts the local LangGraph dev server.make voiceruns the Twilio/FastAPI webhook server on port8000.make testruns unit tests intests/unit_tests.make integration-testsruns integration tests intests/integration_tests.make lintandmake formatrun Ruff checks and formatting.
For local TTS/VAD experiments, run uv sync --dev --extra voice-local.
Follow the existing Python style: 4-space indentation, type annotations for public functions, and small modules organized by responsibility. Use snake_case for functions, variables, test names, and modules; use PascalCase for Pydantic models and classes. Prefer structured configuration through src/agent/config.py and environment variables instead of hard-coded secrets or URLs. Run make format before submitting changes.
Use pytest. Place fast, isolated tests in tests/unit_tests/test_*.py; place graph, service-bound, or cross-module tests in tests/integration_tests/test_*.py. Add or update tests when changing registration behavior, Twilio webhook handling, audio framing, speech adapters, or configuration loading. Keep tests deterministic and avoid real network calls unless they are explicitly integration behavior.
Recent history uses Conventional Commit prefixes such as feat:, test:, docs:, and chore:. Keep commit messages imperative and scoped to one logical change. Pull requests should include a short summary, commands run (make test, make lint, etc.), linked issues or task notes, and webhook examples when changing user-visible voice/Twilio behavior.
Copy .env.example to .env for local development and never commit real API keys, Twilio credentials, WeCom webhook URLs, or generated visitor data. Validate any new environment variable in configuration code and document it in .env.example and README.md.
When operating through Codex in this repository, follow ~/.codex/RTK.md: prefix shell commands with rtk, for example rtk make test or rtk git status.