Skip to main content

Create OpenAI API Compatible, Task driven agents.

Project description

amok

Currently WIP.

Python framework to create "Agents" of certain types.

The name is a play on the image of LLMs as little minions running amok.

Details.

There are currently the below types of agents:

  1. Action Agent - An agent that can perform actions based on given commands and input.
  2. Option Agent - An agent that can selects options based on given commands and input.

You can create your own agent type by sub-classing the BaseAgent.

Create Agent from a Config File.

You can easily spin up agents from a config file.

The currently supported config file formats are yaml, json, and toml.

The fields in the config file are based on the Agent Options class for your agent type.

Example

config.toml

base_url = "http://localhost:1234/v1"
model = "google/gemma-3-12b"
temperature = 0.1
max_tokens = 4000
description = "Parse messages to extract the username from them, if present."
commands = [
    "You will parse the body of the message to extract the username.",
    "ONLY reply with the username, nothing else.",
    "No other information is needed. No formatting, no explanations, nothing else!",
    "You need to be > 99% sure about your answer.",
    "Reply with 'NO_RESULT' in case no username is given or you arent sure.",
]

Python Code

from amok import ActionAgent
uname_agent = ActionAgent.from_cfg("./config.toml")

Development

  1. Create a virtual environment (recommended):
    python3.12 -m venv .venv
    source .venv/bin/activate
    
  2. Install dependencies:
    pip install -e .
    

Requirements

  • Python 3.12 or newer is required.

Running Tests

To Run tests, install pytest and pytest-cov first.

# With Pytest configured in the pyproject.toml, you can run:
pytest .

# Optional
pytest --cov=amok --cov-report=term-missing tests

Running Linters

black .

ruff check

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

amok-0.1.1.tar.gz (22.5 kB view details)

Uploaded Source

Built Distribution

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

amok-0.1.1-py3-none-any.whl (15.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: amok-0.1.1.tar.gz
  • Upload date:
  • Size: 22.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for amok-0.1.1.tar.gz
Algorithm Hash digest
SHA256 56666ced0319e29f5cb3ecc1093639689ccd8fb659f0bbdd303ac1d1ab0afb7c
MD5 c39a234b8ce918703c0aba7382cb231b
BLAKE2b-256 48e2a6692b5ae34a9280835f310ef064146adc3076c4980713fd6c4d880b2e98

See more details on using hashes here.

Provenance

The following attestation bundles were made for amok-0.1.1.tar.gz:

Publisher: publish.yml on rapidclock/amok

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

  • Download URL: amok-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 15.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for amok-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 79dd0bd292970b4f3dc41663e8bcb21be58aff2acf87250d9c98ea231c1dd8f0
MD5 f8d295a4306b2074db27dd172d2baee5
BLAKE2b-256 7cb0a762b757e51adb41061021cab1761a38a8f460f74694d49a6ad0545efee7

See more details on using hashes here.

Provenance

The following attestation bundles were made for amok-0.1.1-py3-none-any.whl:

Publisher: publish.yml on rapidclock/amok

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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