loom-agent 0.0.3__py3-none-any.whl → 0.0.5__py3-none-any.whl
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.
Potentially problematic release.
This version of loom-agent might be problematic. Click here for more details.
- loom/__init__.py +51 -0
- loom/api/__init__.py +19 -0
- loom/api/v0_0_3.py +300 -0
- loom/builtin/retriever/faiss_store.py +403 -0
- loom/core/agent_executor.py +212 -26
- loom/core/events.py +3 -0
- loom/core/recursion_control.py +298 -0
- loom/core/turn_state.py +58 -6
- loom/retrieval/__init__.py +61 -0
- loom/retrieval/domain_adapter.py +195 -0
- loom/retrieval/embedding_retriever.py +393 -0
- loom_agent-0.0.5.dist-info/METADATA +561 -0
- {loom_agent-0.0.3.dist-info → loom_agent-0.0.5.dist-info}/RECORD +15 -8
- loom_agent-0.0.3.dist-info/METADATA +0 -292
- {loom_agent-0.0.3.dist-info → loom_agent-0.0.5.dist-info}/WHEEL +0 -0
- {loom_agent-0.0.3.dist-info → loom_agent-0.0.5.dist-info}/licenses/LICENSE +0 -0
|
@@ -1,292 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: loom-agent
|
|
3
|
-
Version: 0.0.3
|
|
4
|
-
Summary: Production-ready Python Agent framework with enterprise-grade reliability and observability
|
|
5
|
-
License: MIT
|
|
6
|
-
License-File: LICENSE
|
|
7
|
-
Keywords: ai,llm,agent,multi-agent,rag,tooling,asyncio
|
|
8
|
-
Author: kongusen
|
|
9
|
-
Author-email: wanghaishan0210@gmail.com
|
|
10
|
-
Requires-Python: >=3.11,<4.0
|
|
11
|
-
Classifier: Development Status :: 3 - Alpha
|
|
12
|
-
Classifier: Framework :: AsyncIO
|
|
13
|
-
Classifier: Intended Audience :: Developers
|
|
14
|
-
Classifier: License :: OSI Approved :: MIT License
|
|
15
|
-
Classifier: Programming Language :: Python
|
|
16
|
-
Classifier: Programming Language :: Python :: 3
|
|
17
|
-
Classifier: Programming Language :: Python :: 3.11
|
|
18
|
-
Classifier: Programming Language :: Python :: 3.12
|
|
19
|
-
Classifier: Programming Language :: Python :: 3.13
|
|
20
|
-
Classifier: Programming Language :: Python :: 3.14
|
|
21
|
-
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
22
|
-
Classifier: Topic :: Software Development :: Libraries
|
|
23
|
-
Classifier: Typing :: Typed
|
|
24
|
-
Provides-Extra: all
|
|
25
|
-
Provides-Extra: anthropic
|
|
26
|
-
Provides-Extra: mcp
|
|
27
|
-
Provides-Extra: observability
|
|
28
|
-
Provides-Extra: openai
|
|
29
|
-
Provides-Extra: retrieval
|
|
30
|
-
Provides-Extra: system
|
|
31
|
-
Provides-Extra: web
|
|
32
|
-
Requires-Dist: anthropic (>=0.7.0,<0.8.0) ; extra == "anthropic" or extra == "all"
|
|
33
|
-
Requires-Dist: asyncio-throttle (>=1.0.2,<2.0.0) ; extra == "all"
|
|
34
|
-
Requires-Dist: cachetools (>=5.3.0,<6.0.0) ; extra == "observability" or extra == "all"
|
|
35
|
-
Requires-Dist: chromadb (>=0.4.0,<0.5.0) ; extra == "retrieval" or extra == "all"
|
|
36
|
-
Requires-Dist: docker (>=7.0.0,<8.0.0) ; extra == "system" or extra == "all"
|
|
37
|
-
Requires-Dist: fastapi (>=0.104.0,<0.105.0) ; extra == "web" or extra == "all"
|
|
38
|
-
Requires-Dist: mcp (>=0.2.0,<0.3.0) ; extra == "mcp" or extra == "all"
|
|
39
|
-
Requires-Dist: numpy (>=1.24.0,<2.0.0) ; extra == "retrieval" or extra == "all"
|
|
40
|
-
Requires-Dist: openai (>=1.6.0,<2.0.0) ; extra == "openai" or extra == "all"
|
|
41
|
-
Requires-Dist: pinecone-client (>=2.2,<4.0) ; extra == "retrieval" or extra == "all"
|
|
42
|
-
Requires-Dist: psutil (>=5.9.0,<6.0.0) ; extra == "system" or extra == "all"
|
|
43
|
-
Requires-Dist: pydantic (>=2.5.0,<3.0.0)
|
|
44
|
-
Requires-Dist: structlog (>=23.2.0,<24.0.0) ; extra == "observability" or extra == "all"
|
|
45
|
-
Requires-Dist: uvicorn[standard] (>=0.24.0,<0.25.0) ; extra == "web" or extra == "all"
|
|
46
|
-
Requires-Dist: weakref-tools (>=1.0.0,<2.0.0) ; extra == "all"
|
|
47
|
-
Requires-Dist: websockets (>=12.0,<13.0) ; extra == "web" or extra == "all"
|
|
48
|
-
Project-URL: Documentation, https://github.com/kongusen/loom-agent#readme
|
|
49
|
-
Project-URL: Homepage, https://github.com/kongusen/loom-agent
|
|
50
|
-
Project-URL: Repository, https://github.com/kongusen/loom-agent
|
|
51
|
-
Description-Content-Type: text/markdown
|
|
52
|
-
|
|
53
|
-
# Loom Agent
|
|
54
|
-
|
|
55
|
-
<div align="center">
|
|
56
|
-
|
|
57
|
-
**Production-ready Python Agent framework with enterprise-grade reliability and observability**
|
|
58
|
-
|
|
59
|
-
[](https://pypi.org/project/loom-agent/)
|
|
60
|
-
[](https://www.python.org/downloads/)
|
|
61
|
-
[](https://opensource.org/licenses/MIT)
|
|
62
|
-
[](tests/)
|
|
63
|
-
|
|
64
|
-
[Documentation](docs/user/user-guide.md) | [API Reference](docs/user/api-reference.md) | [Contributing](CONTRIBUTING.md)
|
|
65
|
-
|
|
66
|
-
</div>
|
|
67
|
-
|
|
68
|
-
---
|
|
69
|
-
|
|
70
|
-
## 🎯 What is Loom Agent?
|
|
71
|
-
|
|
72
|
-
Loom Agent is a Python framework for building reliable AI agents with production-grade features like automatic retries, context compression, persistent memory, and comprehensive observability.
|
|
73
|
-
|
|
74
|
-
**Key Features:**
|
|
75
|
-
|
|
76
|
-
- 🚀 **Simple API** - Get started with just 3 lines of code
|
|
77
|
-
- 🔧 **Tool System** - Easy decorator-based tool creation
|
|
78
|
-
- 💾 **Persistent Memory** - Cross-session conversation history
|
|
79
|
-
- 📊 **Observability** - Structured logging with correlation IDs
|
|
80
|
-
- 🛡️ **Production Ready** - Circuit breakers, retries, and failover
|
|
81
|
-
- ⚡ **High Performance** - Parallel tool execution and smart context compression (40% faster in v0.0.3)
|
|
82
|
-
- 🌐 **Multi-LLM** - OpenAI, Anthropic, and more
|
|
83
|
-
- 🎯 **Unified Coordination** - Advanced multi-agent coordination system
|
|
84
|
-
- 🔄 **TT Recursive Mode** - Enhanced task handling with improved recursion
|
|
85
|
-
|
|
86
|
-
## 📦 Installation
|
|
87
|
-
|
|
88
|
-
```bash
|
|
89
|
-
# Basic installation
|
|
90
|
-
pip install loom-agent
|
|
91
|
-
|
|
92
|
-
# With OpenAI support
|
|
93
|
-
pip install loom-agent[openai]
|
|
94
|
-
|
|
95
|
-
# With all features
|
|
96
|
-
pip install loom-agent[all]
|
|
97
|
-
```
|
|
98
|
-
|
|
99
|
-
**Requirements:** Python 3.11+
|
|
100
|
-
|
|
101
|
-
## 🚀 Quick Start
|
|
102
|
-
|
|
103
|
-
### Basic Agent
|
|
104
|
-
|
|
105
|
-
```python
|
|
106
|
-
import asyncio
|
|
107
|
-
from loom import agent
|
|
108
|
-
from loom.builtin.llms import MockLLM
|
|
109
|
-
|
|
110
|
-
async def main():
|
|
111
|
-
# Create an agent
|
|
112
|
-
my_agent = agent(llm=MockLLM())
|
|
113
|
-
|
|
114
|
-
# Run it
|
|
115
|
-
result = await my_agent.run("Hello, world!")
|
|
116
|
-
print(result)
|
|
117
|
-
|
|
118
|
-
asyncio.run(main())
|
|
119
|
-
```
|
|
120
|
-
|
|
121
|
-
### With OpenAI
|
|
122
|
-
|
|
123
|
-
```python
|
|
124
|
-
from loom import agent
|
|
125
|
-
|
|
126
|
-
# Create agent with OpenAI
|
|
127
|
-
my_agent = agent(
|
|
128
|
-
provider="openai",
|
|
129
|
-
model="gpt-4",
|
|
130
|
-
api_key="sk-..." # or set OPENAI_API_KEY env var
|
|
131
|
-
)
|
|
132
|
-
|
|
133
|
-
result = await my_agent.run("What is the capital of France?")
|
|
134
|
-
print(result)
|
|
135
|
-
```
|
|
136
|
-
|
|
137
|
-
### Custom Tools
|
|
138
|
-
|
|
139
|
-
```python
|
|
140
|
-
from loom import agent, tool
|
|
141
|
-
|
|
142
|
-
@tool()
|
|
143
|
-
def add(a: int, b: int) -> int:
|
|
144
|
-
"""Add two numbers together"""
|
|
145
|
-
return a + b
|
|
146
|
-
|
|
147
|
-
my_agent = agent(
|
|
148
|
-
provider="openai",
|
|
149
|
-
model="gpt-4",
|
|
150
|
-
tools=[add()]
|
|
151
|
-
)
|
|
152
|
-
|
|
153
|
-
result = await my_agent.run("What is 15 plus 27?")
|
|
154
|
-
print(result)
|
|
155
|
-
```
|
|
156
|
-
|
|
157
|
-
## 📚 Documentation
|
|
158
|
-
|
|
159
|
-
- **[Getting Started](docs/user/getting-started.md)** - Your first Loom agent in 5 minutes
|
|
160
|
-
- **[User Guide](docs/user/user-guide.md)** - Complete usage documentation
|
|
161
|
-
- **[API Reference](docs/user/api-reference.md)** - Detailed API documentation
|
|
162
|
-
- **[Contributing Guide](CONTRIBUTING.md)** - How to contribute
|
|
163
|
-
|
|
164
|
-
## 🛠️ Core Components
|
|
165
|
-
|
|
166
|
-
### Agent Builder
|
|
167
|
-
```python
|
|
168
|
-
from loom import agent
|
|
169
|
-
|
|
170
|
-
my_agent = agent(
|
|
171
|
-
provider="openai", # LLM provider
|
|
172
|
-
model="gpt-4", # Model name
|
|
173
|
-
tools=[...], # Custom tools
|
|
174
|
-
memory=..., # Memory system
|
|
175
|
-
callbacks=[...] # Observability
|
|
176
|
-
)
|
|
177
|
-
```
|
|
178
|
-
|
|
179
|
-
### Tool Decorator
|
|
180
|
-
```python
|
|
181
|
-
from loom import tool
|
|
182
|
-
|
|
183
|
-
@tool(description="Fetch weather data")
|
|
184
|
-
def get_weather(city: str) -> dict:
|
|
185
|
-
return {"temp": 72, "condition": "sunny"}
|
|
186
|
-
```
|
|
187
|
-
|
|
188
|
-
### Memory System
|
|
189
|
-
```python
|
|
190
|
-
from loom import PersistentMemory
|
|
191
|
-
|
|
192
|
-
memory = PersistentMemory() # Conversations persist across restarts
|
|
193
|
-
agent = agent(llm=..., memory=memory)
|
|
194
|
-
```
|
|
195
|
-
|
|
196
|
-
### Observability
|
|
197
|
-
```python
|
|
198
|
-
from loom import ObservabilityCallback, MetricsAggregator
|
|
199
|
-
|
|
200
|
-
obs = ObservabilityCallback()
|
|
201
|
-
metrics = MetricsAggregator()
|
|
202
|
-
|
|
203
|
-
agent = agent(llm=..., callbacks=[obs, metrics])
|
|
204
|
-
```
|
|
205
|
-
|
|
206
|
-
## 🎯 Supported Platforms
|
|
207
|
-
|
|
208
|
-
- **Python:** 3.11, 3.12
|
|
209
|
-
- **Operating Systems:** Linux, macOS, Windows
|
|
210
|
-
- **LLM Providers:** OpenAI, Anthropic, Ollama
|
|
211
|
-
|
|
212
|
-
## 🎊 What's New in v0.0.3
|
|
213
|
-
|
|
214
|
-
**Major Performance & Reliability Improvements:**
|
|
215
|
-
|
|
216
|
-
- ⚡ **40% Performance Boost** - Optimized execution pipeline and context management
|
|
217
|
-
- 🔧 **Unified Coordination System** - Advanced multi-agent coordination with improved reliability
|
|
218
|
-
- 🔄 **Enhanced TT Recursive Mode** - Better task handling and recursion management
|
|
219
|
-
- 🛡️ **Bug Fixes** - All known issues resolved, compilation passes cleanly
|
|
220
|
-
- 📚 **Improved Documentation** - Comprehensive guides and API references
|
|
221
|
-
|
|
222
|
-
**Production Ready Features:**
|
|
223
|
-
- ✅ Core agent execution (stable)
|
|
224
|
-
- ✅ Tool system and decorators (enhanced)
|
|
225
|
-
- ✅ Memory and context management (optimized)
|
|
226
|
-
- ✅ Multi-LLM provider support (OpenAI, Anthropic, Ollama)
|
|
227
|
-
- ✅ Structured logging and observability
|
|
228
|
-
- ✅ Circuit breakers and retry mechanisms
|
|
229
|
-
- ✅ Unified coordination for complex workflows
|
|
230
|
-
|
|
231
|
-
## 🤝 Contributing
|
|
232
|
-
|
|
233
|
-
We welcome contributions! Here's how to get started:
|
|
234
|
-
|
|
235
|
-
1. Fork the repository
|
|
236
|
-
2. Create a feature branch (`git checkout -b feature/amazing-feature`)
|
|
237
|
-
3. Make your changes and add tests
|
|
238
|
-
4. Run tests: `poetry run pytest`
|
|
239
|
-
5. Submit a pull request
|
|
240
|
-
|
|
241
|
-
See [CONTRIBUTING.md](CONTRIBUTING.md) for detailed guidelines.
|
|
242
|
-
|
|
243
|
-
## 📊 Project Status
|
|
244
|
-
|
|
245
|
-
- **Version:** 0.0.3 (Alpha)
|
|
246
|
-
- **Status:** Active Development
|
|
247
|
-
- **Tests:** 18/18 passing ✅
|
|
248
|
-
- **Python:** 3.11+ supported
|
|
249
|
-
- **Performance:** 40% improvement over v0.0.2
|
|
250
|
-
|
|
251
|
-
## 🗺️ Roadmap
|
|
252
|
-
|
|
253
|
-
### v0.1.0 (Planned)
|
|
254
|
-
- API stabilization
|
|
255
|
-
- More examples and tutorials
|
|
256
|
-
- Performance optimizations
|
|
257
|
-
- Extended documentation
|
|
258
|
-
|
|
259
|
-
### v0.2.0 (Planned)
|
|
260
|
-
- Additional LLM providers
|
|
261
|
-
- Plugin system
|
|
262
|
-
- Web UI for debugging
|
|
263
|
-
|
|
264
|
-
### v1.0.0 (Goal)
|
|
265
|
-
- Stable API
|
|
266
|
-
- Production-grade quality
|
|
267
|
-
- Comprehensive documentation
|
|
268
|
-
- Community ecosystem
|
|
269
|
-
|
|
270
|
-
## 📄 License
|
|
271
|
-
|
|
272
|
-
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
|
|
273
|
-
|
|
274
|
-
## 🔗 Links
|
|
275
|
-
|
|
276
|
-
- **PyPI:** https://pypi.org/project/loom-agent/
|
|
277
|
-
- **GitHub:** https://github.com/kongusen/loom-agent
|
|
278
|
-
- **Issues:** https://github.com/kongusen/loom-agent/issues
|
|
279
|
-
- **Releases:** [v0.0.3](releases/v0.0.3.md) | [v0.0.2](releases/v0.0.2.md) | [v0.0.1](releases/v0.0.1.md)
|
|
280
|
-
|
|
281
|
-
## 🙏 Acknowledgments
|
|
282
|
-
|
|
283
|
-
Special thanks to the Claude Code project for inspiration and to all early testers and contributors!
|
|
284
|
-
|
|
285
|
-
---
|
|
286
|
-
|
|
287
|
-
**Built with ❤️ for the AI community**
|
|
288
|
-
|
|
289
|
-
<div align="center">
|
|
290
|
-
<sub>If you find Loom Agent useful, please consider giving it a ⭐ on GitHub!</sub>
|
|
291
|
-
</div>
|
|
292
|
-
|
|
File without changes
|
|
File without changes
|