agentify-core 0.1.4__tar.gz → 0.3.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. {agentify_core-0.1.4/agentify_core.egg-info → agentify_core-0.3.0}/PKG-INFO +33 -16
  2. agentify_core-0.3.0/README.md +108 -0
  3. {agentify_core-0.1.4 → agentify_core-0.3.0}/README_PYPI.md +22 -10
  4. {agentify_core-0.1.4 → agentify_core-0.3.0}/agentify/__init__.py +8 -14
  5. {agentify_core-0.1.4 → agentify_core-0.3.0}/agentify/core/__init__.py +4 -1
  6. {agentify_core-0.1.4 → agentify_core-0.3.0}/agentify/core/agent.py +428 -25
  7. agentify_core-0.3.0/agentify/core/tool.py +171 -0
  8. {agentify_core-0.1.4 → agentify_core-0.3.0}/agentify/llm/client.py +109 -2
  9. agentify_core-0.3.0/agentify/mcp/__init__.py +3 -0
  10. agentify_core-0.3.0/agentify/mcp/adapter.py +46 -0
  11. agentify_core-0.3.0/agentify/mcp/client.py +141 -0
  12. {agentify_core-0.1.4 → agentify_core-0.3.0}/agentify/memory/interfaces.py +2 -2
  13. {agentify_core-0.1.4 → agentify_core-0.3.0}/agentify/memory/service.py +17 -13
  14. agentify_core-0.3.0/agentify/memory/stores/__init__.py +10 -0
  15. agentify_core-0.3.0/agentify/memory/stores/elastic_store.py +244 -0
  16. {agentify_core-0.1.4 → agentify_core-0.3.0}/agentify/memory/stores/in_memory_store.py +6 -0
  17. {agentify_core-0.1.4 → agentify_core-0.3.0}/agentify/memory/stores/redis_store.py +45 -0
  18. agentify_core-0.3.0/agentify/memory/stores/sqlite_store.py +196 -0
  19. {agentify_core-0.1.4 → agentify_core-0.3.0}/agentify/multi_agent/hierarchical.py +23 -1
  20. {agentify_core-0.1.4 → agentify_core-0.3.0}/agentify/multi_agent/pipeline.py +59 -1
  21. {agentify_core-0.1.4 → agentify_core-0.3.0}/agentify/multi_agent/team.py +27 -1
  22. {agentify_core-0.1.4 → agentify_core-0.3.0}/agentify/multi_agent/tool_wrapper.py +117 -6
  23. {agentify_core-0.1.4 → agentify_core-0.3.0/agentify_core.egg-info}/PKG-INFO +33 -16
  24. {agentify_core-0.1.4 → agentify_core-0.3.0}/agentify_core.egg-info/SOURCES.txt +8 -1
  25. {agentify_core-0.1.4 → agentify_core-0.3.0}/agentify_core.egg-info/requires.txt +11 -3
  26. {agentify_core-0.1.4 → agentify_core-0.3.0}/pyproject.toml +16 -7
  27. agentify_core-0.3.0/requirements.txt +26 -0
  28. agentify_core-0.3.0/tests/test_mcp.py +124 -0
  29. agentify_core-0.3.0/tests/test_verify_hooks.py +69 -0
  30. agentify_core-0.1.4/README.md +0 -117
  31. agentify_core-0.1.4/agentify/core/tool.py +0 -30
  32. agentify_core-0.1.4/agentify/memory/stores/__init__.py +0 -5
  33. agentify_core-0.1.4/requirements.txt +0 -18
  34. {agentify_core-0.1.4 → agentify_core-0.3.0}/LICENSE +0 -0
  35. {agentify_core-0.1.4 → agentify_core-0.3.0}/MANIFEST.in +0 -0
  36. {agentify_core-0.1.4 → agentify_core-0.3.0}/agentify/core/callbacks.py +0 -0
  37. {agentify_core-0.1.4 → agentify_core-0.3.0}/agentify/core/config.py +0 -0
  38. {agentify_core-0.1.4 → agentify_core-0.3.0}/agentify/extensions/__init__.py +0 -0
  39. {agentify_core-0.1.4 → agentify_core-0.3.0}/agentify/extensions/prompts/__init__.py +0 -0
  40. {agentify_core-0.1.4 → agentify_core-0.3.0}/agentify/extensions/prompts/assistant.py +0 -0
  41. {agentify_core-0.1.4 → agentify_core-0.3.0}/agentify/extensions/tools/__init__.py +0 -0
  42. {agentify_core-0.1.4 → agentify_core-0.3.0}/agentify/extensions/tools/calculator.py +0 -0
  43. {agentify_core-0.1.4 → agentify_core-0.3.0}/agentify/extensions/tools/filesystem.py +0 -0
  44. {agentify_core-0.1.4 → agentify_core-0.3.0}/agentify/extensions/tools/planning.py +0 -0
  45. {agentify_core-0.1.4 → agentify_core-0.3.0}/agentify/extensions/tools/time.py +0 -0
  46. {agentify_core-0.1.4 → agentify_core-0.3.0}/agentify/extensions/tools/weather.py +0 -0
  47. {agentify_core-0.1.4 → agentify_core-0.3.0}/agentify/llm/__init__.py +0 -0
  48. {agentify_core-0.1.4 → agentify_core-0.3.0}/agentify/memory/__init__.py +0 -0
  49. {agentify_core-0.1.4 → agentify_core-0.3.0}/agentify/memory/policies.py +0 -0
  50. {agentify_core-0.1.4 → agentify_core-0.3.0}/agentify/multi_agent/__init__.py +0 -0
  51. {agentify_core-0.1.4 → agentify_core-0.3.0}/agentify/utils/__init__.py +0 -0
  52. {agentify_core-0.1.4 → agentify_core-0.3.0}/agentify/utils/style.py +0 -0
  53. {agentify_core-0.1.4 → agentify_core-0.3.0}/agentify_core.egg-info/dependency_links.txt +0 -0
  54. {agentify_core-0.1.4 → agentify_core-0.3.0}/agentify_core.egg-info/top_level.txt +0 -0
  55. {agentify_core-0.1.4 → agentify_core-0.3.0}/setup.cfg +0 -0
  56. {agentify_core-0.1.4 → agentify_core-0.3.0}/tests/test_filesystem_tools.py +0 -0
  57. {agentify_core-0.1.4 → agentify_core-0.3.0}/tests/test_planning_tool.py +0 -0
