Metadata-Version: 2.4
Name: agentia
Version: 0.1.32
Summary: Ergonomic LLM Agents
Project-URL: Repository, https://github.com/wenyuzhao/agentia
Author-email: Wenyu Zhao <wenyuzhaox@gmail.com>
License-Expression: MIT
License-File: LICENSE
Keywords: agent,ai-sdk,chatgpt,gpt,llm,mcp,openai,openrouter,skills,tools
Requires-Python: >=3.12
Requires-Dist: fastmcp>=2.14.5
Requires-Dist: filelock>=3.18.0
Requires-Dist: markdownify>=1.2.2
Requires-Dist: nest-asyncio>=1.6.0
Requires-Dist: openai<2,>=1.108.1
Requires-Dist: pillow>=12.1.0
Requires-Dist: pydantic>=2.10.4
Requires-Dist: python-dotenv<2,>=1.0.0
Requires-Dist: python-frontmatter>=1.1.0
Requires-Dist: tavily-python>=0.7.21
Provides-Extra: all
Description-Content-Type: text/markdown

# Agentia: Ergonomic LLM Agents

Ergonomic LLM Agents with MCP and Skills support.

# Getting Started

Run agents with tools, MCP, and Skills

```python
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.

```python
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

