Metadata-Version: 2.4
Name: agentify-core
Version: 0.4.0
Summary: Framework-agnostic AI agent library for building single and multi-agent systems
Author: Fabian M
Author-email: fabianmp_98@hotmail.com
License: MIT
Project-URL: Homepage, https://github.com/fa8i/Agentify
Project-URL: Repository, https://github.com/fa8i/Agentify
Project-URL: Bug Tracker, https://github.com/fa8i/Agentify/issues
Keywords: agentify,agentify-core,agent,multi-agent,ai,llm,openai,framework
Classifier: Development Status :: 3 - Alpha
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.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: openai
Requires-Dist: python-dotenv
Requires-Dist: Pillow
Requires-Dist: jsonschema>=4.0.0
Provides-Extra: redis
Requires-Dist: redis>=4.0.0; extra == "redis"
Provides-Extra: elastic
Requires-Dist: elasticsearch>=8.0.0; extra == "elastic"
Provides-Extra: tools
Requires-Dist: requests>=2.25.0; extra == "tools"
Provides-Extra: mcp
Requires-Dist: mcp; extra == "mcp"
Provides-Extra: ui
Requires-Dist: gradio==5.49.1; extra == "ui"
Provides-Extra: all
Requires-Dist: redis>=4.0.0; extra == "all"
Requires-Dist: elasticsearch>=8.0.0; extra == "all"
Requires-Dist: requests>=2.25.0; extra == "all"
Requires-Dist: gradio==5.49.1; extra == "all"
Requires-Dist: mcp; extra == "all"
Provides-Extra: dev
Requires-Dist: pytest>=7.0.0; extra == "dev"
Requires-Dist: pytest-cov>=4.0.0; extra == "dev"
Requires-Dist: black>=22.0.0; extra == "dev"
Requires-Dist: flake8>=5.0.0; extra == "dev"
Requires-Dist: mypy>=1.0.0; extra == "dev"
Requires-Dist: twine>=4.0.0; extra == "dev"
Requires-Dist: build>=0.10.0; extra == "dev"
Dynamic: license-file

# Agentify

**Production-ready AI agent library built on the OpenAI SDK**

Build and orchestrate AI agents—from simple assistants to complex multi-agent systems. Agentify targets the OpenAI-compatible Chat Completions interface, enabling seamless switching between providers (OpenAI, Azure, DeepSeek, Gemini, Anthropic, Llama, **Local LLMs**) without code changes.

---

## Why Agentify?

| Feature | Benefit |
|---------|---------|
| **Production-first** | Clear abstractions, explicit config, robust error handling |
| **Multi-provider** | Switch providers with one line—no agent code changes |
| **Orchestration primitives** | Uniform `run()`/`arun()` across agents, teams, pipelines, hierarchies |
| **Async-native** | Non-blocking I/O, parallel tool execution, event-loop friendly |
| **Pluggable memory** | In-memory, SQLite, Redis, Elasticsearch—same API |
| **Local LLMs** | Support for LM Studio, Ollama and custom local servers |

---

## Key Features

- **Single agents & multi-agent patterns**  
  Agents with tools and memory • Supervisor–worker Teams • Sequential Pipelines • Hierarchical delegation • Dynamic routing

- **Memory system**  
  Pluggable backends with policies (TTL, message limits, pruning) • Memory isolation per conversation • Async-safe operations

- **Reasoning models**  
  Configurable thinking depth (`reasoning_effort`) • Chain-of-thought storage • Real-time reasoning logs

- **Tools**  
  `@tool` decorator with automatic JSON Schema • Type-annotated interface • Argument validation

- **Async & parallel execution**  
  Native `arun()` for async apps • `run()` bridge for sync apps • Parallel tool calls

- **Observability**  
  Callback hooks for logging, monitoring, debugging

- **Multimodal**  
  Vision/image support • Streaming responses

---

## Installation

```bash
pip install agentify-core
```

Optional backends:
```bash
pip install agentify-core[redis]      # Redis memory store
pip install agentify-core[elastic]    # Elasticsearch store
pip install agentify-core[all]        # All optional dependencies
```

---

## Quick Start

```python
from agentify import BaseAgent, AgentConfig, MemoryService, MemoryAddress, tool
from agentify.memory.stores import InMemoryStore

@tool
def get_time() -> dict:
    """Returns the current time."""
    from datetime import datetime
    return {"time": datetime.now().strftime("%H:%M:%S")}

# Setup
memory = MemoryService(store=InMemoryStore())
addr = MemoryAddress(conversation_id="session_1")

agent = BaseAgent(
    config=AgentConfig(
        name="Assistant",
        system_prompt="You are a helpful assistant.",
        provider="provider",
        model_name="model",
        reasoning_effort="high",  # optional param:"low", "medium", "high"
        model_kwargs={"max_completion_tokens": 5000}, # Pass model-specific params       
        verbose=True, # Controls logging
    ),
    memory=memory,
    memory_address=addr,
    tools=[get_time],
)

response = agent.run("What time is it?")
print(response)

# Async usage is also available:
# response = await agent.arun("What time is it?")
```

---

## Memory Backends

```python
from agentify.memory.stores import InMemoryStore
from agentify.memory.stores.sqlite_store import SQLiteStore
from agentify.memory.stores.redis_store import RedisStore

# In-memory (default, for development)
store = InMemoryStore()

# SQLite (persistent, zero-config)
store = SQLiteStore(db_path="./agent.db")

# Redis (production, distributed)
store = RedisStore(url="redis://localhost:6379/0")
```

---

## Composable Flows

All primitives share the same `run()`/`arun()` interface:

- **BaseAgent** — Single agent with tools
- **Team** — Supervisor routes to worker agents
- **SequentialPipeline** — Output flows step-to-step
- **HierarchicalTeam** — Tree structures for delegation

Nest freely: Teams of Pipelines, Pipelines of Teams, dynamic routing at runtime.

---

## Links

- **Documentation & Examples**: [GitHub Repository](https://github.com/fa8i/Agentify)
- **Issues & PRs**: [Contribute](https://github.com/fa8i/Agentify/issues)

---

## License

MIT License

## Author

**Fabian Melchor** — [fabianmp_98@hotmail.com](mailto:fabianmp_98@hotmail.com)
