Skip to main content

CodeBuddy Code SDK for Python

Project description

CodeBuddy Agent SDK for Python

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.

Installation

# Using uv (recommended)
uv add codebuddy-agent-sdk

# Using pip
pip install codebuddy-agent-sdk

Quick Start

import asyncio
from codebuddy_agent_sdk import query

async def main():
    async for message in query(
        prompt="What files are in this directory?",
        permission_mode="bypassPermissions",
    ):
        if message.type == "assistant":
            for block in message.content:
                if hasattr(block, "text"):
                    print(block.text)

asyncio.run(main())

API Reference

query(prompt, **options)

Create a query to interact with the agent.

async for message in query(
    prompt="Your prompt here",
    model="sonnet",                    # Model to use
    permission_mode="bypassPermissions",  # Permission mode
    max_turns=10,                      # Maximum conversation turns
    cwd="/path/to/project",            # Working directory
):
    # Handle message
    pass

Message Types

  • system - Session initialization info
  • assistant - Agent responses (text, tool calls)
  • result - Query completion status

Related Links

Feedback

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

codebuddy_agent_sdk-0.3.156-py3-none-win_amd64.whl (50.7 MB view details)

Uploaded Python 3Windows x86-64

codebuddy_agent_sdk-0.3.156-py3-none-musllinux_1_1_x86_64.whl (44.8 MB view details)

Uploaded Python 3musllinux: musl 1.1+ x86-64

codebuddy_agent_sdk-0.3.156-py3-none-musllinux_1_1_aarch64.whl (44.7 MB view details)

Uploaded Python 3musllinux: musl 1.1+ ARM64

