MonolithicCoffeeMakerAgent

AI agent toy, written with agents AI. No idea yet what it will do for real

For contributor instructions, see AGENTS.md.

Static github pages

Boondoggle

Don’t use this package : it does nothing

Some help

Advice for Developing an Agent in Python

Here are some specific recommendations to keep in mind when building this Python agent:

1. Python Project Structure (might not be up to date)

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!
├── ...

2. Robust Logging

Good logging is crucial for understanding and debugging your agent’s behavior.

Basic logging setup example

import logging

Configure basic 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 )

Create a logger instance for the current module

logger = logging.getLogger(name)

Example log messages

logger.info(“Agent has started successfully.”) logger.debug(“This is a detailed debug message for troubleshooting.”) logger.warning(“A potential issue was detected.”)

3. Thorough Testing

useless as long as it does nothing

Testing is essential to ensure the agent’s reliability and robustness.

4. Documenting Agent Capabilities

useless as long as it does nothing

git_init.py failure : Support for password authentication was removed on August 13, 2021 : GitHub Authentication for Pushing

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. GitHub PAT repo scope (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.

Making it Easier: Credential Helpers

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.

Alternative: Using SSH Keys

For a more seamless experience without needing tokens or passwords for each push/pull, consider setting up SSH keys with GitHub.

  1. Generate a new SSH key and add it to the ssh-agent.
  2. Add your SSH public key to your GitHub account.
  3. Once set up, you can use the SSH URL for your repository with the script or when cloning/setting remotes:
    • If the remote origin already exists with an HTTPS URL, change it:
       git remote set-url origin git@github.com:YOUR_USERNAME/YOUR_REPOSITORY.git
      
    • When using this script, provide the SSH URL:
       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.