refactor: restructure the agent package and add contributor docs #20
No reviewers
Labels
No labels
needs/docs
needs/research
needs/upstream
type/bug
type/external
type/feature
type/refactor
urgency
high
urgency
immediate
urgency
low
urgency
medium
No milestone
No project
No assignees
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
ScottyLabs/cmugpt-agent!20
Loading…
Reference in a new issue
No description provided.
Delete branch "repo-restructure"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
This pull request restructures the agent repository. The code moved from a flat
agent/directory into asrc/cmugptpackage, with large modules split by responsibility, configuration centralized, and tests moved to pytest. The production startup check, which had never been active, is now turned on. Comments, docstrings, and the README have been rewritten, and the repository now has a contributing guide and PR template. The service behaves the same as before. Closes #21.Changes
Package layout
src/cmugptpackage installed ascmugpt-agent, with the entry point defined inpyproject.toml.memory/package with separate modules for the store, facts, the remember and forget tools, background extraction, and management routes.maps/package, andbuildings.jsonmoves inside it so the built wheel ships the catalog.api/package, with the app assembly inserver.py, the shared bearer-token and body-size checks indeps.py, and one router per route group.graph.pyintoplanning.py. A newllm.pybuilds the OpenRouter clients in one place and caches them per configuration.Configuration
settings.py, which uses pydantic-settings and builds a fresh object per call so tests can override values per case.prodsecretspec profile now setsAGENT_ENV=production. The startup check forDATABASE_URLand a 32-characterAGENT_SHARED_SECRETwas already in the code but never ran..env.exampledocuments every variable with its default.Tests
ci_test/totests/unit/and run under pytest with asyncio in auto mode. CI runs them with a singleuv run pytest.tools/toevals/as pytest tests. They skip themselves when the API keys are absent and fail on a miss instead of printing a report.Cleanup
flake.nixand a dangling pre-commit symlink.mcp,openai, andpre-commitdependencies are removed. Both libraries still arrive through the LangChain packages.Code quality
DailyTokenLimitExceededis renamed toDailyTokenLimitError.Documentation
CONTRIBUTING.mdcovers the workflow, code style, commit conventions, and the pull request process.AI use
Checklist
DATABASE_URL="" uv run pytestpassesuv run pytest evalsrun, if prompts or tool selection changed (prompts unchanged; the two smoke evals were run and pass).envvalues in the diffmain@thesuperRL Why is this issue happening? Is it because @Jc-965 doesn't have the right permissions? Grafana isn't very informative, would like to know what the cause is.
CC: @jiyas
@krishsax wrote in #20 (comment):
It's a postgres issue I've seen a couple of times, just that you don't have correct perms on the relevant kennel job for some reason. I'll take a look during work session.
lowk thought i resolved it but i guess not