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.154-py3-none-win_amd64.whl (50.7 MB view details)

Uploaded Python 3Windows x86-64

codebuddy_agent_sdk-0.3.154-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.154-py3-none-musllinux_1_1_aarch64.whl (44.6 MB view details)

Uploaded Python 3musllinux: musl 1.1+ ARM64

codebuddy_agent_sdk-0.3.154-py3-none-manylinux_2_17_x86_64.whl (46.9 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ x86-64

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

Uploaded Python 3manylinux: glibc 2.17+ ARM64

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

Uploaded Python 3macOS 11.0+ ARM64

codebuddy_agent_sdk-0.3.154-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.154-py3-none-win_amd64.whl.

File metadata

  • Download URL: codebuddy_agent_sdk-0.3.154-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.154-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 630637a5800eca94c8fe71dd7451d86e2960b210ed6bc8a953c60afd9b120747
MD5 89e64e8df56538d45ce596751f7ac1c5
BLAKE2b-256 6a12f7ef9ab5e320f92d4e6aefbe637c7ef1864c131aca4ea558742b6f5675b5

See more details on using hashes here.

File details

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

File metadata

  • Download URL: codebuddy_agent_sdk-0.3.154-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.154-py3-none-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 6fde9ee06eaa7251b4842d175064f2fb8eb8e06b9cb5e74ce209dd8169deae95
MD5 9deff4ab1a441794eafef78ea49ee4dd
BLAKE2b-256 5cdd21e70f915bbe0d04f74c561946c482727d91af3185dc6697a0ddb8e3da47

See more details on using hashes here.

File details

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

File metadata

  • Download URL: codebuddy_agent_sdk-0.3.154-py3-none-musllinux_1_1_aarch64.whl
  • Upload date:
  • Size: 44.6 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.154-py3-none-musllinux_1_1_aarch64.whl
Algorithm Hash digest
SHA256 8fb655872e9d15680fb422187ed1f0df38588568041758cb2b77ff2359d4cd27
MD5 49b10762ebfcc76105f362ecbeabd171
BLAKE2b-256 3d014a7c8102a7ed6ad995eeee1ba6af2b9d7bece5c1f29683dbc7c7bdfc45df

See more details on using hashes here.

File details

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

File metadata

  • Download URL: codebuddy_agent_sdk-0.3.154-py3-none-manylinux_2_17_x86_64.whl
  • Upload date:
  • Size: 46.9 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.154-py3-none-manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 3c14b8115c42b3cdd518b1360f0ba03d6657ffbcb591461d7ca23e4ec2496028
MD5 357e51d0e229e79cd7120dfd0bd88479
BLAKE2b-256 f7ddd13094405366173f074a7a1bcabfae3a31c2f3232f32ba69184384ce79c4

See more details on using hashes here.

File details

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

File metadata

  • Download URL: codebuddy_agent_sdk-0.3.154-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.154-py3-none-manylinux_2_17_aarch64.whl
Algorithm Hash digest
SHA256 834863ce31ff44a165d2834e9688cce534bd6dde4bf40080bf18e539f0c0211e
MD5 44b8f69e10e2291919233471bf1ffba7
BLAKE2b-256 183dff7760bc993cd70a153c03ac0a5430588c7225c9dfd0cc7632cf8cfd83da

See more details on using hashes here.

File details

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

File metadata

  • Download URL: codebuddy_agent_sdk-0.3.154-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.154-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 8f01e4d300d47ee53951a637fc998ef0f74732ce7578c37e31556bfa8b7bb322
MD5 cdf425c49c6df02985e6803aa5dddf5b
BLAKE2b-256 7999b8e9b8e29dc44205f2b3a09b31580c809c46a685cf4a1129dfaa91068056

See more details on using hashes here.

File details

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

File metadata

  • Download URL: codebuddy_agent_sdk-0.3.154-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.154-py3-none-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 7c71402abfa1cea1e742f9274660e1dd26d7c538e218d4a341504e446920b43a
MD5 89a2abad8ae8b6504630bf118cab886f
BLAKE2b-256 075f36c29aa51110e79a9a210867fde11ceef5f9f95b6fc8d17e4093786ee04a

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