Skip to main content

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, and Enum
    • dataclasses
  • pydantic.BaseModel subclasses

Project details


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.35.tar.gz (32.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

agentia-0.1.35-py3-none-any.whl (44.5 kB view details)

Uploaded Python 3

File details

Details for the file agentia-0.1.35.tar.gz.

File metadata

  • Download URL: agentia-0.1.35.tar.gz
  • Upload date:
  • Size: 32.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.3 {"installer":{"name":"uv","version":"0.11.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for agentia-0.1.35.tar.gz
Algorithm Hash digest
SHA256 0dc66a56c6bd0d6ff62cbbf2fc1f7c5e928e48a1d83887a4cc37515cf59228a5
MD5 fdff871e4de54aca845235c6c4e1df70
BLAKE2b-256 11abc8a25ae123d4b642d023afc1b9c16ed71c91a208dd41c49ec9f57d7cd0b2

See more details on using hashes here.

File details

Details for the file agentia-0.1.35-py3-none-any.whl.

File metadata

  • Download URL: agentia-0.1.35-py3-none-any.whl
  • Upload date:
  • Size: 44.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.3 {"installer":{"name":"uv","version":"0.11.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for agentia-0.1.35-py3-none-any.whl
Algorithm Hash digest
SHA256 da8694937bb830909b442805564a3f4e4cf80c859c21eb14383b96492266c382
MD5 20146b5ff619090799328827c0d957b2
BLAKE2b-256 f361a2b2c47a1497c7043dfc7e2713f84c01bca4e9e6c5ed47767269e2b48c52

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page