codebuddy-agent-sdk 0.0.1__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 codebuddy-agent-sdk might be problematic. Click here for more details.
|
File without changes
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: codebuddy-agent-sdk
|
|
3
|
+
Version: 0.0.1
|
|
4
|
+
Summary: CodeBuddy Code SDK for Python
|
|
5
|
+
Author-email: ninoyi <ninoyi@tencent.com>
|
|
6
|
+
Keywords: agent,ai,codebuddy,sdk
|
|
7
|
+
Classifier: Development Status :: 3 - Alpha
|
|
8
|
+
Classifier: Intended Audience :: Developers
|
|
9
|
+
Classifier: Programming Language :: Python :: 3
|
|
10
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
11
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
12
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
13
|
+
Classifier: Typing :: Typed
|
|
14
|
+
Requires-Python: >=3.10
|
|
15
|
+
Description-Content-Type: text/markdown
|
|
16
|
+
|
|
17
|
+
# CodeBuddy Agent SDK for Python
|
|
18
|
+
|
|
19
|
+
SDK for building AI agents with CodeBuddy Code's capabilities. Programmatically interact with AI to build autonomous agents that can understand codebases, edit files, and execute workflows.
|
|
20
|
+
|
|
21
|
+
## Installation
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
# Using uv (recommended)
|
|
25
|
+
uv add codebuddy-agent-sdk
|
|
26
|
+
|
|
27
|
+
# Using pip
|
|
28
|
+
pip install codebuddy-agent-sdk
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## Quick Start
|
|
32
|
+
|
|
33
|
+
```python
|
|
34
|
+
import asyncio
|
|
35
|
+
from codebuddy_agent_sdk import query
|
|
36
|
+
|
|
37
|
+
async def main():
|
|
38
|
+
async for message in query(
|
|
39
|
+
prompt="What files are in this directory?",
|
|
40
|
+
permission_mode="bypassPermissions",
|
|
41
|
+
):
|
|
42
|
+
if message.type == "assistant":
|
|
43
|
+
for block in message.content:
|
|
44
|
+
if hasattr(block, "text"):
|
|
45
|
+
print(block.text)
|
|
46
|
+
|
|
47
|
+
asyncio.run(main())
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## API Reference
|
|
51
|
+
|
|
52
|
+
### `query(prompt, **options)`
|
|
53
|
+
|
|
54
|
+
Create a query to interact with the agent.
|
|
55
|
+
|
|
56
|
+
```python
|
|
57
|
+
async for message in query(
|
|
58
|
+
prompt="Your prompt here",
|
|
59
|
+
model="sonnet", # Model to use
|
|
60
|
+
permission_mode="bypassPermissions", # Permission mode
|
|
61
|
+
max_turns=10, # Maximum conversation turns
|
|
62
|
+
cwd="/path/to/project", # Working directory
|
|
63
|
+
):
|
|
64
|
+
# Handle message
|
|
65
|
+
pass
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
### Message Types
|
|
69
|
+
|
|
70
|
+
- `system` - Session initialization info
|
|
71
|
+
- `assistant` - Agent responses (text, tool calls)
|
|
72
|
+
- `result` - Query completion status
|
|
73
|
+
|
|
74
|
+
## Related Links
|
|
75
|
+
|
|
76
|
+
- [CodeBuddy Code CLI](https://www.npmjs.com/package/@tencent-ai/codebuddy-code)
|
|
77
|
+
- [Documentation](https://cnb.cool/codebuddy/codebuddy-code/-/blob/main/docs)
|
|
78
|
+
- [Issues](https://cnb.cool/codebuddy/codebuddy-code/-/issues)
|
|
79
|
+
|
|
80
|
+
## Feedback
|
|
81
|
+
|
|
82
|
+
- Submit issues at [Issues](https://cnb.cool/codebuddy/codebuddy-code/-/issues)
|
|
83
|
+
- Contact: codebuddy@tencent.com
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
codebuddy_agent_sdk/__init__.py,sha256=wGBjGZLR3Dadhw4Rpp1ovc9OZzrPa0ErsPOrzTwIKDo,61
|
|
2
|
+
codebuddy_agent_sdk/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
3
|
+
codebuddy_agent_sdk-0.0.1.dist-info/METADATA,sha256=f7ZlbiFpzPLGrBuc1P1lT2uROmCKKm-GV4VKJrSVSL8,2292
|
|
4
|
+
codebuddy_agent_sdk-0.0.1.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
|
|
5
|
+
codebuddy_agent_sdk-0.0.1.dist-info/RECORD,,
|