# Keystroke Agent
A Python project implementing an AI assistant with tool integration and AWS service support.
## 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
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
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
- `.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
## License
MIT License
## Future Enhancements
- [ ] Additional tool integrations
- [ ] Web interface option
- [ ] Enhanced error handling
- [ ] Conversation export functionality
- [ ] Tool usage analytics
- [ ] Custom tool loading system
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/29/0a/b009371d7baf7dd31a6d9b2d837485e892cfef6b9498054c68925572aa7f/keystroke_agent-0.1.4.tar.gz",
"platform": null,
"description": "# Keystroke Agent\n\nA Python project implementing an AI assistant with tool integration and AWS service support.\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\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\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- `.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\n## License\n\nMIT License\n\n## Future Enhancements\n\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",
"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.4",
"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": "01f864a3644691828604d9a1992ac7aea8737bef496f5f7cfcd5e539ca6adf01",
"md5": "6c2f2c0c5e60d025af2a8edc7b589aa4",
"sha256": "1e5d7fa576df450ea3fc8461ccca72ff5382eae1653833331147016f59a15ff7"
},
"downloads": -1,
"filename": "keystroke_agent-0.1.4-py3-none-any.whl",
"has_sig": false,
"md5_digest": "6c2f2c0c5e60d025af2a8edc7b589aa4",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.12",
"size": 10328,
"upload_time": "2025-08-23T04:16:07",
"upload_time_iso_8601": "2025-08-23T04:16:07.960615Z",
"url": "https://files.pythonhosted.org/packages/01/f8/64a3644691828604d9a1992ac7aea8737bef496f5f7cfcd5e539ca6adf01/keystroke_agent-0.1.4-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "290ab009371d7baf7dd31a6d9b2d837485e892cfef6b9498054c68925572aa7f",
"md5": "2b892eadec890b3d82c02b840e04f0dd",
"sha256": "6614716c8379e0fb6f2ed300da02f439d5150b1ec913be2bcf708fbef98ec0e9"
},
"downloads": -1,
"filename": "keystroke_agent-0.1.4.tar.gz",
"has_sig": false,
"md5_digest": "2b892eadec890b3d82c02b840e04f0dd",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.12",
"size": 86656,
"upload_time": "2025-08-23T04:16:09",
"upload_time_iso_8601": "2025-08-23T04:16:09.860062Z",
"url": "https://files.pythonhosted.org/packages/29/0a/b009371d7baf7dd31a6d9b2d837485e892cfef6b9498054c68925572aa7f/keystroke_agent-0.1.4.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-08-23 04:16:09",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "thepuspak",
"github_project": "keystroke-agent",
"github_not_found": true,
"lcname": "keystroke-agent"
}