agentfield 0.1.6__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 (48) hide show
  1. agentfield-0.1.6/MANIFEST.in +9 -0
  2. agentfield-0.1.6/PKG-INFO +99 -0
  3. agentfield-0.1.6/README.md +58 -0
  4. agentfield-0.1.6/agentfield/__init__.py +55 -0
  5. agentfield-0.1.6/agentfield/agent.py +3403 -0
  6. agentfield-0.1.6/agentfield/agent_ai.py +1116 -0
  7. agentfield-0.1.6/agentfield/agent_cli.py +386 -0
  8. agentfield-0.1.6/agentfield/agent_field_handler.py +491 -0
  9. agentfield-0.1.6/agentfield/agent_mcp.py +534 -0
  10. agentfield-0.1.6/agentfield/agent_registry.py +29 -0
  11. agentfield-0.1.6/agentfield/agent_server.py +1191 -0
  12. agentfield-0.1.6/agentfield/agent_utils.py +269 -0
  13. agentfield-0.1.6/agentfield/agent_workflow.py +323 -0
  14. agentfield-0.1.6/agentfield/async_config.py +278 -0
  15. agentfield-0.1.6/agentfield/async_execution_manager.py +1176 -0
  16. agentfield-0.1.6/agentfield/client.py +1276 -0
  17. agentfield-0.1.6/agentfield/connection_manager.py +280 -0
  18. agentfield-0.1.6/agentfield/decorators.py +527 -0
  19. agentfield-0.1.6/agentfield/did_manager.py +322 -0
  20. agentfield-0.1.6/agentfield/dynamic_skills.py +304 -0
  21. agentfield-0.1.6/agentfield/execution_context.py +243 -0
  22. agentfield-0.1.6/agentfield/execution_state.py +453 -0
  23. agentfield-0.1.6/agentfield/http_connection_manager.py +429 -0
  24. agentfield-0.1.6/agentfield/litellm_adapters.py +141 -0
  25. agentfield-0.1.6/agentfield/logger.py +249 -0
  26. agentfield-0.1.6/agentfield/mcp_client.py +204 -0
  27. agentfield-0.1.6/agentfield/mcp_manager.py +340 -0
  28. agentfield-0.1.6/agentfield/mcp_stdio_bridge.py +550 -0
  29. agentfield-0.1.6/agentfield/memory.py +603 -0
  30. agentfield-0.1.6/agentfield/memory_events.py +444 -0
  31. agentfield-0.1.6/agentfield/multimodal.py +173 -0
  32. agentfield-0.1.6/agentfield/multimodal_response.py +403 -0
  33. agentfield-0.1.6/agentfield/pydantic_utils.py +227 -0
  34. agentfield-0.1.6/agentfield/rate_limiter.py +280 -0
  35. agentfield-0.1.6/agentfield/result_cache.py +434 -0
  36. agentfield-0.1.6/agentfield/router.py +166 -0
  37. agentfield-0.1.6/agentfield/status.py +70 -0
  38. agentfield-0.1.6/agentfield/types.py +530 -0
  39. agentfield-0.1.6/agentfield/utils.py +26 -0
  40. agentfield-0.1.6/agentfield/vc_generator.py +445 -0
  41. agentfield-0.1.6/agentfield/vision.py +198 -0
  42. agentfield-0.1.6/agentfield.egg-info/PKG-INFO +99 -0
  43. agentfield-0.1.6/agentfield.egg-info/SOURCES.txt +46 -0
  44. agentfield-0.1.6/agentfield.egg-info/dependency_links.txt +1 -0
  45. agentfield-0.1.6/agentfield.egg-info/requires.txt +20 -0
  46. agentfield-0.1.6/agentfield.egg-info/top_level.txt +1 -0
  47. agentfield-0.1.6/pyproject.toml +88 -0
  48. agentfield-0.1.6/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,99 @@
