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:
- Action Agent - An agent that can perform actions based on given commands and input.
- 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
- Create a virtual environment (recommended):
python3.12 -m venv .venv source .venv/bin/activate
- 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
56666ced0319e29f5cb3ecc1093639689ccd8fb659f0bbdd303ac1d1ab0afb7c
|
|
| MD5 |
c39a234b8ce918703c0aba7382cb231b
|
|
| BLAKE2b-256 |
48e2a6692b5ae34a9280835f310ef064146adc3076c4980713fd6c4d880b2e98
|
Provenance
The following attestation bundles were made for amok-0.1.1.tar.gz:
Publisher:
publish.yml on rapidclock/amok
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
amok-0.1.1.tar.gz -
Subject digest:
56666ced0319e29f5cb3ecc1093639689ccd8fb659f0bbdd303ac1d1ab0afb7c - Sigstore transparency entry: 815733064
- Sigstore integration time:
-
Permalink:
rapidclock/amok@91d0b0a67f7976a289ed83ff7fba730a2738849c -
Branch / Tag:
refs/heads/main - Owner: https://github.com/rapidclock
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@91d0b0a67f7976a289ed83ff7fba730a2738849c -
Trigger Event:
workflow_dispatch
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
79dd0bd292970b4f3dc41663e8bcb21be58aff2acf87250d9c98ea231c1dd8f0
|
|
| MD5 |
f8d295a4306b2074db27dd172d2baee5
|
|
| BLAKE2b-256 |
7cb0a762b757e51adb41061021cab1761a38a8f460f74694d49a6ad0545efee7
|
Provenance
The following attestation bundles were made for amok-0.1.1-py3-none-any.whl:
Publisher:
publish.yml on rapidclock/amok
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
amok-0.1.1-py3-none-any.whl -
Subject digest:
79dd0bd292970b4f3dc41663e8bcb21be58aff2acf87250d9c98ea231c1dd8f0 - Sigstore transparency entry: 815733069
- Sigstore integration time:
-
Permalink:
rapidclock/amok@91d0b0a67f7976a289ed83ff7fba730a2738849c -
Branch / Tag:
refs/heads/main - Owner: https://github.com/rapidclock
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@91d0b0a67f7976a289ed83ff7fba730a2738849c -
Trigger Event:
workflow_dispatch
-
Statement type: