Skip to main content

LLM-based agents to be run from terminal to perform differen tasks with the command askagent

Project description

AskAgent - Mac Terminal LLM Agents

This is a simple Mac/Ubuntu terminal assistant with agents capable of various tasks. Purpose is to quickly with askagent command able to get answer without looking through via ChatGPT interface or searching in Google. Ideally, it can also execute unix command if permissed but use at your own risk. But for simple command i.e., "Go to desktop and list all the pdf's there" it can execute ['cd ~/Desktop', 'ls *.pdf'] and show the results.

Installation

This project uses Poetry for package management. To install Poetry, follow the instructions here.

Once you have Poetry installed, you can install the project dependencies with:

poetry install
poetry shell
askagent

Configuration

It requires certain environment variables to be set in order to operate correctly. Below are the necessary environment variables and a brief description of their use:

  • OPENAI_API_KEY: If OpenAI is going to be used for the model.
  • GROQ_API_KEY: If Groq (Llama-70B) is going to be used for the model.
  • WOLFRAM_ALPHA_APPID: (optional) Complex calculation, Math etc.
  • SERPAPI_API_KEY: (optional) Searching Google search
  • TAVILY_API_KEY: (optional) Searching Tavily API search

Export the API Keys to use the app (for example):

export OPENAI_API_KEY='your_api_key'
export SERPAPI_API_KEY='your_database_url'

For development, rename the .env.example to .env and update the API KEYS

Usage

To run the tool, execute the following from the command line:

askagent "What is the capital of France?"

Argument Details

The program takes the following arguments

  • --model: An optional argument that specifies which LLM model to use. Default is openai (alternative options, groq (running llama70B))
  • --verbose: An optional argument that specifies to a boolean to check intermediate steps. Default is False
  • prompt: A required positional argument that specifies the prompt for the LLM

For example:

askagent --model groq --verbose True "Find me any latest Diffusion video paper"

Some other further example:

askagent  "command to check mac cpu/gpu processing"
askagent --verbose=True  "Give me the command to find any pdf in my system"
askagent --verbose=True  "what does latest AI news say??"
askagent --verbose True  "what's the weather at Munich now?"
askagent --verbose=True  "what causes lung cancer? Get from medical expert"
askagent "give me top 5  Mrbeast channel video url"
askagent "What is 2x+5 = -3x + 7? and why?"
askagent "what's the command to see free space on my mac?"

TODO:

  • Add Llama3 local (from Ollama)
  • Add more tools

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

askagent-0.1.1.tar.gz (4.5 kB view details)

Uploaded Source

Built Distribution

askagent-0.1.1-py3-none-any.whl (5.5 kB view details)

Uploaded Python 3

File details

Details for the file askagent-0.1.1.tar.gz.

File metadata

  • Download URL: askagent-0.1.1.tar.gz
  • Upload date:
  • Size: 4.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.10.9 Darwin/23.1.0

File hashes

Hashes for askagent-0.1.1.tar.gz
Algorithm Hash digest
SHA256 afb73b5d90bf6c82ed9045bd4b5e6982e073cef8f4b4f7b90308d2fd6aab5d5f
MD5 cbc286eef80135c1f14f5ec074908087
BLAKE2b-256 c827e1ddb0fcfb5f6d910eda3a350b8f332c097fed1fb2257105a520247fcb63

See more details on using hashes here.

File details

Details for the file askagent-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: askagent-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 5.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.10.9 Darwin/23.1.0

File hashes

Hashes for askagent-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 3a03c2c660e3f4bcc5a317b18cea85c15195fc1367ed3b5d7edddba70cb1b409
MD5 85b146f4ee12fe5c63a3ede02680f44f
BLAKE2b-256 71e576776f693d93e4a188c10bcee12004d145e985838f1b2e4cd8ea7a339242

See more details on using hashes here.

Supported by

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