1
+ Metadata-Version: 2.4
2
+ Name: agentfield
3
+ Version: 0.1.6
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.10
17
+ Classifier: Programming Language :: Python :: 3.11
18
+ Classifier: Programming Language :: Python :: 3.12
19
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
20
+ Requires-Python: >=3.10
21
+ Description-Content-Type: text/markdown
22
+ Requires-Dist: fastapi
23
+ Requires-Dist: uvicorn
24
+ Requires-Dist: requests>=2.28
25
+ Requires-Dist: pydantic>=2.0
26
+ Requires-Dist: litellm
27
+ Requires-Dist: psutil
28
+ Requires-Dist: PyYAML>=6.0
29
+ Requires-Dist: aiohttp>=3.8
30
+ Requires-Dist: websockets
31
+ Provides-Extra: dev
32
+ Requires-Dist: pytest<9,>=7.4; extra == "dev"
33
+ Requires-Dist: pytest-asyncio<0.24,>=0.21; extra == "dev"
34
+ Requires-Dist: pytest-cov<5,>=4.1; extra == "dev"
35
+ Requires-Dist: responses<0.26,>=0.23; extra == "dev"
36
+ Requires-Dist: respx<0.22,>=0.20; extra == "dev"
37
+ Requires-Dist: freezegun<2,>=1.2; extra == "dev"
38
+ Requires-Dist: syrupy<5,>=4; extra == "dev"
39
+ Requires-Dist: hypothesis<7,>=6.88; extra == "dev"
40
+ Requires-Dist: pytest-socket<0.8,>=0.6; extra == "dev"
41
+
42
+ # AgentField Python SDK
43
+
44
+ The AgentField SDK provides a production-ready Python interface for registering agents, executing workflows, and integrating with the AgentField control plane.
45
+
46
+ ## Installation
47
+
48
+ ```bash
49
+ pip install agentfield
50
+ ```
51
+
52
+ To work on the SDK locally:
53
+
54
+ ```bash
55
+ git clone https://github.com/Agent-Field/agentfield.git
56
+ cd agentfield/sdk/python
57
+ python -m pip install -e .[dev]
58
+ ```
59
+
60
+ ## Quick Start
61
+
62
+ ```python
63
+ from agentfield import Agent
64
+
65
+ agent = Agent(
66
+ node_id="example-agent",
67
+ agentfield_server="http://localhost:8080",
68
+ dev_mode=True,
69
+ )
70
+
71
+ @agent.reasoner()
72
+ async def summarize(text: str) -> dict:
73
+ result = await agent.ai(
74
+ prompt=f"Summarize: {text}",
75
+ response_model={"summary": "string", "tone": "string"},
76
+ )
77
+ return result
78
+
79
+ if __name__ == "__main__":
80
+ agent.serve(port=8001)
81
+ ```
82
+
83
+ See `docs/DEVELOPMENT.md` for instructions on wiring agents to the control plane.
84
+
85
+ ## Testing
86
+
87
+ ```bash
88
+ pytest
89
+ ```
90
+
91
+ To run coverage locally:
92
+
93
+ ```bash
94
+ pytest --cov=agentfield --cov-report=term-missing
95
+ ```
96
+
97
+ ## License
98
+
99
+ 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,55 @@
1
+ from .agent import Agent
2
+ from .router import AgentRouter
3
+ from .types import AIConfig, MemoryConfig, ReasonerDefinition, SkillDefinition
4
+ from .multimodal import (
5
+ Text,
6
+ Image,
7
+ Audio,
8
+ File,
9
+ MultimodalContent,
10
+ text,
11
+ image_from_file,
12
+ image_from_url,
13
+ audio_from_file,
14
+ audio_from_url,
15
+ file_from_path,
16
+ file_from_url,
17
+ )
18
+ from .multimodal_response import (
19
+ MultimodalResponse,
20
+ AudioOutput,
21
+ ImageOutput,
22
+ FileOutput,
23
+ detect_multimodal_response,
24
+ )
25
+
26
+ __all__ = [
27
+ "Agent",
28
+ "AIConfig",
29
+ "MemoryConfig",
30
+ "ReasonerDefinition",
31
+ "SkillDefinition",
32
+ "AgentRouter",
33
+ # Input multimodal classes
34
+ "Text",
35
+ "Image",
36
+ "Audio",
37
+ "File",
38
+ "MultimodalContent",
39
+ # Convenience functions for input
40
+ "text",
41
+ "image_from_file",
42
+ "image_from_url",
43
+ "audio_from_file",
44
+ "audio_from_url",
45
+ "file_from_path",
46
+ "file_from_url",
47
+ # Output multimodal classes
48
+ "MultimodalResponse",
49
+ "AudioOutput",
50
+ "ImageOutput",
51
+ "FileOutput",
52
+ "detect_multimodal_response",
53
+ ]
54
+
55
+ __version__ = "0.1.6"