Metadata-Version: 2.4
Name: autourgos-core
Version: 1.0.0
Summary: A modular framework for building tool-augmented AI agents.
Project-URL: Homepage, https://github.com/devxjitin/autourgos-core
Project-URL: Documentation, https://github.com/devxjitin/autourgos-core#readme
Project-URL: Repository, https://github.com/devxjitin/autourgos-core
Project-URL: Issues, https://github.com/devxjitin/autourgos-core/issues
Author-email: Autourgos Team <autourgos@gmail.com>
Maintainer-email: DevXJitin <devxjitin@gmail.com>
License: MIT License
        
        Copyright (c) 2026 Autourgos Team
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
License-File: LICENSE
Keywords: agent-framework,agentic-ai,agents,ai,autourgos,autourgos-core,genai,llm,multi-agent,tooling
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Software Development :: Libraries
Classifier: Typing :: Typed
Requires-Python: >=3.8
Requires-Dist: pydantic>=2.0
Requires-Dist: rich>=13.0
Requires-Dist: tenacity>=8.0
Requires-Dist: typing-extensions>=4.0
Provides-Extra: all
Requires-Dist: anthropic>=0.25.0; extra == 'all'
Requires-Dist: faiss-cpu>=1.7.4; extra == 'all'
Requires-Dist: google-generativeai>=0.5.0; extra == 'all'
Requires-Dist: openai>=1.0.0; extra == 'all'
Provides-Extra: anthropic
Requires-Dist: anthropic>=0.25.0; extra == 'anthropic'
Provides-Extra: dev
Requires-Dist: black>=23.0; extra == 'dev'
Requires-Dist: mypy>=1.5; extra == 'dev'
Requires-Dist: pre-commit>=3.0; extra == 'dev'
Requires-Dist: pytest-cov>=4.0; extra == 'dev'
Requires-Dist: pytest>=7.0; extra == 'dev'
Requires-Dist: ruff>=0.1.0; extra == 'dev'
Provides-Extra: docs
Requires-Dist: mkdocs-material>=9.0; extra == 'docs'
Requires-Dist: mkdocs>=1.5; extra == 'docs'
Provides-Extra: google
Requires-Dist: google-generativeai>=0.5.0; extra == 'google'
Provides-Extra: openai
Requires-Dist: openai>=1.0.0; extra == 'openai'
Provides-Extra: vector
Requires-Dist: faiss-cpu>=1.7.4; extra == 'vector'
Description-Content-Type: text/markdown

# Autourgos Core: Professional-Grade Tool Management

The `autourgos.core` module provides a robust and intuitive system for creating, managing, and integrating tools with AI agents. It is the foundation of the Autourgos Agentic Kit, designed for high-performance, type-safe, and framework-agnostic tool definition.

## Key Features

- **Declarative Tool Creation:** Use the elegant `@tool` decorator to instantly convert Python functions into AI-ready tools.
- **Automatic Schema Generation:** Parameters, type hints, and docstrings are automatically parsed to generate a complete tool schema.
- **Type Safety:** Leverages Python's type hints for robust parameter validation at runtime.
- **Docstring Intelligence:** Automatically extracts tool and parameter descriptions from your function's docstring, supporting Google-style, NumPy-style, and reStructuredText formats.
- **Flexible & Agnostic:** Designed to work with any AI agent or multi-agent system, with zero boilerplate.

## Quickstart: Using the `@tool` Decorator

Creating a tool is as simple as decorating a Python function. The system handles the rest.

```python
from autourgos.core import tool

@tool
def calculator(expression: str) -> str:
    """
    Performs mathematical calculations on a given expression.
    
    Args:
        expression (str): The mathematical expression to evaluate.
    """
    try:
        # Note: eval() is used for demonstration. For production, use a safer alternative.
        return str(eval(expression))
    except Exception as e:
        return f"Error: {e}"

# Example Usage:
# result = calculator("2 + 2 * (3 - 1)")
# print(result)  # Output: 6
```

The `@tool` decorator automatically registers the function with the following metadata:
- **Name:** `calculator`
- **Description:** "Performs mathematical calculations on a given expression."
- **Parameters:** An `expression` of type `str` that is required.

## Advanced Usage: The `Tool` Class

For fine-grained control or dynamic tool creation, you can instantiate the `Tool` class directly.

```python
from autourgos.core import Tool

def web_search(query: str, limit: int = 10) -> str:
    """
    Searches the web for a given query.
    
    Args:
        query (str): The search query to execute.
        limit (int): The maximum number of results to return.
    """
    return f"Simulating search for '{query}' with a limit of {limit} results."

# Manually define the tool
search_tool = Tool(
    name="web_search",
    description="Searches the web for information.",
    function=web_search,
    parameters={
        "query": {"type": "str", "description": "The search query", "required": True},
        "limit": {"type": "int", "description": "Maximum number of results", "required": False},
    }
)

# Example Usage:
# search_results = search_tool.run(query="Autourgos Agentic Kit")
# print(search_results)
```

## Integrating with AI Agents

Once defined, tools can be seamlessly added to any agent that conforms to the Autourgos tool interface.

```python
# Assuming 'agent' is an instance of a Autourgos-compatible AI agent
agent.add_tools(calculator, search_tool)

# The agent can now intelligently invoke these tools based on user input.
# agent.run("What is 5 factorial?")
# agent.run("Find information about Python decorators.")
```

This system empowers developers to build sophisticated and reliable AI applications by providing a clean, powerful, and easy-to-use tool management framework.
