Metadata-Version: 2.4
Name: agentapps
Version: 0.1.0
Summary: AgenticAI - A flexible multi-agent orchestration framework with
Home-page: https://github.com/91abdul/agentapps
Author: 
Author-email: 
Project-URL: Bug Reports, https://github.com/91abdul/agentapps/issues
Project-URL: Source, https://github.com/91abdul/agentapps
Project-URL: Documentation, https://github.com/91abdul/agentapps#readme
Keywords: agents,ai,llm,orchestration,multi-agent,openai,web-search
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Topic :: Software Development :: Libraries :: Python Modules
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: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.8
Description-Content-Type: text/markdown
Requires-Dist: openai
Requires-Dist: ddgs
Requires-Dist: beautifulsoup4
Requires-Dist: requests
Provides-Extra: dev
Requires-Dist: pytest; extra == "dev"
Requires-Dist: black; extra == "dev"
Requires-Dist: flake8; extra == "dev"
Requires-Dist: mypy; extra == "dev"
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: keywords
Dynamic: project-url
Dynamic: provides-extra
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

# AgentApps

A flexible multi-agent orchestration framework for building intelligent agent applications.

## Features

- 🤖 **Simple Agent Creation** - Clean, intuitive Phi-style API
- 👥 **Team Collaboration** - Multiple agents working together
- 🔄 **Sequential Workflows** - Automatic multi-step execution
- 🛠️ **Built-in Tools** - Web search, scraping, calculations
- 🎯 **Custom Tools** - Easy tool creation
- 📊 **Streaming Support** - Real-time responses
- 🔍 **Web Search** - DuckDuckGo integration
- 🌐 **Web Scraping** - Extract content from any URL

## Installation
```bash
pip install agentapps
```

This installs all dependencies:
- `openai` - OpenAI API client
- `ddgs` - DuckDuckGo search
- `beautifulsoup4` - HTML parsing
- `requests` - HTTP requests

## Quick Start
```python
from agentapps import Agent
from agentapps.model import OpenAIChat
from agentapps.tools import SearchSummaryTool

# Create an agent
agent = Agent(
    name="Research Assistant",
    role="Search and analyze information",
    model=OpenAIChat(id="gpt-4", api_key="your-openai-key"),
    tools=[SearchSummaryTool()],
    instructions=["Always include sources"],
    show_tool_calls=True
)

# Use it!
agent.print_response("What is the latest news about AI?")
```

## Available Tools

### SearchSummaryTool
Search the web and get detailed snippets:
```python
from agentapps.tools import SearchSummaryTool

agent = Agent(
    name="Searcher",
    model=OpenAIChat(id="gpt-4", api_key="key"),
    tools=[SearchSummaryTool()]
)
```

### WebScraperTool
Scrape content from URLs:
```python
from agentapps.tools import WebScraperTool

agent = Agent(
    name="Scraper",
    model=OpenAIChat(id="gpt-4", api_key="key"),
    tools=[WebScraperTool()]
)
```

### CalculatorTool
Perform calculations:
```python
from agentapps.tools import CalculatorTool

agent = Agent(
    name="Calculator",
    model=OpenAIChat(id="gpt-4", api_key="key"),
    tools=[CalculatorTool()]
)
```

## Team Agents

Create teams that work together sequentially:
```python
from agentapps import Agent
from agentapps.model import OpenAIChat
from agentapps.tools import SearchSummaryTool, WebScraperTool

# Create specialist agents
search_agent = Agent(
    name="Search Agent",
    role="Search the web",
    model=OpenAIChat(id="gpt-4", api_key="your-key"),
    tools=[SearchSummaryTool()]
)

scraper_agent = Agent(
    name="Scraper Agent",
    role="Read web pages",
    model=OpenAIChat(id="gpt-4", api_key="your-key"),
    tools=[WebScraperTool()]
)

# Create team with sequential workflow
team = Agent(
    team=[search_agent, scraper_agent],
    instructions=[
        "First, search for relevant URLs",
        "Then, scrape content from those URLs",
        "Finally, provide comprehensive answer"
    ],
    show_tool_calls=True
)

# Team automatically: searches → scrapes → answers
team.print_response("Research NVIDIA's latest AI developments")
```

## Custom Tools

Create your own tools easily:
```python
from agentapps import Tool

class WeatherTool(Tool):
    def __init__(self):
        super().__init__(
            name="get_weather",
            description="Get weather for a city"
        )
    
    def execute(self, city: str) -> str:
        # Your implementation
        return f"Weather in {city}: Sunny, 72°F"
    
    def get_parameters(self):
        return {
            "type": "object",
            "properties": {
                "city": {"type": "string", "description": "City name"}
            },
            "required": ["city"]
        }

# Use it
agent = Agent(
    name="Weather Agent",
    model=OpenAIChat(id="gpt-4", api_key="key"),
    tools=[WeatherTool()]
)
```

## Examples

### Stock Analysis
```python
agent = Agent(
    name="Stock Analyst",
    role="Analyze stocks",
    model=OpenAIChat(id="gpt-4", api_key="key"),
    tools=[SearchSummaryTool()],
    instructions=["Include price targets and analyst ratings"]
)

agent.print_response("Analyze NVDA stock with latest news and recommendations")
```

### Research Assistant
```python
research_team = Agent(
    team=[search_agent, scraper_agent],
    instructions=[
        "Search for academic sources",
        "Read full articles",
        "Provide comprehensive summary with citations"
    ]
)

research_team.print_response("What are the latest breakthroughs in quantum computing?")
```

## API Reference

### Agent
```python
Agent(
    name: str = "Agent",
    role: str = "General Assistant",
    model: Model = None,
    tools: List[Tool] = None,
    instructions: List[str] = None,
    team: List[Agent] = None,
    show_tool_calls: bool = False,
    markdown: bool = False,
    temperature: float = None
)
```

### Methods

- `run(message: str, stream: bool = False)` - Execute agent
- `print_response(message: str, stream: bool = False)` - Print response
- `clear_history()` - Clear conversation history
- `add_tool(tool: Tool)` - Add a tool
- `get_info()` - Get agent information

## Requirements

- Python >= 3.8
- OpenAI API key

## License

MIT License

## Contributing

Contributions welcome! Please feel free to submit a Pull Request.

## Links

- GitHub: https://github.com/91Abdul/agentapps
- PyPI: https://pypi.org/project/agentapps
- Issues: https://github.com/91Abdul/agentapps/issues
