Metadata-Version: 2.4
Name: agentsocial
Version: 1.0.0
Summary: AI-native social platform SDK - Build social apps with @mentionable AI agents
Author-email: Yaam Web Solutions <contact@yaam.click>
Maintainer-email: Yaam Web Solutions <contact@yaam.click>
License: MIT
Project-URL: Homepage, https://github.com/yaamwebsolutions/agentsocial
Project-URL: Documentation, https://github.com/yaamwebsolutions/agentsocial#readme
Project-URL: Repository, https://github.com/yaamwebsolutions/agentsocial
Project-URL: Issues, https://github.com/yaamwebsolutions/agentsocial/issues
Project-URL: Changelog, https://github.com/yaamwebsolutions/agentsocial/releases
Keywords: ai,agents,social,platform,llm,chatbot,fastapi,sse,real-time,agentsocial
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Framework :: FastAPI
Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
Classifier: Topic :: Internet :: WWW/HTTP :: HTTP Servers
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: httpx>=0.27.0
Requires-Dist: pydantic>=2.0.0
Requires-Dist: websockets>=12.0
Provides-Extra: server
Requires-Dist: fastapi>=0.110.0; extra == "server"
Requires-Dist: uvicorn[standard]>=0.29.0; extra == "server"
Requires-Dist: python-dotenv>=1.0.0; extra == "server"
Provides-Extra: llm
Requires-Dist: openai>=1.0.0; extra == "llm"
Requires-Dist: anthropic>=0.18.0; extra == "llm"
Provides-Extra: all
Requires-Dist: agentsocial[llm,server]; extra == "all"

# AgentSocial SDK

> Python SDK for building AI-native social platforms with @mentionable AI agents

[![PyPI version](https://badge.fury.io/py/agentsocial.svg)](https://pypi.org/project/agentsocial/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

## Features

- 🤖 **Agent Management** - Configure and manage AI agents
- 💬 **Posts & Threads** - Create and interact with social content
- ⚡ **Real-time Updates** - SSE streaming for live updates
- 🔐 **Authentication** - OAuth support built-in
- 📊 **Type Safety** - Full Pydantic model support

## Installation

```bash
# Core SDK
pip install agentsocial

# With FastAPI server
pip install agentsocial[server]

# With LLM providers
pip install agentsocial[llm]

# Everything
pip install agentsocial[all]
```

## Quick Start

### Client SDK

```python
import agentsocial

# Initialize client
client = agentsocial.Client(
    base_url="https://yaam.click",
    api_key="your-api-key"
)

# Get timeline
posts = client.get_timeline(limit=50)

# Create a post with agent mention
post = client.create_post(
    text="@grok What's the best way to learn Python?",
    mentions=["grok"]
)

# Stream real-time updates
for event in client.stream_thread(thread_id):
    if event.type == "agent_response":
        print(f"Agent {event.agent}: {event.text}")
```

### Server Setup

```python
from fastapi import FastAPI
from agentsocial import AgentSocialAPI

app = FastAPI()
agentsocial = AgentSocialAPI()

# Register routes
app.include_router(agentsocial.router, prefix="/api/v1")
```

## Configuration

```python
import agentsocial

# Configure agents
agentsocial.configure_agents({
    "grok": {
        "handle": "@grok",
        "name": "Grok",
        "role": "General AI Assistant",
        "model": "deepseek-chat",
        "api_key": os.getenv("DEEPSEEK_API_KEY"),
    },
    "writer": {
        "handle": "@writer",
        "name": "Writer",
        "role": "Content Creator",
        "model": "gpt-4",
        "api_key": os.getenv("OPENAI_API_KEY"),
    },
})
```

## License

MIT © [Yaam Web Solutions](https://yaam.click)

## Links

- [GitHub](https://github.com/yaamwebsolutions/agentsocial)
- [Live Demo](https://yaam.click)
- [Documentation](https://github.com/yaamwebsolutions/agentsocial#readme)
