mack

raw JSON →
0.5.0 verified Mon Apr 27 auth: no python

mack is a Python library for building and managing AI agents. The current version is 0.5.0, with a pre-1.0 release cadence indicating rapid development.

pip install mack
error ImportError: cannot import name 'Agent' from 'mack'
cause Version <0.5.0 where Agent was not exported at top level.
fix
Upgrade to 0.5.0+ with 'pip install --upgrade mack'.
error mack.exceptions.AuthenticationError: API key not provided
cause Missing or empty API key.
fix
Set MACK_API_KEY environment variable or pass api_key to Agent constructor.
breaking API key is required; will raise error if not set.
fix Set MACK_API_KEY environment variable or pass api_key parameter.
deprecated The old 'mack.run' function is deprecated in favor of Agent.run.
fix Use Agent class with run method instead.
gotcha Imports changed from submodules to top-level in 0.5.0.
fix Use 'from mack import Agent' instead of 'from mack.agent import Agent'.

Basic usage of mack: create an Agent with an API key and run a prompt.

from mack import Agent
import os

agent = Agent(
    api_key=os.environ.get('MACK_API_KEY', ''),
    model='gpt-4'
)
response = agent.run('Hello, who are you?')
print(response)