cloudbase-agent-core 0.1.4__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.
- cloudbase_agent_core-0.1.4/.gitignore +194 -0
- cloudbase_agent_core-0.1.4/PKG-INFO +28 -0
- cloudbase_agent_core-0.1.4/README.md +3 -0
- cloudbase_agent_core-0.1.4/pyproject.toml +41 -0
- cloudbase_agent_core-0.1.4/src/cloudbase_agent/__init__.py +69 -0
- cloudbase_agent_core-0.1.4/src/cloudbase_agent/__init__.pyi +12 -0
- cloudbase_agent_core-0.1.4/src/cloudbase_agent/base_agent.py +743 -0
- cloudbase_agent_core-0.1.4/src/cloudbase_agent/schemas/__init__.py +58 -0
- cloudbase_agent_core-0.1.4/src/cloudbase_agent/schemas/core.py +35 -0
- cloudbase_agent_core-0.1.4/src/cloudbase_agent/schemas/server.py +113 -0
- cloudbase_agent_core-0.1.4/src/cloudbase_agent/schemas/storage.py +66 -0
- cloudbase_agent_core-0.1.4/src/cloudbase_agent/schemas/streaming.py +39 -0
- cloudbase_agent_core-0.1.4/src/cloudbase_agent/schemas/tools.py +59 -0
- cloudbase_agent_core-0.1.4/src/cloudbase_agent/schemas/types.py +14 -0
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
|
|
2
|
+
# Dependencies
|
|
3
|
+
node_modules/
|
|
4
|
+
.pnp
|
|
5
|
+
.pnp.js
|
|
6
|
+
|
|
7
|
+
# Production builds
|
|
8
|
+
dist/
|
|
9
|
+
build/
|
|
10
|
+
out/
|
|
11
|
+
|
|
12
|
+
# Environment variables
|
|
13
|
+
.env
|
|
14
|
+
.env.local
|
|
15
|
+
.env.development.local
|
|
16
|
+
.env.test.local
|
|
17
|
+
.env.production.local
|
|
18
|
+
|
|
19
|
+
# Logs
|
|
20
|
+
logs
|
|
21
|
+
*.log
|
|
22
|
+
npm-debug.log*
|
|
23
|
+
yarn-debug.log*
|
|
24
|
+
yarn-error.log*
|
|
25
|
+
lerna-debug.log*
|
|
26
|
+
.pnpm-debug.log*
|
|
27
|
+
|
|
28
|
+
# Runtime data
|
|
29
|
+
pids
|
|
30
|
+
*.pid
|
|
31
|
+
*.seed
|
|
32
|
+
*.pid.lock
|
|
33
|
+
|
|
34
|
+
# Coverage directory used by tools like istanbul
|
|
35
|
+
coverage/
|
|
36
|
+
*.lcov
|
|
37
|
+
|
|
38
|
+
# nyc test coverage
|
|
39
|
+
.nyc_output
|
|
40
|
+
|
|
41
|
+
# TypeScript
|
|
42
|
+
*.tsbuildinfo
|
|
43
|
+
|
|
44
|
+
# Optional npm cache directory
|
|
45
|
+
.npm
|
|
46
|
+
|
|
47
|
+
# Optional eslint cache
|
|
48
|
+
.eslintcache
|
|
49
|
+
|
|
50
|
+
# Microbundle cache
|
|
51
|
+
.rpt2_cache/
|
|
52
|
+
.rts2_cache_cjs/
|
|
53
|
+
.rts2_cache_es/
|
|
54
|
+
.rts2_cache_umd/
|
|
55
|
+
|
|
56
|
+
# Optional REPL history
|
|
57
|
+
.node_repl_history
|
|
58
|
+
|
|
59
|
+
# Output of 'npm pack'
|
|
60
|
+
*.tgz
|
|
61
|
+
|
|
62
|
+
# Yarn Integrity file
|
|
63
|
+
.yarn-integrity
|
|
64
|
+
|
|
65
|
+
# parcel-bundler cache (https://parceljs.org/)
|
|
66
|
+
.cache
|
|
67
|
+
.parcel-cache
|
|
68
|
+
|
|
69
|
+
# Next.js build output
|
|
70
|
+
.next
|
|
71
|
+
|
|
72
|
+
# Nuxt.js build / generate output
|
|
73
|
+
.nuxt
|
|
74
|
+
|
|
75
|
+
# Gatsby files
|
|
76
|
+
.cache/
|
|
77
|
+
|
|
78
|
+
# vuepress build output
|
|
79
|
+
.vuepress/dist
|
|
80
|
+
|
|
81
|
+
# Serverless directories
|
|
82
|
+
.serverless/
|
|
83
|
+
|
|
84
|
+
# FuseBox cache
|
|
85
|
+
.fusebox/
|
|
86
|
+
|
|
87
|
+
# DynamoDB Local files
|
|
88
|
+
.dynamodb/
|
|
89
|
+
|
|
90
|
+
# TernJS port file
|
|
91
|
+
.tern-port
|
|
92
|
+
|
|
93
|
+
# Stores VSCode versions used for testing VSCode extensions
|
|
94
|
+
.vscode-test
|
|
95
|
+
|
|
96
|
+
# yarn v2
|
|
97
|
+
.yarn/cache
|
|
98
|
+
.yarn/unplugged
|
|
99
|
+
.yarn/build-state.yml
|
|
100
|
+
.yarn/install-state.gz
|
|
101
|
+
.pnp.*
|
|
102
|
+
|
|
103
|
+
# IDE
|
|
104
|
+
.vscode/
|
|
105
|
+
.idea/
|
|
106
|
+
*.swp
|
|
107
|
+
*.swo
|
|
108
|
+
|
|
109
|
+
# OS
|
|
110
|
+
.DS_Store
|
|
111
|
+
.DS_Store?
|
|
112
|
+
._*
|
|
113
|
+
.Spotlight-V100
|
|
114
|
+
.Trashes
|
|
115
|
+
ehthumbs.db
|
|
116
|
+
Thumbs.db
|
|
117
|
+
|
|
118
|
+
# Temporary files
|
|
119
|
+
*.tmp
|
|
120
|
+
*.temp
|
|
121
|
+
|
|
122
|
+
# WeChat Mini Program
|
|
123
|
+
miniprogram_npm/
|
|
124
|
+
project.config.json
|
|
125
|
+
project.private.config.json
|
|
126
|
+
|
|
127
|
+
# Testing
|
|
128
|
+
coverage/
|
|
129
|
+
.nyc_output/
|
|
130
|
+
|
|
131
|
+
# Storybook build outputs
|
|
132
|
+
storybook-static/
|
|
133
|
+
|
|
134
|
+
# Python
|
|
135
|
+
__pycache__/
|
|
136
|
+
*.pyc
|
|
137
|
+
*.pyo
|
|
138
|
+
*.pyd
|
|
139
|
+
.Python
|
|
140
|
+
*.so
|
|
141
|
+
*.egg
|
|
142
|
+
*.egg-info
|
|
143
|
+
dist/
|
|
144
|
+
build/
|
|
145
|
+
eggs/
|
|
146
|
+
.eggs/
|
|
147
|
+
lib/
|
|
148
|
+
lib64/
|
|
149
|
+
parts/
|
|
150
|
+
sdist/
|
|
151
|
+
var/
|
|
152
|
+
wheels/
|
|
153
|
+
*.egg-info/
|
|
154
|
+
.installed.cfg
|
|
155
|
+
*.egg
|
|
156
|
+
MANIFEST
|
|
157
|
+
|
|
158
|
+
# Python virtual environments
|
|
159
|
+
venv/
|
|
160
|
+
env/
|
|
161
|
+
ENV/
|
|
162
|
+
.venv
|
|
163
|
+
|
|
164
|
+
# Python testing and coverage
|
|
165
|
+
.pytest_cache/
|
|
166
|
+
.coverage
|
|
167
|
+
.coverage.*
|
|
168
|
+
htmlcov/
|
|
169
|
+
.tox/
|
|
170
|
+
.nox/
|
|
171
|
+
|
|
172
|
+
# Python type checking
|
|
173
|
+
.mypy_cache/
|
|
174
|
+
.dmypy.json
|
|
175
|
+
dmypy.json
|
|
176
|
+
.pyre/
|
|
177
|
+
.pytype/
|
|
178
|
+
|
|
179
|
+
# Python linting
|
|
180
|
+
.flake8_cache/
|
|
181
|
+
|
|
182
|
+
# Python profiling
|
|
183
|
+
.prof
|
|
184
|
+
|
|
185
|
+
# Jupyter Notebook
|
|
186
|
+
.ipynb_checkpoints
|
|
187
|
+
|
|
188
|
+
# Python package manager
|
|
189
|
+
pip-log.txt
|
|
190
|
+
pip-delete-this-directory.txt
|
|
191
|
+
|
|
192
|
+
# UV lock files (if not tracking)
|
|
193
|
+
# uv.lock
|
|
194
|
+
/docs/dist/
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: cloudbase-agent-core
|
|
3
|
+
Version: 0.1.4
|
|
4
|
+
Summary: Cloudbase Agent Python SDK - Core functionality
|
|
5
|
+
Author-email: Cloudbase Agent Team <ag-kit@example.com>
|
|
6
|
+
License: Apache-2.0
|
|
7
|
+
Keywords: Cloudbase Agent,agent,ai,llm
|
|
8
|
+
Classifier: Development Status :: 3 - Alpha
|
|
9
|
+
Classifier: Intended Audience :: Developers
|
|
10
|
+
Classifier: License :: OSI Approved :: Apache Software License
|
|
11
|
+
Classifier: Programming Language :: Python :: 3
|
|
12
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
15
|
+
Requires-Python: >=3.10
|
|
16
|
+
Requires-Dist: ag-ui-protocol>=0.1.9
|
|
17
|
+
Requires-Dist: lazy-loader>=0.4
|
|
18
|
+
Requires-Dist: pydantic>=2.0.0
|
|
19
|
+
Provides-Extra: dev
|
|
20
|
+
Requires-Dist: mypy>=1.0.0; extra == 'dev'
|
|
21
|
+
Requires-Dist: pytest-asyncio>=0.21.0; extra == 'dev'
|
|
22
|
+
Requires-Dist: pytest>=7.0.0; extra == 'dev'
|
|
23
|
+
Requires-Dist: ruff>=0.12.0; extra == 'dev'
|
|
24
|
+
Description-Content-Type: text/markdown
|
|
25
|
+
|
|
26
|
+
# Cloudbase Agent Python SDK - Core
|
|
27
|
+
|
|
28
|
+
Core functionality for Cloudbase Agent Python SDK, including base agent classes and protocols.
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "cloudbase-agent-core"
|
|
3
|
+
version = "0.1.4"
|
|
4
|
+
description = "Cloudbase Agent Python SDK - Core functionality"
|
|
5
|
+
readme = "README.md"
|
|
6
|
+
requires-python = ">=3.10"
|
|
7
|
+
license = { text = "Apache-2.0" }
|
|
8
|
+
authors = [
|
|
9
|
+
{ name = "Cloudbase Agent Team", email = "ag-kit@example.com" }
|
|
10
|
+
]
|
|
11
|
+
keywords = ["ai", "agent", "llm", "Cloudbase Agent"]
|
|
12
|
+
classifiers = [
|
|
13
|
+
"Development Status :: 3 - Alpha",
|
|
14
|
+
"Intended Audience :: Developers",
|
|
15
|
+
"License :: OSI Approved :: Apache Software License",
|
|
16
|
+
"Programming Language :: Python :: 3",
|
|
17
|
+
"Programming Language :: Python :: 3.10",
|
|
18
|
+
"Programming Language :: Python :: 3.11",
|
|
19
|
+
"Programming Language :: Python :: 3.12",
|
|
20
|
+
]
|
|
21
|
+
|
|
22
|
+
dependencies = [
|
|
23
|
+
"pydantic>=2.0.0",
|
|
24
|
+
"lazy_loader>=0.4",
|
|
25
|
+
"ag-ui-protocol>=0.1.9",
|
|
26
|
+
]
|
|
27
|
+
|
|
28
|
+
[project.optional-dependencies]
|
|
29
|
+
dev = [
|
|
30
|
+
"ruff>=0.12.0",
|
|
31
|
+
"mypy>=1.0.0",
|
|
32
|
+
"pytest>=7.0.0",
|
|
33
|
+
"pytest-asyncio>=0.21.0",
|
|
34
|
+
]
|
|
35
|
+
|
|
36
|
+
[build-system]
|
|
37
|
+
requires = ["hatchling"]
|
|
38
|
+
build-backend = "hatchling.build"
|
|
39
|
+
|
|
40
|
+
[tool.hatch.build.targets.wheel]
|
|
41
|
+
packages = ["src/cloudbase_agent"]
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
"""Agents Package.
|
|
2
|
+
|
|
3
|
+
This package provides agent creation utilities for the Cloudbase Agent Python SDK.
|
|
4
|
+
It includes base agent classes and framework-specific implementations with
|
|
5
|
+
lazy loading support for optional dependencies.
|
|
6
|
+
|
|
7
|
+
Framework Support:
|
|
8
|
+
- LangGraph: Install with `pip install cloudbase_agent_py[langgraph]`
|
|
9
|
+
- CrewAI: Install with `pip install cloudbase_agent_py[crewai]`
|
|
10
|
+
- All frameworks: Install with `pip install cloudbase_agent_py[all]`
|
|
11
|
+
|
|
12
|
+
Available Classes:
|
|
13
|
+
- BaseAgent: Abstract base class for all Cloudbase Agent agents
|
|
14
|
+
- AgentCallback: Protocol for event callbacks
|
|
15
|
+
- ToolProxy: Protocol for tool call interception
|
|
16
|
+
- ToolCallResult: Result of tool proxy interception
|
|
17
|
+
- LangGraphAgent: LangGraph-based agent implementation (lazy-loaded)
|
|
18
|
+
- CrewAIAgent: CrewAI-based agent implementation (lazy-loaded)
|
|
19
|
+
|
|
20
|
+
Example:
|
|
21
|
+
Using LangGraph::
|
|
22
|
+
|
|
23
|
+
# Install: pip install cloudbase_agent_py[langgraph]
|
|
24
|
+
from cloudbase_agent.agents import LangGraphAgent
|
|
25
|
+
from langgraph.graph import StateGraph
|
|
26
|
+
|
|
27
|
+
workflow = StateGraph(State)
|
|
28
|
+
compiled_graph = workflow.compile()
|
|
29
|
+
agent = LangGraphAgent("MyAgent", "Description", compiled_graph)
|
|
30
|
+
|
|
31
|
+
Using CrewAI::
|
|
32
|
+
|
|
33
|
+
# Install: pip install cloudbase_agent_py[crewai]
|
|
34
|
+
from cloudbase_agent.agents import CrewAIAgent
|
|
35
|
+
from crewai.flow.flow import Flow
|
|
36
|
+
|
|
37
|
+
class MyFlow(Flow):
|
|
38
|
+
pass
|
|
39
|
+
|
|
40
|
+
flow = MyFlow()
|
|
41
|
+
agent = CrewAIAgent("MyAgent", "Description", flow)
|
|
42
|
+
|
|
43
|
+
Note:
|
|
44
|
+
Framework-specific agents are lazy-loaded. If you try to import an agent
|
|
45
|
+
without installing its dependencies, you'll get a helpful error message
|
|
46
|
+
indicating which package to install.
|
|
47
|
+
"""
|
|
48
|
+
|
|
49
|
+
import lazy_loader as lazy
|
|
50
|
+
|
|
51
|
+
# Eager imports (always available, no optional dependencies)
|
|
52
|
+
from .base_agent import AgentCallback, BaseAgent, ToolCallResult, ToolProxy
|
|
53
|
+
|
|
54
|
+
# Lazy imports setup (framework-specific agents loaded on demand)
|
|
55
|
+
__getattr__, __dir__, __all__ = lazy.attach_stub(__name__, __file__)
|
|
56
|
+
|
|
57
|
+
# Ensure base classes and lazy-loaded agents are in __all__
|
|
58
|
+
__all__ = [
|
|
59
|
+
"BaseAgent",
|
|
60
|
+
"AgentCallback",
|
|
61
|
+
"ToolProxy",
|
|
62
|
+
"ToolCallResult",
|
|
63
|
+
"LangGraphAgent", # Lazy-loaded when accessed
|
|
64
|
+
"CrewAIAgent", # Lazy-loaded when accessed
|
|
65
|
+
]
|
|
66
|
+
|
|
67
|
+
# Enable namespace package support to allow other cloudbase_agent subpackages
|
|
68
|
+
# (like cloudbase_agent.server, cloudbase_agent.storage) to be imported
|
|
69
|
+
__path__ = __import__('pkgutil').extend_path(__path__, __name__)
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"""Type stubs for cloudbase_agent core package.
|
|
2
|
+
|
|
3
|
+
This stub file provides type hints for IDE and static analysis tools.
|
|
4
|
+
"""
|
|
5
|
+
|
|
6
|
+
# Eager imports (always available)
|
|
7
|
+
from .base_agent import AgentCallback as AgentCallback
|
|
8
|
+
from .base_agent import BaseAgent as BaseAgent
|
|
9
|
+
from .base_agent import ToolCallResult as ToolCallResult
|
|
10
|
+
from .base_agent import ToolProxy as ToolProxy
|
|
11
|
+
|
|
12
|
+
__all__: list[str]
|