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.20.tar.gz
(35.9 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.20-py3-none-any.whl
(48.8 kB
view details)
File details
Details for the file agentia-0.1.20.tar.gz.
File metadata
- Download URL: agentia-0.1.20.tar.gz
- Upload date:
- Size: 35.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.6.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b16980ed130e0e7cc10e5a28ff5d959da826cd30486918fcc70fbdc37f0b4df7
|
|
| MD5 |
8d248bca7a841c317f77810fdf78e479
|
|
| BLAKE2b-256 |
d506ee4bc43b9bf5e66c78406a46c6dacb4a8c950d875a1941307969d3e40692
|
File details
Details for the file agentia-0.1.20-py3-none-any.whl.
File metadata
- Download URL: agentia-0.1.20-py3-none-any.whl
- Upload date:
- Size: 48.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.6.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4f9e78f123c91110a258f1aa95e22ce028ff5c12e857889ce5f67addb7bdd036
|
|
| MD5 |
41a5efbd2b7a8b6b6f59b7a6c1e4470d
|
|
| BLAKE2b-256 |
d0b3aa58e4a83f9064b0b940bef885eb95e69e1e57954bd7adc3f2fb7527c76c
|