codebuddy_agent_sdk-0.3.156-py3-none-manylinux_2_17_x86_64.whl (47.0 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ x86-64

codebuddy_agent_sdk-0.3.156-py3-none-manylinux_2_17_aarch64.whl (46.5 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ ARM64

codebuddy_agent_sdk-0.3.156-py3-none-macosx_11_0_arm64.whl (31.6 MB view details)

Uploaded Python 3macOS 11.0+ ARM64

codebuddy_agent_sdk-0.3.156-py3-none-macosx_10_12_x86_64.whl (34.1 MB view details)

Uploaded Python 3macOS 10.12+ x86-64

File details

Details for the file codebuddy_agent_sdk-0.3.156-py3-none-win_amd64.whl.

File metadata

  • Download URL: codebuddy_agent_sdk-0.3.156-py3-none-win_amd64.whl
  • Upload date:
  • Size: 50.7 MB
  • Tags: Python 3, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.12 {"installer":{"name":"uv","version":"0.11.12","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"12","id":"bookworm","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for codebuddy_agent_sdk-0.3.156-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 aa9097f3b107982174b0a3b4a1e3c4c7ccce6f8cf9f13c1b74f755ff94143f51
MD5 478cb0d401ad5b68274c35a1e788e32e
BLAKE2b-256 d17c70174116060643a3e9100195d7c253dbd20417e81b1cac5bfdd76f1e693e

See more details on using hashes here.

File details

Details for the file codebuddy_agent_sdk-0.3.156-py3-none-musllinux_1_1_x86_64.whl.

File metadata

  • Download URL: codebuddy_agent_sdk-0.3.156-py3-none-musllinux_1_1_x86_64.whl
  • Upload date:
  • Size: 44.8 MB
  • Tags: Python 3, musllinux: musl 1.1+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.12 {"installer":{"name":"uv","version":"0.11.12","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"12","id":"bookworm","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for codebuddy_agent_sdk-0.3.156-py3-none-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 c39b1785a919ef012fd7098208e906e02149cf2c7ab5bc1b23eb0cfab8514b6a
MD5 6cd228c17c87afbcca3c614b958af3bf
BLAKE2b-256 58b6fb310f70f97002e5f4eef66511bc3a2749f23201c1a132f997e9081ca5f4

See more details on using hashes here.

File details

Details for the file codebuddy_agent_sdk-0.3.156-py3-none-musllinux_1_1_aarch64.whl.

File metadata

  • Download URL: codebuddy_agent_sdk-0.3.156-py3-none-musllinux_1_1_aarch64.whl
  • Upload date:
  • Size: 44.7 MB
  • Tags: Python 3, musllinux: musl 1.1+ ARM64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.12 {"installer":{"name":"uv","version":"0.11.12","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"12","id":"bookworm","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for codebuddy_agent_sdk-0.3.156-py3-none-musllinux_1_1_aarch64.whl
Algorithm Hash digest
SHA256 f873645fa21a13dc74e6dcf60c6c821fa9fd10776f323469820fcf051386ca4f
MD5 dc806739f6fa8e4c2ed4ccd5dfca8da1
BLAKE2b-256 6028294caf66b723ee36ce1943b7908cf3dd0ba1ad6ae32ed85d72688c6518db

See more details on using hashes here.

File details

Details for the file codebuddy_agent_sdk-0.3.156-py3-none-manylinux_2_17_x86_64.whl.

File metadata

  • Download URL: codebuddy_agent_sdk-0.3.156-py3-none-manylinux_2_17_x86_64.whl
  • Upload date:
  • Size: 47.0 MB
  • Tags: Python 3, manylinux: glibc 2.17+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.12 {"installer":{"name":"uv","version":"0.11.12","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"12","id":"bookworm","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for codebuddy_agent_sdk-0.3.156-py3-none-manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 379d8bd66671af2f14f55db1781aa509c847f1945ab464d99e470b540e93d081
MD5 47811f2bee633c55527db2be2d0ccd65
BLAKE2b-256 8aa04d738bf574b27db5824031416c893ccb81fc8904f8f7e03020e0db185fa2

See more details on using hashes here.

File details

Details for the file codebuddy_agent_sdk-0.3.156-py3-none-manylinux_2_17_aarch64.whl.

File metadata

  • Download URL: codebuddy_agent_sdk-0.3.156-py3-none-manylinux_2_17_aarch64.whl
  • Upload date:
  • Size: 46.5 MB
  • Tags: Python 3, manylinux: glibc 2.17+ ARM64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.12 {"installer":{"name":"uv","version":"0.11.12","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"12","id":"bookworm","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for codebuddy_agent_sdk-0.3.156-py3-none-manylinux_2_17_aarch64.whl
Algorithm Hash digest
SHA256 0449a922b851149837a9ec5ad91477816cff506a270a57de49abf27fd45eb957
MD5 d8eb3142837986242c6d40b40b7f208d
BLAKE2b-256 a3fd592f628c167794929f9b5dad802d96ace64331de87e62aefb327108f280f

See more details on using hashes here.

File details

Details for the file codebuddy_agent_sdk-0.3.156-py3-none-macosx_11_0_arm64.whl.

File metadata

  • Download URL: codebuddy_agent_sdk-0.3.156-py3-none-macosx_11_0_arm64.whl
  • Upload date:
  • Size: 31.6 MB
  • Tags: Python 3, macOS 11.0+ ARM64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.12 {"installer":{"name":"uv","version":"0.11.12","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"12","id":"bookworm","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for codebuddy_agent_sdk-0.3.156-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 d8194a9d7c1e5da2cc92f73e001cc6d3c6daa9fa06b30cbeb455e6dfabe3901f
MD5 c77278be9f89a9bcfd1263296e29b160
BLAKE2b-256 b11f7218b450d6ff6235b179ef94ad65b46cfff3093270b7b11113e2cb7374d3

See more details on using hashes here.

File details

Details for the file codebuddy_agent_sdk-0.3.156-py3-none-macosx_10_12_x86_64.whl.

File metadata

  • Download URL: codebuddy_agent_sdk-0.3.156-py3-none-macosx_10_12_x86_64.whl
  • Upload date:
  • Size: 34.1 MB
  • Tags: Python 3, macOS 10.12+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.12 {"installer":{"name":"uv","version":"0.11.12","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"12","id":"bookworm","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for codebuddy_agent_sdk-0.3.156-py3-none-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 7e57abc7102069310198eb10373ac93b396ea042d56bc1ed5d07e7eaac131258
MD5 30b364f4bc83404b06d6a3204f246a69
BLAKE2b-256 f5564eddea4c152c5685ab0bd08b18b4a2a97fe93b1a7ee6bae1a4b5e2d9c07b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page