Skip to content

Commit 4b30d5c

Browse files
committed
cleanup-agents-mess
1 parent b713391 commit 4b30d5c

6 files changed

Lines changed: 71 additions & 157 deletions

File tree

.cursor/rules/AGENTS.mdc

Lines changed: 0 additions & 1 deletion
This file was deleted.

.gemini/settings.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,5 @@
1-
{ "contextFileName": "AGENTS.md" }
1+
{
2+
"context": {
3+
"fileName": "AGENTS.md"
4+
}
5+
}

AGENTS.md

Lines changed: 61 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,65 @@
33
## Overview
44
This document provides AI coding assistants with essential context for working with the spendee-python-client project.
55

6+
**Project Purpose:** This is a Python client for the Spendee personal finance app. The original client was based on an undocumented REST API and has been deprecated. The current implementation uses Google Firestore, which is what the Spendee web application uses. The project is evolving to include an MCP (Multi-Agent Collaboration Protocol) server, which will allow AI agents to interact with the Spendee data for tasks like smart categorization and conversational data exploration.
7+
8+
**Core Components:**
9+
- `SpendeeFirestore` class in `spendee/spendee_firestore.py` - main interface for Spendee data
10+
- `FirebaseClient` class in `spendee/firebase_client.py` - handles authentication
11+
- Methods decorated with `@mcp_tool` are exposed to the MCP server
12+
- See `docs/firestore-schema.md` for Firestore schema information
13+
614
## Development Environment Setup
715
This project uses [mise](https://mise.jdx.dev/) to manage the development environment and leverages python virtual environment by relying on the [requirements.txt](requirements.txt) file. For details how the environment set up works, look into the [setup.sh](setup.sh) file. Even after the setup with mise, you need to activate the python virtual environment as well.
816

17+
**Setup Steps:**
18+
19+
1. **Ensure wanted code state:**
20+
21+
Check if you are already on a feature branch, if not change to main, then pull, to work with the latest code version.
22+
```bash
23+
git pull
24+
```
25+
26+
2. **Run the setup script:**
27+
For agents, it populates the .env file using the bitwarden credentials available in the enrivonment.
28+
```bash
29+
./setup.sh
30+
```
31+
32+
3. **Activate the virtual environment:**
33+
```bash
34+
source .venv/bin/activate
35+
```
36+
37+
## Running the Application
38+
39+
**Manual Testing:**
40+
The `run.py` script is used for manual testing and experimentation. You can modify it to call the methods you want to test.
41+
```bash
42+
./run.py
43+
```
44+
45+
**Running Tests:**
46+
The project uses `pytest` for testing.
47+
```bash
48+
49+
# For spendee-firestore client testing
50+
python -m pytest tests/ -v --tb=short
51+
#alternatively use ./run_tests.sh
52+
53+
# For agent based MCP testing
54+
python -m pytest agent-test/ -v --tb=short
55+
```
56+
57+
**Building the MCP Server:**
58+
The project includes a `Dockerfile` to build the MCP server.
59+
```bash
60+
./build.sh
61+
```
62+
63+
This will build a Docker image named `spendee-mcp` and push it to a local registry.
64+
965
## Secrets Management
1066
We use Bitwarden for managing secrets. To access secrets, you will need the `BWS_ACCESS_TOKEN` environment variable set. You can then use the `bws` CLI to fetch secrets.
1167

@@ -53,10 +109,13 @@ It is left there if anytime a function would be needed from it, but all developm
53109

54110
The authentication in the firebase_client.py is not intuitive, you may used to have more seamless firebase authentication, but THIS WORKS, DO NOT MODIFY. I was not able to make it work using the google.oauth2.credentials, do not try re-implementing that. Maybe because web page flow was only enabled by original authors and service owners, and python SDK based auth flow differs. Maybe because that library is intended for admin API access, not user-client access, I am not an expert in this, but did considerable trial-and-error on that front.
55111

56-
57112
If you face authorization problems, troubleshoot what identities and wallets are used, or you may experiment with new firebase centric functions, but the authentication steps in the login flow should be only modified if user approved or explicitly asked.
58113

59-
## Jules Agent
114+
### Logging
115+
116+
The project uses the `logging` module. A `debug.log` file is created with debug-level logs.
117+
118+
## AI Agent (Google Jules, Claude code, Gemini, Openai codex, etc...)
60119

61120
### Session Start Checklist
62121
- `git pull origin main`

Agent.md

Lines changed: 0 additions & 76 deletions
This file was deleted.

agent-test/mcp-agent.config.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ google:
44
api_key: "${GOOGLE_API_KEY}"
55
vertexai: false
66

7-
mcp:
8-
servers:
9-
local-mcp:
10-
transport: "local-mcp"
11-
url: "http://localhost:8000/mcp"
7+
# mcp:
8+
# servers:
9+
# local-mcp:
10+
# transport: "streamable_http"
11+
# url: "http://localhost:8000/mcp"

agents.md

Lines changed: 0 additions & 72 deletions
This file was deleted.

0 commit comments

Comments
 (0)