@@ -1,19 +1,18 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: agentify-core
3
- Version: 0.1.4
3
+ Version: 0.3.0
4
4
  Summary: Framework-agnostic AI agent library for building single and multi-agent systems
5
- Author-email: Fabian M <fabian@example.com>
5
+ Author-email: Fabian M <fabianmp_98@hotmail.com>
6
6
  License: MIT
7
7
  Project-URL: Homepage, https://github.com/fa8i/Agentify
8
8
  Project-URL: Repository, https://github.com/fa8i/Agentify
9
9
  Project-URL: Bug Tracker, https://github.com/fa8i/Agentify/issues
10
- Keywords: agent,multi-agent,ai,llm,openai,framework
10
+ Keywords: agentify,agentify-core,agent,multi-agent,ai,llm,openai,framework
11
11
  Classifier: Development Status :: 3 - Alpha
12
12
  Classifier: Intended Audience :: Developers
13
13
  Classifier: License :: OSI Approved :: MIT License
14
14
  Classifier: Operating System :: OS Independent
15
15
  Classifier: Programming Language :: Python :: 3
16
- Classifier: Programming Language :: Python :: 3.9
17
16
  Classifier: Programming Language :: Python :: 3.10
18
17
  Classifier: Programming Language :: Python :: 3.11
19
18
  Classifier: Programming Language :: Python :: 3.12
@@ -22,19 +21,25 @@ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
22
21
  Requires-Python: >=3.10
23
22
  Description-Content-Type: text/markdown
24
23
  License-File: LICENSE
25
- Requires-Dist: openai>=1.0.0
26
- Requires-Dist: python-dotenv>=0.19.0
27
- Requires-Dist: Pillow>=9.0.0
24
+ Requires-Dist: openai
25
+ Requires-Dist: python-dotenv
26
+ Requires-Dist: Pillow
28
27
  Provides-Extra: redis
