Skip to main content

An AI-powered CLI assistant with AWS Bedrock integration, tool support, and customizable features for interactive conversations and task automation.

Project description

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

pip install keystroke-agent

Configuration

  1. Create a .env file with your AWS credentials:
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
  1. Adjust settings in keystroke/settings.py as needed:
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:

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

  • Streaming Support
  • 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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

keystroke_agent-0.1.5.tar.gz (94.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

keystroke_agent-0.1.5-py3-none-any.whl (13.3 kB view details)

Uploaded Python 3

File details

Details for the file keystroke_agent-0.1.5.tar.gz.

File metadata

  • Download URL: keystroke_agent-0.1.5.tar.gz
  • Upload date:
  • Size: 94.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for keystroke_agent-0.1.5.tar.gz
Algorithm Hash digest
SHA256 f089996b9b2d1d9dfbaa40c76694df61640b111319897d6a80917df68a23ebec
MD5 bd8ef7f8fdfd6f686be1f6be55a38d64
BLAKE2b-256 60ec7007aab901757f86bcf1c857b6f29ac734889cd93e9986677a2487880bfb

See more details on using hashes here.

File details

Details for the file keystroke_agent-0.1.5-py3-none-any.whl.

File metadata

File hashes

Hashes for keystroke_agent-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 f4cf57c8be16f5df11509fbf1b6f33375cc058ed17519e5a4853a3f971d8579f
MD5 772fbda3bd2411f39a950e1cb47febcd
BLAKE2b-256 1d6de0cd281dcaca123928c258e162105233c7651c88b3e51f01ecf75462ddd2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page