keystroke-agent


Namekeystroke-agent JSON
Version 0.1.7 PyPI version JSON
download
home_pageNone
SummaryAn AI-powered CLI assistant with AWS Bedrock integration, tool support, and customizable features for interactive conversations and task automation.
upload_time2025-08-27 02:14:15
maintainerNone
docs_urlNone
authorNone
requires_python>=3.12
licenseNone
keywords ai-assistant async aws bedrock chatbot claude cli llm terminal-ui tools
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Keystroke Agent

A Python project implementing an AI assistant with tool integration, AWS service support, and asynchronous event-driven architecture.

## Features

1. **Advanced AI Integration**: 
   - Uses AWS Bedrock (Claude 3.5 Sonnet) as the default LLM
   - Asynchronous API calls for better performance
   - Configurable model selection
   - Event-driven architecture using asyncio.Queue for handling LLM responses and tool calls

2. **Built-in Tools**:
   - Calculator: Mathematical operations and functions
   - File Management: File operations (create, read, update, delete)
   - Presigned URL: AWS S3 presigned URL generation and file transfer

3. **Interactive CLI**:
   - Rich text formatting for better readability
   - Command history management
   - Dynamic conversation summarization
   - Dot commands for runtime configuration
   - Asynchronous implementation for improved responsiveness

4. **Customizable Settings**:
   - Model selection
   - System message
   - Assistant name
   - History limit
   - Tool enablement

## Installation

```sh
pip install keystroke-agent
```

## Configuration

1. Create a `.env` file with your AWS credentials:
```env
AWS_ACCESS_KEY_ID=your_key_id
AWS_SECRET_ACCESS_KEY=your_secret_key
AWS_SESSION_TOKEN=your_session_token
AWS_DEFAULT_REGION=your_region
```

2. Adjust settings in `keystroke/settings.py` as needed:
```python
AGENT_NAME = "AI Assistant"
DEFAULT_LLM_MODEL = "bedrock/anthropic.claude-3-5-sonnet-20240620-v1:0"
HISTORY_LIMIT = 10
ENABLE_TOOLS = True
```

## Usage

Start the agent:
```sh
agent
```

### Available Dot Commands

- `.help` - Show available commands
- `.clear` - Clear conversation history
- `.model <model_name>` - Change the LLM model
- `.view` - View current settings
- `.view history` - View conversation history
- `.system <message>` - Change the system message
- `.name <new_name>` - Change the assistant's name

### Available Tools

1. **Calculator**:
   - Basic arithmetic operations
   - Trigonometric functions
   - Logarithms and exponentials
   - Factorial calculation

2. **File Management**:
   - Create, read, update, and delete files
   - List files in directories
   - Copy and rename files
   - Recursive operations support

3. **AWS S3 Integration**:
   - Generate presigned URLs for upload/download
   - Upload files using presigned URLs
   - Download files using presigned URLs

## Development

Built with:
- `litellm` - LLM integration
- `rich` - Terminal formatting
- `boto3` - AWS SDK
- `python-dotenv` - Environment management
- `asyncio` - Asynchronous I/O

## License

MIT License

## Future Enhancements

- [x] Streaming Support
- [x] Asynchronous event-driven architecture
- [ ] Additional tool integrations
- [ ] Web interface option
- [ ] Enhanced error handling
- [ ] Conversation export functionality
- [ ] Tool usage analytics
- [ ] Custom tool loading system

### WhatsApp Integration
- [ ] WhatsApp Business API integration
  - Message sending and receiving
  - Media file handling (images, documents, voice notes)
  - Group chat support
  - Interactive buttons and list messages
