agentfield 0.1.33rc1__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 (49) hide show
  1. agentfield-0.1.33rc1/MANIFEST.in +9 -0
  2. agentfield-0.1.33rc1/PKG-INFO +103 -0
  3. agentfield-0.1.33rc1/README.md +58 -0
  4. agentfield-0.1.33rc1/agentfield/__init__.py +81 -0
  5. agentfield-0.1.33rc1/agentfield/agent.py +3981 -0
  6. agentfield-0.1.33rc1/agentfield/agent_ai.py +1487 -0
  7. agentfield-0.1.33rc1/agentfield/agent_cli.py +386 -0
  8. agentfield-0.1.33rc1/agentfield/agent_field_handler.py +494 -0
  9. agentfield-0.1.33rc1/agentfield/agent_mcp.py +534 -0
  10. agentfield-0.1.33rc1/agentfield/agent_registry.py +29 -0
  11. agentfield-0.1.33rc1/agentfield/agent_server.py +1185 -0
  12. agentfield-0.1.33rc1/agentfield/agent_utils.py +269 -0
  13. agentfield-0.1.33rc1/agentfield/agent_workflow.py +323 -0
  14. agentfield-0.1.33rc1/agentfield/async_config.py +278 -0
  15. agentfield-0.1.33rc1/agentfield/async_execution_manager.py +1235 -0
  16. agentfield-0.1.33rc1/agentfield/client.py +1467 -0
  17. agentfield-0.1.33rc1/agentfield/connection_manager.py +280 -0
  18. agentfield-0.1.33rc1/agentfield/decorators.py +527 -0
  19. agentfield-0.1.33rc1/agentfield/did_manager.py +337 -0
  20. agentfield-0.1.33rc1/agentfield/dynamic_skills.py +304 -0
  21. agentfield-0.1.33rc1/agentfield/execution_context.py +255 -0
  22. agentfield-0.1.33rc1/agentfield/execution_state.py +465 -0
  23. agentfield-0.1.33rc1/agentfield/http_connection_manager.py +429 -0
  24. agentfield-0.1.33rc1/agentfield/litellm_adapters.py +140 -0
  25. agentfield-0.1.33rc1/agentfield/logger.py +249 -0
  26. agentfield-0.1.33rc1/agentfield/mcp_client.py +204 -0
  27. agentfield-0.1.33rc1/agentfield/mcp_manager.py +340 -0
  28. agentfield-0.1.33rc1/agentfield/mcp_stdio_bridge.py +550 -0
  29. agentfield-0.1.33rc1/agentfield/media_providers.py +825 -0
  30. agentfield-0.1.33rc1/agentfield/memory.py +723 -0
  31. agentfield-0.1.33rc1/agentfield/memory_events.py +489 -0
  32. agentfield-0.1.33rc1/agentfield/multimodal.py +173 -0
  33. agentfield-0.1.33rc1/agentfield/multimodal_response.py +521 -0
  34. agentfield-0.1.33rc1/agentfield/pydantic_utils.py +227 -0
  35. agentfield-0.1.33rc1/agentfield/rate_limiter.py +280 -0
  36. agentfield-0.1.33rc1/agentfield/result_cache.py +441 -0
  37. agentfield-0.1.33rc1/agentfield/router.py +219 -0
  38. agentfield-0.1.33rc1/agentfield/status.py +70 -0
  39. agentfield-0.1.33rc1/agentfield/types.py +728 -0
  40. agentfield-0.1.33rc1/agentfield/utils.py +26 -0
  41. agentfield-0.1.33rc1/agentfield/vc_generator.py +464 -0
  42. agentfield-0.1.33rc1/agentfield/vision.py +198 -0
  43. agentfield-0.1.33rc1/agentfield.egg-info/PKG-INFO +103 -0
  44. agentfield-0.1.33rc1/agentfield.egg-info/SOURCES.txt +47 -0
  45. agentfield-0.1.33rc1/agentfield.egg-info/dependency_links.txt +1 -0
  46. agentfield-0.1.33rc1/agentfield.egg-info/requires.txt +21 -0
  47. agentfield-0.1.33rc1/agentfield.egg-info/top_level.txt +1 -0
  48. agentfield-0.1.33rc1/pyproject.toml +92 -0
  49. agentfield-0.1.33rc1/setup.cfg +4 -0
