Amplifier Core
raw JSON → 1.4.1 verified Fri May 01 auth: no python
A Rust kernel with Python bindings for the Amplifier modular AI agent framework, providing high-performance agent execution, tool management, and memory systems. Current version: 1.4.1, requires Python >=3.11. Release cadence is irregular, primarily driven by Microsoft Research.
pip install amplifier-core Common errors
error ModuleNotFoundError: No module named 'amplifier' ↓
cause Installed the wrong package version (<1.0.0) or import path confusion with old 'amplifier_core' package.
fix
Uninstall old package and reinstall: 'pip uninstall amplifier-core && pip install amplifier-core>=1.0.0'.
error ImportError: cannot import name 'Tool' from 'amplifier' ↓
cause Tool class is in the 'amplifier.tools' submodule, not top-level.
fix
Use 'from amplifier.tools import Tool'.
error RuntimeError: Attempting to run an agent without setting system_prompt ↓
cause The Agent constructor requires the 'system_prompt' parameter (since v1.2.0).
fix
Provide a system prompt string when creating an Agent instance.
Warnings
breaking In version 1.0.0, the import path changed from 'amplifier_core' to 'amplifier'. All code using 'amplifier_core' will break. ↓
fix Replace all 'import amplifier_core' with 'import amplifier' and adjust submodule imports accordingly.
gotcha The library uses Rust for performance; on some platforms (e.g., M1/M2 Macs) you may need to install Rust toolchain or use pre-built wheels. If installation fails, ensure you have the latest pip and setuptools. ↓
fix Run 'pip install --upgrade pip setuptools' and consider installing 'maturin' if building from source.
deprecated The 'AsyncAgent' class is deprecated in version 1.4.0 and may be removed in future releases. Use 'Agent' with async methods instead. ↓
fix Replace 'AsyncAgent' with 'Agent' and call agent.run_async() if needed.
Install
pip install amplifier-core==1.4.1 Imports
- Agent wrong
from amplifier_core import Agentcorrectfrom amplifier import Agent - Tool wrong
from amplifier import Toolcorrectfrom amplifier.tools import Tool - MemorySystem wrong
from amplifier_core.memory import MemorySystemcorrectfrom amplifier.memory import MemorySystem
Quickstart
import os
from amplifier import Agent, Tool
from amplifier.tools import Tool
from amplifier.memory import MemorySystem
# Define a custom tool
def search(query: str) -> str:
return f"Search result for {query}"
search_tool = Tool(name="search", func=search)
# Initialize agent
agent = Agent(
name="my_agent",
system_prompt="You are a helpful assistant.",
tools=[search_tool],
memory=MemorySystem()
)
# Run the agent
response = agent.run("What is the weather?")
print(response)