Skip to main content

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

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

Uploaded Python 3Windows x86-64

codebuddy_agent_sdk-0.3.219-py3-none-musllinux_1_1_x86_64.whl (43.7 MB view details)

Uploaded Python 3musllinux: musl 1.1+ x86-64

codebuddy_agent_sdk-0.3.219-py3-none-musllinux_1_1_aarch64.whl (43.6 MB view details)

Uploaded Python 3musllinux: musl 1.1+ ARM64

codebuddy_agent_sdk-0.3.219-py3-none-manylinux_2_17_x86_64.whl (45.3 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ x86-64

codebuddy_agent_sdk-0.3.219-py3-none-manylinux_2_17_aarch64.whl (44.9 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ ARM64

codebuddy_agent_sdk-0.3.219-py3-none-macosx_11_0_arm64.whl (34.0 MB view details)

Uploaded Python 3macOS 11.0+ ARM64

codebuddy_agent_sdk-0.3.219-py3-none-macosx_10_12_x86_64.whl (36.6 MB view details)

Uploaded Python 3macOS 10.12+ x86-64

File details

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

File metadata

  • Download URL: codebuddy_agent_sdk-0.3.219-py3-none-win_amd64.whl
  • Upload date:
  • Size: 48.5 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.219-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 38551f93149941259741975a54660771043775b97b17bfb94de55fdd40290222
MD5 859bb05f774ba03d91e17e319a65ff9b
BLAKE2b-256 2f6769f09a92eda7ef608a6c11edc11301e1c9aba8e6b5f1dd2926a37f95c27d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: codebuddy_agent_sdk-0.3.219-py3-none-musllinux_1_1_x86_64.whl
  • Upload date:
  • Size: 43.7 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.219-py3-none-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 dd356b61ebb811f7f4550359dff06305ee55e748076d2ff9673c33b1a3014c07
MD5 f448f429ce1baae197fe52fd5859821a
BLAKE2b-256 4a8e6a99dff6625b349c61d7d1d902a4a0782b088135340e658d54ae9f64f629

See more details on using hashes here.

File details

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

File metadata

  • Download URL: codebuddy_agent_sdk-0.3.219-py3-none-musllinux_1_1_aarch64.whl
  • Upload date:
  • Size: 43.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.219-py3-none-musllinux_1_1_aarch64.whl
Algorithm Hash digest
SHA256 111e6337be21ec7c8fe85f9bd09132df0bf7c5f926d6b244a4aa6981abb7960f
MD5 a41e1db58a23ea272cb1de0ea3804d9e
BLAKE2b-256 9e18c300ad8e6bda950dc578ec3b9f4e05952f38686e025cc0d929f860a739e8

See more details on using hashes here.

File details

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

File metadata

  • Download URL: codebuddy_agent_sdk-0.3.219-py3-none-manylinux_2_17_x86_64.whl
  • Upload date:
  • Size: 45.3 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.219-py3-none-manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 b49cefd70e227e9b99a1292d9652ce0fefcdd18f02a0e59d930f6b235afe266e
MD5 a49a43647e9f2369f94bf9abf3069cb2
BLAKE2b-256 6d4761585b41b7d08de27f6252cffdbfa3cf6591663b27ca935683dd929387e3

See more details on using hashes here.

File details

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

File metadata

  • Download URL: codebuddy_agent_sdk-0.3.219-py3-none-manylinux_2_17_aarch64.whl
  • Upload date:
  • Size: 44.9 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.219-py3-none-manylinux_2_17_aarch64.whl
Algorithm Hash digest
SHA256 7230513f5a736ed921891b469170e8e0549c87d10537e4436376c3ee00360ee9
MD5 c95cd4b223e9af9971970496894f13cb
BLAKE2b-256 ea2548a7342e703373b34b06646bf51f6be54af456535c740edc48c87641c23c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: codebuddy_agent_sdk-0.3.219-py3-none-macosx_11_0_arm64.whl
  • Upload date:
  • Size: 34.0 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.219-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 bb75b348d7b8dd7f209298441bb305860d1c26bc2e58f81b785bd7cd9453fb3f
MD5 a472f7bb7476295ea441caa18c58b683
BLAKE2b-256 6e986790cd03080765c865554b1baeafca2436811dc03467a46089f1e3416f75

See more details on using hashes here.

File details

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

File metadata

  • Download URL: codebuddy_agent_sdk-0.3.219-py3-none-macosx_10_12_x86_64.whl
  • Upload date:
  • Size: 36.6 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.219-py3-none-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 d408f5209268833869db4e5cee9e2fede23a343cb7fa718a213b0f2cc7bd44ea
MD5 0e4405fa2a797b1b1ad4c5a04119d60c
BLAKE2b-256 7a07966689381893cebcc85ad4ee6908c3aa392f33de57c8fedfc6b9da9ab710

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