AI agent toy, written with agents AI. No idea yet what it will do for real
For contributor instructions, see AGENTS.md
.
Don’t use this package : it does nothing
Here are some specific recommendations to keep in mind when building this Python agent:
MonolithicCoffeeMakerAgent/
├── coffee_maker/ # The main source package
│ ├── init.py
│ ├── agent_core.py # Main agent logic
│ ├── module_example/ # Specific modules/capabilities
│ │ ├── init.py
│ │ └── coffee_making_module.py # Example module
│ └── utils/ # Utility functions
├── tests/ # Unit and integration tests
│ ├── init.py
│ ├── test_agent_core.py
│ └── test_coffee_making_module.py
├── docs/ # Documentation
│ └── usage.md
├── examples/ # Usage examples
│ └── ...
├── ...
├── .env.example # Example environment file : the one you use should be named .env and never ever be commited/pushed
├── ...
├── README.md # This file!
├── ...
Good logging is crucial for understanding and debugging your agent’s behavior.
logging
module.import logging
logging.basicConfig( level=logging.INFO, # Set the default logging level format=’%(asctime)s - %(name)s - %(levelname)s - %(message)s’, # Define log message format datefmt=’%Y-%m-%d %H:%M:%S’ # Define date format )
logger = logging.getLogger(name)
logger.info(“Agent has started successfully.”) logger.debug(“This is a detailed debug message for troubleshooting.”) logger.warning(“A potential issue was detected.”)
useless as long as it does nothing
Testing is essential to ensure the agent’s reliability and robustness.
useless as long as it does nothing
When using git_init.py to push to a GitHub repository via HTTPS (e.g., https://github.com/user/repo.git
), you will need to authenticate. GitHub no longer supports password authentication for Git operations over HTTPS since August 13, 2021.
The recommended method is to use a Personal Access Token (PAT).
A PAT is a more secure way to authenticate with GitHub for command-line operations or scripts.
1. Generate a Personal Access Token on GitHub:
a. Go to your GitHub Settings. (Click your profile picture in the top-right corner, then “Settings”).
b. In the left sidebar, scroll down and click on Developer settings.
c. In the left sidebar, click on Personal access tokens, then Tokens (classic). (While “Fine-grained tokens” exist, “Tokens (classic)” are often simpler for this direct script usage).
d. Click the Generate new token button (or Generate new token (classic)).
e. Give your token a descriptive Note (e.g., “Git Initializer Script Token” or “My Laptop Git Access”).
f. Set an Expiration for your token. For security, avoid “No expiration” if possible. 30 or 90 days is a good start.
g. Under Select scopes, you must check the repo
scope. This scope grants full control of private and public repositories.
(Illustrative image, UI might vary slightly)
h. Click Generate token at the bottom of the page.
2. Copy Your Token:
3. Use the Token with the Script (or Git):
When the script (or any Git command) prompts you for your password for https://github.com
, do the following:
Username for ‘https://github.com’: YOUR_GITHUB_USERNAME
Password for ‘https://YOUR_GITHUB_USERNAME@github.com’:
Do NOT enter your regular GitHub account password. Use the PAT you just generated.
To avoid entering your PAT every time you push or pull, you can configure Git to use a credential helper. This will securely store your PAT after the first successful authentication.
git config --global credential.helper osxkeychain
The first time you authenticate with your PAT, macOS should ask if you want to save it to your Keychain.
git config --global credential.helper manager-core # or just 'manager' for older versions
libsecret
(if installed) or other helpers like cache
or store
:
# For libsecret (recommended if available, integrates with GNOME Keyring, KWallet, etc.)
git config --global credential.helper /usr/share/doc/git/contrib/credential/libsecret/git-credential-libsecret
# Or to cache for a limited time (e.g., 1 hour)
# git config --global credential.helper 'cache --timeout=3600'
# Or to store in plain text (less secure, use with caution)
# git config --global credential.helper store
For a more seamless experience without needing tokens or passwords for each push/pull, consider setting up SSH keys with GitHub.
origin
already exists with an HTTPS URL, change it:
git remote set-url origin git@github.com:YOUR_USERNAME/YOUR_REPOSITORY.git
python your_script_name.py -u git@github.com:YOUR_USERNAME/YOUR_REPOSITORY.git
By following these instructions, you should be able to authenticate successfully when the script attempts to push your newly initialized repository to GitHub.