Metadata-Version: 2.4
Name: lightmodel
Version: 0.2.0
Summary: Ultra-light autonomous AI agents for any OpenAI-compatible API
Author-email: Your Name <you@example.com>
License-Expression: MIT
Keywords: llm,ai,agent,openai,nvidia-nim,tool-calling
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: OS Independent
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: requests>=2.28
Provides-Extra: search
Requires-Dist: beautifulsoup4>=4.12; extra == "search"
Dynamic: license-file

# LightModel

Ultra-light **autonomous AI agents** for any OpenAI-compatible API.
No `smolagents`, no `litellm`, no `openai` — just `requests`.

## Installation

    pip install lightmodel
    pip install lightmodel[search]   # with beautifulsoup4 for web search

## Quick start

    from lightmodel import Agent, LightModel, SimpleDuckDuckGoSearchTool

    model = LightModel(
        model_id="meta/llama-3.3-70b-instruct",
        api_base="https://integrate.api.nvidia.com/v1",
        api_key="your_key",
    )
    agent = Agent(
        model=model,
        tools=[SimpleDuckDuckGoSearchTool()],
        system_prompt="You are a helpful research assistant.",
    )
    print(agent.run("What are the latest AI news in 2026?"))

## Custom tools

    from lightmodel import Tool

    class CalculatorTool(Tool):
        name = "calculator"
        description = "Evaluate a basic arithmetic expression."
        inputs = {"expression": {"type": "string", "description": "e.g. 2+2"}}

        def forward(self, expression):
            return str(eval(expression, {"__builtins__": {}}, {}))

## License

MIT