29
28
  Requires-Dist: redis>=4.0.0; extra == "redis"
29
+ Provides-Extra: elastic
30
+ Requires-Dist: elasticsearch>=8.0.0; extra == "elastic"
30
31
  Provides-Extra: tools
31
32
  Requires-Dist: requests>=2.25.0; extra == "tools"
33
+ Provides-Extra: mcp
34
+ Requires-Dist: mcp; extra == "mcp"
32
35
  Provides-Extra: ui
33
36
  Requires-Dist: gradio==5.49.1; extra == "ui"
34
37
  Provides-Extra: all
35
38
  Requires-Dist: redis>=4.0.0; extra == "all"
39
+ Requires-Dist: elasticsearch>=8.0.0; extra == "all"
36
40
  Requires-Dist: requests>=2.25.0; extra == "all"
37
41
  Requires-Dist: gradio==5.49.1; extra == "all"
42
+ Requires-Dist: mcp; extra == "all"
38
43
  Provides-Extra: dev
39
44
  Requires-Dist: pytest>=7.0.0; extra == "dev"
40
45
  Requires-Dist: pytest-cov>=4.0.0; extra == "dev"
@@ -47,6 +52,7 @@ Dynamic: license-file
47
52
 
48
53
  # Agentify
49
54
 
55
+
50
56
  **Independent AI agent library based on the OpenAI SDK**
51
57
 
52
58
  Agentify is a Python library for building and orchestrating AI agents, from simple assistants to complex multi-agent systems. It targets the OpenAI-compatible Chat Completions interface, enabling support for multiple providers through a configurable `base_url` (OpenAI, Azure OpenAI, DeepSeek, Gemini, etc.). Agentify offers a streamlined, independent set of primitives for memory, tools, and coordination so you can focus on product logic without being tied to heavy frameworks.
@@ -72,7 +78,7 @@ Agentify is a Python library for building and orchestrating AI agents, from simp
72
78
  "Chain of Thought" in conversation history, and log reasoning steps in real-time for visibility.
73
79
 
74
80
  - **Tools and actions**
75
- Type-annotated tool interface, straightforward registration of custom tools.
81
+ Simple `@tool` decorator for creating tools from functions with automatic JSON Schema generation, or type-annotated tool interface for custom implementations.
76
82
 
77
83
  - **Observability hooks**
78
84
  Callback system for logging, monitoring and debugging agent behaviour across complex flows.
@@ -80,6 +86,9 @@ Agentify is a Python library for building and orchestrating AI agents, from simp
80
86
  - **I/O capabilities**
81
87
  Streaming support for real-time responses and vision/image models for multimodal interactions.
82
88
 
89
+ - **Async & Parallel Execution**
90
+ Built-in `async/await` support (`arun()`) for all agents and flows. Automatically executes independent tool calls in parallel (e.g., fetching data from 3 APIs simultaneously), significantly reducing latency.
91
+
83
92
 
84
93
  ## Installation
85
94
 
@@ -95,29 +104,37 @@ pip install agentify-core[all] # Installs all optional dependencies
95
104
  ## Quick Start
96
105
 
97
106
  ```python
98
- from agentify import BaseAgent, AgentConfig, MemoryService, MemoryAddress
107
+ from agentify import BaseAgent, AgentConfig, MemoryService, MemoryAddress, tool
99
108
  from agentify.memory.stores import InMemoryStore
100
109
 
101
- # 1. Create memory service
110
+ # 1. Create a simple tool with @tool decorator
111
+ @tool
112
+ def get_time() -> dict:
113
+ """Returns the current time."""
114
+ from datetime import datetime
115
+ return {"time": datetime.now().strftime("%H:%M:%S")}
116
+
117
+ # 2. Create memory service
102
118
  memory = MemoryService(store=InMemoryStore(), log_enabled=True, max_log_length=100)
103
119
  addr = MemoryAddress(conversation_id="session_1")
104
120
 
105
- # 2. Create an Agent
121
+ # 3. Create an Agent with the tool
106
122
  agent = BaseAgent(
107
123
  config=AgentConfig(
108
124
  name="ReasoningAgent",
109
125
  system_prompt="You are a helpful assistant.",
110
- provider="openai",
111
- model_name="gpt-5",
126
+ provider="provider",
127
+ model_name="model",
112
128
  reasoning_effort="high", # optional param:"low", "medium", "high"
113
129
  model_kwargs={"max_completion_tokens": 5000} # Pass model-specific params
114
130
  ),
115
131
  memory=memory,
116
- memory_address=addr
132
+ memory_address=addr,
133
+ tools=[get_time] # Add your tools here
117
134
  )
118
135
 
119
- # 3. Run a conversation
120
- response = agent.run(user_input="Hello! How can you help me?")
136
+ # 4. Run a conversation
137
+ response = agent.run(user_input="What time is it?")
121
138
  ```