@@ -0,0 +1,9 @@
1
+ include README.md
2
+ include LICENSE
3
+ include requirements.txt
4
+ recursive-include agentfield *.py
5
+ exclude examples/*
6
+ exclude tests/*
7
+ global-exclude *.pyc
8
+ global-exclude __pycache__
9
+ global-exclude .DS_Store
@@ -0,0 +1,103 @@
1
+ Metadata-Version: 2.4
2
+ Name: agentfield
3
+ Version: 0.1.33rc1
4
+ Summary: Python SDK for the AgentField control plane
5
+ Author: AgentField Maintainers
6
+ License: Apache-2.0
7
+ Project-URL: Homepage, https://github.com/Agent-Field/agentfield
8
+ Project-URL: Documentation, https://github.com/Agent-Field/agentfield/tree/main/docs
9
+ Project-URL: Issues, https://github.com/Agent-Field/agentfield/issues
10
+ Keywords: agentfield,sdk,agents
11
+ Classifier: Development Status :: 4 - Beta
12
+ Classifier: Intended Audience :: Developers
13
+ Classifier: License :: OSI Approved :: Apache Software License
14
+ Classifier: Operating System :: OS Independent
15
+ Classifier: Programming Language :: Python :: 3 :: Only
16
+ Classifier: Programming Language :: Python :: 3.8
17
+ Classifier: Programming Language :: Python :: 3.9
18
+ Classifier: Programming Language :: Python :: 3.10
19
+ Classifier: Programming Language :: Python :: 3.11
20
+ Classifier: Programming Language :: Python :: 3.12
21
+ Classifier: Programming Language :: Python :: 3.13
22
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
23
+ Requires-Python: <3.14,>=3.8
24
+ Description-Content-Type: text/markdown
25
+ Requires-Dist: fastapi
26
+ Requires-Dist: uvicorn
27
+ Requires-Dist: requests>=2.28
28
+ Requires-Dist: pydantic>=2.0
29
+ Requires-Dist: litellm
30
+ Requires-Dist: psutil
31
+ Requires-Dist: PyYAML>=6.0
32
+ Requires-Dist: aiohttp>=3.8
33
+ Requires-Dist: websockets
34
+ Requires-Dist: fal-client>=0.5.0
35
+ Provides-Extra: dev
36
+ Requires-Dist: pytest<9,>=7.4; extra == "dev"
37
+ Requires-Dist: pytest-asyncio<0.24,>=0.21; extra == "dev"
38
+ Requires-Dist: pytest-cov<5,>=4.1; extra == "dev"
39
+ Requires-Dist: responses<0.26,>=0.23; extra == "dev"
40
+ Requires-Dist: respx<0.22,>=0.20; extra == "dev"
41
+ Requires-Dist: freezegun<2,>=1.2; extra == "dev"
42
+ Requires-Dist: syrupy<5,>=4; extra == "dev"
43
+ Requires-Dist: hypothesis<7,>=6.88; extra == "dev"
44
+ Requires-Dist: pytest-socket<0.8,>=0.6; extra == "dev"
45
+
46
+ # AgentField Python SDK
47
+
48
+ The AgentField SDK provides a production-ready Python interface for registering agents, executing workflows, and integrating with the AgentField control plane.
49
+
50
+ ## Installation
51
+
52
+ ```bash
53
+ pip install agentfield
54
+ ```
55
+
56
+ To work on the SDK locally:
57
+
58
+ ```bash
59
+ git clone https://github.com/Agent-Field/agentfield.git
60
+ cd agentfield/sdk/python
61
+ python -m pip install -e .[dev]
62
+ ```
63
+
64
+ ## Quick Start
65
+
66
+ ```python
67
+ from agentfield import Agent
68
+
69
+ agent = Agent(
70
+ node_id="example-agent",
71
+ agentfield_server="http://localhost:8080",
72
+ dev_mode=True,
73
+ )
74
+
75
+ @agent.reasoner()
76
+ async def summarize(text: str) -> dict:
77
+ result = await agent.ai(
78
+ prompt=f"Summarize: {text}",
79
+ response_model={"summary": "string", "tone": "string"},
80
+ )
81
+ return result
82
+
83
+ if __name__ == "__main__":
84
+ agent.serve(port=8001)
85
+ ```
86
+
87
+ See `docs/DEVELOPMENT.md` for instructions on wiring agents to the control plane.
88
+
89
+ ## Testing
90
+
91
+ ```bash
92
+ pytest
93
+ ```
94
+
95
+ To run coverage locally:
96
+
97
+ ```bash
98
+ pytest --cov=agentfield --cov-report=term-missing
99
+ ```
100
+
101
+ ## License
102
+
103
+ Distributed under the Apache 2.0 License. See the project root `LICENSE` for details.
@@ -0,0 +1,58 @@
1
+ # AgentField Python SDK
2
+
3
+ The AgentField SDK provides a production-ready Python interface for registering agents, executing workflows, and integrating with the AgentField control plane.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ pip install agentfield
9
+ ```
10
+
11
+ To work on the SDK locally:
12
+
13
+ ```bash
14
+ git clone https://github.com/Agent-Field/agentfield.git
15
+ cd agentfield/sdk/python
16
+ python -m pip install -e .[dev]
17
+ ```
18
+
19
+ ## Quick Start
20
+
21
+ ```python
22
+ from agentfield import Agent
23
+
24
+ agent = Agent(
25
+ node_id="example-agent",
26
+ agentfield_server="http://localhost:8080",
27
+ dev_mode=True,
28
+ )
29
+
30
+ @agent.reasoner()
31
+ async def summarize(text: str) -> dict:
32
+ result = await agent.ai(
33
+ prompt=f"Summarize: {text}",
34
+ response_model={"summary": "string", "tone": "string"},
35
+ )
36
+ return result
37
+
38
+ if __name__ == "__main__":
39
+ agent.serve(port=8001)
40
+ ```
41
+
42
+ See `docs/DEVELOPMENT.md` for instructions on wiring agents to the control plane.
43
+
44
+ ## Testing
45
+
46
+ ```bash
47
+ pytest
48
+ ```
49
+
50
+ To run coverage locally:
51
+
52
+ ```bash
53
+ pytest --cov=agentfield --cov-report=term-missing
54
+ ```
55
+
56
+ ## License
57
+
58
+ Distributed under the Apache 2.0 License. See the project root `LICENSE` for details.
@@ -0,0 +1,81 @@
1
+ from .agent import Agent
2
+ from .router import AgentRouter
3
+ from .types import (
4
+ AIConfig,
5
+ CompactDiscoveryResponse,
6
+ DiscoveryResponse,
7
+ DiscoveryResult,
8
+ MemoryConfig,
9
+ ReasonerDefinition,
10
+ SkillDefinition,
11
+ )
12
+ from .multimodal import (
13
+ Text,
14
+ Image,
15
+ Audio,
16
+ File,
17
+ MultimodalContent,
18
+ text,
19
+ image_from_file,
20
+ image_from_url,
21
+ audio_from_file,
22
+ audio_from_url,
23
+ file_from_path,
24
+ file_from_url,
25
+ )
26
+ from .multimodal_response import (
27
+ MultimodalResponse,
28
+ AudioOutput,
29
+ ImageOutput,
30
+ FileOutput,
31
+ detect_multimodal_response,
32
+ )
33
+ from .media_providers import (
34
+ MediaProvider,
35
+ FalProvider,
36
+ LiteLLMProvider,
37
+ OpenRouterProvider,
38
+ get_provider,
39
+ register_provider,
40
+ )
41
+
42
+ __all__ = [
43
+ "Agent",
44
+ "AIConfig",
45
+ "MemoryConfig",
46
+ "ReasonerDefinition",
47
+ "SkillDefinition",
48
+ "DiscoveryResponse",
49
+ "CompactDiscoveryResponse",
50
+ "DiscoveryResult",
51
+ "AgentRouter",
52
+ # Input multimodal classes
53
+ "Text",
54
+ "Image",
55
+ "Audio",
56
+ "File",
57
+ "MultimodalContent",
58
+ # Convenience functions for input
59
+ "text",
60
+ "image_from_file",
61
+ "image_from_url",
62
+ "audio_from_file",
63
+ "audio_from_url",
64
+ "file_from_path",
65
+ "file_from_url",
66
+ # Output multimodal classes
67
+ "MultimodalResponse",
68
+ "AudioOutput",
69
+ "ImageOutput",
70
+ "FileOutput",
71
+ "detect_multimodal_response",
72
+ # Media providers
73
+ "MediaProvider",
74
+ "FalProvider",
75
+ "LiteLLMProvider",
76
+ "OpenRouterProvider",
77
+ "get_provider",
78
+ "register_provider",
79
+ ]
80
+
81
+ __version__ = "0.1.33-rc.1"