Ergonomic LLM Agents
Project description
Agentia: Ergonomic LLM Agents
Ergonomic LLM Agents with MCP and Skills support.
Getting Started
Run agents with tools, MCP, and Skills
from agentia import Agent, MCP
from typing import Annotated
# Define a tool as a python function
def get_weather(location: Annotated[str, "The city name"]):
"""Get the current weather in a given location"""
return { "temperature": 72 }
# Declare a MCP server:
calc = MCP(name="calculator", command="uvx", args=["mcp-server-calculator"])
# Create an agent
# This will load the function tool, the calculator MCP, and all skills under $CWD/.skills
agent = Agent(model="openai/gpt-5-nano", tools=[get_weather, calc], skills=True)
# Run the agent with the mcp
response = await agent.run("Calculate 234 ** 3")
print(response.text)
# Output: The result of 234 raised to the power of 3 is 12,812,904.
The Magic Decorator
Create agent-powered magic functions.
Support both plain types and pydantic models as input and output.
from agentia import magic
from pydantic import BaseModel
class Forcast(BaseModel):
location: str
temperature_celsius: int
@magic
async def get_weather(weather_forcast: str) -> Forcast:
"""Create weather forcase object based on the input string"""
...
forcast = await get_weather("The current temperature in Boston is 72°F")
print(forcast.location) # Output: Boston
print(forcast.temperature_celsius) # Output: 22
Supported Parameter and Result Types
- Any types that can be passed to
pydantic.TypeAdaptor:- Builtin types:
int,float,str,bool,tuple[_],list[_],dict[_, _] - Enums:
Literal['A', 'B', ...],StrEnum,IntEnum, andEnum - dataclasses
- Builtin types:
pydantic.BaseModelsubclasses
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
agentia-0.1.28.tar.gz
(36.0 kB
view details)
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
agentia-0.1.28-py3-none-any.whl
(49.6 kB
view details)
File details
Details for the file agentia-0.1.28.tar.gz.
File metadata
- Download URL: agentia-0.1.28.tar.gz
- Upload date:
- Size: 36.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.6.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2f3579ec25717ce15ccc87b6121b26514b5d9915d3f8781a1018d7fff7818dae
|
|
| MD5 |
6f830b874cb93436f5fb7980809a4dc1
|
|
| BLAKE2b-256 |
f77bc195d44a3bab3eb4f20c757285db8b3276a4ef9374f639a0209d6f7f136e
|
File details
Details for the file agentia-0.1.28-py3-none-any.whl.
File metadata
- Download URL: agentia-0.1.28-py3-none-any.whl
- Upload date:
- Size: 49.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.6.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
850e7125138a9d19612221c1349695e6eb306bddcb478aee12edf5f569a6c5c6
|
|
| MD5 |
a6986dcca624d569d3326fc37c743981
|
|
| BLAKE2b-256 |
74cf31ec7ae1ae4fd6743caf9e296e37e4a37c3b8f96189e10574ffc50dd1287
|