- [ ] Automated responses through AI
- [ ] Contact management and user session handling
- [ ] Message templates and broadcasting
- [ ] Multi-language support for WhatsApp messages
- [ ] Message status tracking and analytics
            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "keystroke-agent",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.12",
    "maintainer_email": null,
    "keywords": "ai-assistant, async, aws, bedrock, chatbot, claude, cli, llm, terminal-ui, tools",
    "author": null,
    "author_email": "Puspak Rout <thepuspak@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/f6/52/e36a26c3b27d563a76e8c6622bb7d40f944e85d87950e3bbdba65df328ad/keystroke_agent-0.1.7.tar.gz",
    "platform": null,
    "description": "# Keystroke Agent\n\nA Python project implementing an AI assistant with tool integration, AWS service support, and asynchronous event-driven architecture.\n\n## Features\n\n1. **Advanced AI Integration**: \n   - Uses AWS Bedrock (Claude 3.5 Sonnet) as the default LLM\n   - Asynchronous API calls for better performance\n   - Configurable model selection\n   - Event-driven architecture using asyncio.Queue for handling LLM responses and tool calls\n\n2. **Built-in Tools**:\n   - Calculator: Mathematical operations and functions\n   - File Management: File operations (create, read, update, delete)\n   - Presigned URL: AWS S3 presigned URL generation and file transfer\n\n3. **Interactive CLI**:\n   - Rich text formatting for better readability\n   - Command history management\n   - Dynamic conversation summarization\n   - Dot commands for runtime configuration\n   - Asynchronous implementation for improved responsiveness\n\n4. **Customizable Settings**:\n   - Model selection\n   - System message\n   - Assistant name\n   - History limit\n   - Tool enablement\n\n## Installation\n\n```sh\npip install keystroke-agent\n```\n\n## Configuration\n\n1. Create a `.env` file with your AWS credentials:\n```env\nAWS_ACCESS_KEY_ID=your_key_id\nAWS_SECRET_ACCESS_KEY=your_secret_key\nAWS_SESSION_TOKEN=your_session_token\nAWS_DEFAULT_REGION=your_region\n```\n\n2. Adjust settings in `keystroke/settings.py` as needed:\n```python\nAGENT_NAME = \"AI Assistant\"\nDEFAULT_LLM_MODEL = \"bedrock/anthropic.claude-3-5-sonnet-20240620-v1:0\"\nHISTORY_LIMIT = 10\nENABLE_TOOLS = True\n```\n\n## Usage\n\nStart the agent:\n```sh\nagent\n```\n\n### Available Dot Commands\n\n- `.help` - Show available commands\n- `.clear` - Clear conversation history\n- `.model <model_name>` - Change the LLM model\n- `.view` - View current settings\n- `.view history` - View conversation history\n- `.system <message>` - Change the system message\n- `.name <new_name>` - Change the assistant's name\n\n### Available Tools\n\n1. **Calculator**:\n   - Basic arithmetic operations\n   - Trigonometric functions\n   - Logarithms and exponentials\n   - Factorial calculation\n\n2. **File Management**:\n   - Create, read, update, and delete files\n   - List files in directories\n   - Copy and rename files\n   - Recursive operations support\n\n3. **AWS S3 Integration**:\n   - Generate presigned URLs for upload/download\n   - Upload files using presigned URLs\n   - Download files using presigned URLs\n\n## Development\n\nBuilt with:\n- `litellm` - LLM integration\n- `rich` - Terminal formatting\n- `boto3` - AWS SDK\n- `python-dotenv` - Environment management\n- `asyncio` - Asynchronous I/O\n\n## License\n\nMIT License\n\n## Future Enhancements\n\n- [x] Streaming Support\n- [x] Asynchronous event-driven architecture\n- [ ] Additional tool integrations\n- [ ] Web interface option\n- [ ] Enhanced error handling\n- [ ] Conversation export functionality\n- [ ] Tool usage analytics\n- [ ] Custom tool loading system\n\n### WhatsApp Integration\n- [ ] WhatsApp Business API integration\n  - Message sending and receiving\n  - Media file handling (images, documents, voice notes)\n  - Group chat support\n  - Interactive buttons and list messages\n- [ ] Automated responses through AI\n- [ ] Contact management and user session handling\n- [ ] Message templates and broadcasting\n- [ ] Multi-language support for WhatsApp messages\n- [ ] Message status tracking and analytics",
    "bugtrack_url": null,
    "license": null,
    "summary": "An AI-powered CLI assistant with AWS Bedrock integration, tool support, and customizable features for interactive conversations and task automation.",
    "version": "0.1.7",
    "project_urls": {
        "Changelog": "https://github.com/thepuspak/keystroke-agent/blob/main/CHANGELOG.md",
        "Homepage": "https://github.com/thepuspak/keystroke-agent",
        "Issues": "https://github.com/thepuspak/keystroke-agent/issues",
        "Repository": "https://github.com/thepuspak/keystroke-agent.git"
    },
    "split_keywords": [
        "ai-assistant",
        " async",
        " aws",
        " bedrock",
        " chatbot",
        " claude",
        " cli",
        " llm",
        " terminal-ui",
        " tools"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "71baa1fec42e23059663907edf212fa3dff5f9466bd17fb8a71e4c86dc51a2cc",
                "md5": "5c967611813294b16068366fc1821046",
                "sha256": "910c4b8b55f5ab98e8d72707f97cf401c788486ac658fc17c868f1108717f48b"
            },
            "downloads": -1,
            "filename": "keystroke_agent-0.1.7-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "5c967611813294b16068366fc1821046",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.12",
            "size": 13466,
            "upload_time": "2025-08-27T02:14:12",
            "upload_time_iso_8601": "2025-08-27T02:14:12.928798Z",
            "url": "https://files.pythonhosted.org/packages/71/ba/a1fec42e23059663907edf212fa3dff5f9466bd17fb8a71e4c86dc51a2cc/keystroke_agent-0.1.7-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "f652e36a26c3b27d563a76e8c6622bb7d40f944e85d87950e3bbdba65df328ad",
                "md5": "adb69577939157cbb84f3eb8227a3ef1",
                "sha256": "112f55af308491e23033a980c7564c23fa3b7c0ce42f9d606e63bad0dde78daf"
            },
            "downloads": -1,
            "filename": "keystroke_agent-0.1.7.tar.gz",
            "has_sig": false,
            "md5_digest": "adb69577939157cbb84f3eb8227a3ef1",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.12",
            "size": 95356,
            "upload_time": "2025-08-27T02:14:15",
            "upload_time_iso_8601": "2025-08-27T02:14:15.353358Z",
            "url": "https://files.pythonhosted.org/packages/f6/52/e36a26c3b27d563a76e8c6622bb7d40f944e85d87950e3bbdba65df328ad/keystroke_agent-0.1.7.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-08-27 02:14:15",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "thepuspak",
    "github_project": "keystroke-agent",
    "github_not_found": true,
    "lcname": "keystroke-agent"
}
        
Elapsed time: 1.26519s