122
139
 
123
140
  ## Composable Flows
@@ -0,0 +1,108 @@
1
+ # Agentify
2
+
3
+ [![PyPI version](https://img.shields.io/pypi/v/agentify-core?color=orange)](https://pypi.org/project/agentify-core/)
4
+ [![Downloads](https://img.shields.io/pepy/dt/agentify-core)](https://pepy.tech/project/agentify-core)
5
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
6
+ [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/agentify-core)](https://pypi.org/project/agentify-core/)
7
+
8
+ **Independent AI agent library based on the OpenAI SDK**
9
+
10
+ Agentify is a Python library for building AI agents and multi-agent systems. Built on the OpenAI-compatible Chat Completions interface, it supports multiple providers (OpenAI, Azure, DeepSeek, Gemini, Claude) with clear abstractions for memory, tools, and orchestration—no heavy framework lock-in.
11
+
12
+
13
+ ## Key Features
14
+
15
+ - **Multi-agent orchestration**: Teams, pipelines, hierarchies, and dynamic sub-agent spawning
16
+ - **Memory service**: Pluggable backends (in-memory, SQLite, Redis, Elasticsearch) with policies (TTL, limits, token budgets)
17
+ - **Tools**: `@tool` decorator for auto-schema generation, or custom tool classes. Built-in file I/O, planning, weather, and more
18
+ - **MCP Integration**: Easy connection to MCP servers via StdIO (local) or SSE/HTTP (remote) to use external tools
19
+ - **Reasoning models**: Configure thinking depth, store chain-of-thought, real-time reasoning logs
20
+ - **Async & parallel**: `arun()` support with automatic parallel tool and agent execution
21
+ - **Observability**: Callback system for monitoring and debugging
22
+ - **Advanced capabilities**: Dynamic workflows, file/directory operations, complex state management
23
+
24
+
25
+ ## Installation
26
+
27
+ ```bash
28
+ pip install agentify-core
29
+ ```
30
+
31
+ For optional features:
32
+ ```bash
33
+ pip install agentify-core[all] # Installs all optional dependencies
34
+ ```
35
+
36
+ ## Quick Start
37
+
38
+ ```python
39
+ from agentify import BaseAgent, AgentConfig, MemoryService, MemoryAddress, tool
40
+ from agentify.memory.stores import InMemoryStore
41
+
42
+ # 1. Create a simple tool with @tool decorator
43
+ @tool
44
+ def get_time() -> dict:
45
+ """Returns the current time."""
46
+ from datetime import datetime
47
+ return {"time": datetime.now().strftime("%H:%M:%S")}
48
+
49
+ # 2. Create memory service
50
+ memory = MemoryService(store=InMemoryStore(), log_enabled=True, max_log_length=100)
51
+ addr = MemoryAddress(conversation_id="session_1")
52
+
53
+ # 3. Create an Agent with the tool
54
+ agent = BaseAgent(
55
+ config=AgentConfig(
56
+ name="ReasoningAgent",
57
+ system_prompt="You are a helpful assistant.",
58
+ provider="provider",
59
+ model_name="model",
60
+ reasoning_effort="high", # optional param:"low", "medium", "high"
61
+ model_kwargs={"max_completion_tokens": 5000} # Pass model-specific params
62
+ ),
63
+ memory=memory,
64
+ memory_address=addr,
65
+ tools=[get_time] # Add your tools here
66
+ )
67
+
68
+ # 4. Run a conversation
69
+ response = agent.run(user_input="What time is it?")
70
+ ```
71
+
72
+ ## Composable Flows
73
+
74
+ Agentify provides powerful primitives that can be combined to build arbitrarily complex systems:
75
+
76
+ * **BaseAgent**: The fundamental unit of work.
77
+ * **Teams**: A group of agents managed by a supervisor.
78
+ * **Pipelines**: A sequence of steps where output passes from one to the next.
79
+ * **Hierarchies**: Tree structures for massive delegation.
80
+
81
+ Because all flows share the same `run()` interface, you can build Teams made of Pipelines, Pipelines made of Teams, and deeply nested Hierarchies.
82
+
83
+ Agentify supports both **strict workflows** (fixed, pre-defined Pipelines and Hierarchies) and **dynamic agentic flows**, where a supervisor/router agent decides at runtime which agent, Team or Pipeline to call next.
84
+
85
+
86
+ ## Documentation
87
+
88
+ - [Getting Started](docs/getting_started.md) - Installation and first steps
89
+ - [Core Concepts](docs/core_concepts.md) - Agents, memory, and tools
90
+ - [Multi-Agent Systems](docs/multi_agent.md) - Teams, pipelines, and hierarchies
91
+ - [Advanced Features](docs/advanced.md) - Vision, streaming, hooks, and more
92
+ - [API Reference](docs/api_reference.md) - Complete API documentation
93
+
94
+
95
+ ### More Examples
96
+
97
+ Check out the [examples](examples/) directory for detailed implementations:
98
+
99
+ * [Single Agent Chatbot](examples/chatbot/)
100
+ * [Multi-Agent Teams](examples/multi_agent/team/)
101
+ * [Sequential Pipelines](examples/multi_agent/pipeline/)
102
+ * [Hierarchical Structures](examples/multi_agent/hierarchical/)
103
+
104
+
105
+ ## Author
106
+
107
+ - **Fabian Melchor** [fabianmp_98@hotmail.com](mailto:fabianmp_98@hotmail.com)
108
+
@@ -1,5 +1,6 @@
1
1
  # Agentify
2
2
 
3
+
3
4
  **Independent AI agent library based on the OpenAI SDK**
4
5
 
5
6
  Agentify is a Python library for building and orchestrating AI agents, from simple assistants to complex multi-agent systems. It targets the OpenAI-compatible Chat Completions interface, enabling support for multiple providers through a configurable `base_url` (OpenAI, Azure OpenAI, DeepSeek, Gemini, etc.). Agentify offers a streamlined, independent set of primitives for memory, tools, and coordination so you can focus on product logic without being tied to heavy frameworks.
@@ -25,7 +26,7 @@ Agentify is a Python library for building and orchestrating AI agents, from simp
25
26
  "Chain of Thought" in conversation history, and log reasoning steps in real-time for visibility.
26
27
 
27
28
  - **Tools and actions**
28
- Type-annotated tool interface, straightforward registration of custom tools.
29
+ Simple `@tool` decorator for creating tools from functions with automatic JSON Schema generation, or type-annotated tool interface for custom implementations.
29
30
 
30
31
  - **Observability hooks**
31
32
  Callback system for logging, monitoring and debugging agent behaviour across complex flows.
@@ -33,6 +34,9 @@ Agentify is a Python library for building and orchestrating AI agents, from simp
33
34
  - **I/O capabilities**
34
35
  Streaming support for real-time responses and vision/image models for multimodal interactions.
35
36
 
37
+ - **Async & Parallel Execution**
38
+ Built-in `async/await` support (`arun()`) for all agents and flows. Automatically executes independent tool calls in parallel (e.g., fetching data from 3 APIs simultaneously), significantly reducing latency.
39
+
36
40
 
37
41
  ## Installation
38
42
 
@@ -48,29 +52,37 @@ pip install agentify-core[all] # Installs all optional dependencies
48
52
  ## Quick Start
49
53
 
50
54
  ```python
51
- from agentify import BaseAgent, AgentConfig, MemoryService, MemoryAddress
55
+ from agentify import BaseAgent, AgentConfig, MemoryService, MemoryAddress, tool
52
56
  from agentify.memory.stores import InMemoryStore
53
57
 
54
- # 1. Create memory service
58
+ # 1. Create a simple tool with @tool decorator
59
+ @tool
60
+ def get_time() -> dict:
61
+ """Returns the current time."""
62
+ from datetime import datetime
63
+ return {"time": datetime.now().strftime("%H:%M:%S")}
64
+
65
+ # 2. Create memory service
55
66
  memory = MemoryService(store=InMemoryStore(), log_enabled=True, max_log_length=100)
56
67
  addr = MemoryAddress(conversation_id="session_1")
57
68
 
58
- # 2. Create an Agent
69
+ # 3. Create an Agent with the tool
59
70
  agent = BaseAgent(
60
71
  config=AgentConfig(
61
72
  name="ReasoningAgent",
62
73
  system_prompt="You are a helpful assistant.",
63
- provider="openai",
64
- model_name="gpt-5",
74
+ provider="provider",
75
+ model_name="model",
65
76
  reasoning_effort="high", # optional param:"low", "medium", "high"
66
77
  model_kwargs={"max_completion_tokens": 5000} # Pass model-specific params
67
78
  ),
68
79
  memory=memory,
69
- memory_address=addr
80
+ memory_address=addr,
81
+ tools=[get_time] # Add your tools here
70
82
  )
71
83
 
72
- # 3. Run a conversation
73
- response = agent.run(user_input="Hello! How can you help me?")
84
+ # 4. Run a conversation
85
+ response = agent.run(user_input="What time is it?")
74
86
  ```
75
87
 
76
88
  ## Composable Flows
@@ -101,4 +113,4 @@ MIT License - see the repository for details.
101
113
 
102
114
  ## Author
103
115
 
104
- **Fabian Melchor** - [fabianmp_98@hotmail.com](mailto:fabianmp_98@hotmail.com)
116
+ **Fabian Melchor** - [fabianmp_98@hotmail.com](mailto:fabianmp_98@hotmail.com)
@@ -1,32 +1,26 @@
1
1
  # Core exports
2
- from agentify.core import (
3
- BaseAgent,
4
- Tool,
5
- AgentConfig,
6
- ImageConfig,
7
- AgentCallbackHandler,
8
- LoggingCallbackHandler,
9
- )
2
+ from agentify.core.agent import BaseAgent
3
+ from agentify.core.config import AgentConfig, ImageConfig
4
+ from agentify.core.tool import Tool, tool
10
5
 
11
6
  # LLM exports
12
- from agentify.llm import LLMClientFactory
7
+ from agentify.llm.client import LLMClientFactory
13
8
 
14
9
  # Memory exports
15
10
  from agentify.memory.service import MemoryService
16
11
  from agentify.memory.interfaces import MemoryAddress
17
12
  from agentify.memory.policies import MemoryPolicy
18
13
 
19
- __version__ = "0.1.3"
14
+ __version__ = "0.3.0"
20
15
 
21
16
  __all__ = [
22
17
  "BaseAgent",
23
- "Tool",
24
18
  "AgentConfig",
25
- "ImageConfig",
26
- "AgentCallbackHandler",
27
- "LoggingCallbackHandler",
19
+ "Tool",
20
+ "tool",
28
21
  "LLMClientFactory",
29
22
  "MemoryService",
30
23
  "MemoryAddress",
31
24
  "MemoryPolicy",
25
+ "ImageConfig",
32
26
  ]
@@ -1,11 +1,14 @@
1
+ """Core components for building AI agents."""
2
+
1
3
  from agentify.core.agent import BaseAgent
2
- from agentify.core.tool import Tool
4
+ from agentify.core.tool import Tool, tool
3
5
  from agentify.core.callbacks import AgentCallbackHandler, LoggingCallbackHandler
4
6
  from agentify.core.config import AgentConfig, ImageConfig
5
7
 
6
8
  __all__ = [
7
9
  "BaseAgent",
8
10
  "Tool",
11
+ "tool",
9
12
  "AgentCallbackHandler",
10
13
  "LoggingCallbackHandler",
11
14
  "AgentConfig",