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.0.tar.gz (4.5 kB view details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: askagent-0.1.0.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.0.tar.gz
Algorithm Hash digest
SHA256 207639517e6f70596e5ad1b4e33ddbde814581a52985652307b7fa9a61ed29e5
MD5 ee96fa0c338b1875e934ae653a351cc4
BLAKE2b-256 c92194ba32ea00c2c1be1e71f7472dcc1a189299553e34f7eeaa56630f7f013c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: askagent-0.1.0-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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 cc53e4b9d62f641e0fed2772af0ccbe0018afad49fe71404eebf51c99fc8d72a
MD5 f09e884d58d590d5c367eb66ab3079f2
BLAKE2b-256 c761deadaf4957e92f9027cbfafc08d0adaf5e9ff42571dd07393bdf92344275

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