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

Uploaded Python 3Windows x86-64

codebuddy_agent_sdk-0.3.157-py3-none-musllinux_1_1_x86_64.whl (44.9 MB view details)

Uploaded Python 3musllinux: musl 1.1+ x86-64

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

Uploaded Python 3musllinux: musl 1.1+ ARM64

codebuddy_agent_sdk-0.3.157-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.157-py3-none-manylinux_2_17_aarch64.whl (46.6 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ ARM64

codebuddy_agent_sdk-0.3.157-py3-none-macosx_11_0_arm64.whl (31.7 MB view details)

Uploaded Python 3macOS 11.0+ ARM64

codebuddy_agent_sdk-0.3.157-py3-none-macosx_10_12_x86_64.whl (34.2 MB view details)

Uploaded Python 3macOS 10.12+ x86-64

File details

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

File metadata

  • Download URL: codebuddy_agent_sdk-0.3.157-py3-none-win_amd64.whl
  • Upload date:
  • Size: 50.8 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.157-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 acb552f5f90206bba056fe7e39432efe2d02b6521af359e46ffc0595a9ada0ba
MD5 37a1188af440b86aa610819d346f32e8
BLAKE2b-256 2172a3faa7cac62bd12e7438665682eb945d1e7e65d712a8f62e93b0b934a591

See more details on using hashes here.

File details

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

File metadata

  • Download URL: codebuddy_agent_sdk-0.3.157-py3-none-musllinux_1_1_x86_64.whl
  • Upload date:
  • Size: 44.9 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.157-py3-none-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 7efb28e0db72503a73d10572f604ab05ae579a611bc0a28a8daac263ecea6433
MD5 8a4b691a787ed5afaca3227b2eb07f08
BLAKE2b-256 c121825e45edbf6798157bb7bb20c7f46ac93e741280c0d82e2758379d11b480

See more details on using hashes here.

File details

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

File metadata

  • Download URL: codebuddy_agent_sdk-0.3.157-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.157-py3-none-musllinux_1_1_aarch64.whl
Algorithm Hash digest
SHA256 23d078429881e99d26a669377d1492924f7bd94ef08284e95181b8dffd476796
MD5 f612e1ebe251caec7a914015a8fed175
BLAKE2b-256 b8e3e3bdce91e0e5b52f43841c2cf7ed7a813cab90901da2cb745d97995f199b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: codebuddy_agent_sdk-0.3.157-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.157-py3-none-manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 831b22f0103f13c39639bcae67a18e75210826a02d81d87439e6bcf27754bb2a
MD5 b089c63639e8a866419b8fffb9504b49
BLAKE2b-256 16314ce80d251226f0333ee0273723bca6156f811ff556a3c9563805fa3fd871

See more details on using hashes here.

File details

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

File metadata

  • Download URL: codebuddy_agent_sdk-0.3.157-py3-none-manylinux_2_17_aarch64.whl
  • Upload date:
  • Size: 46.6 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.157-py3-none-manylinux_2_17_aarch64.whl
Algorithm Hash digest
SHA256 9072d0161f224596f012140c2458e278c2ed00f09e792aef3a0e60d2f43adfcc
MD5 e4fd6df383617ba018fce02f804d10cb
BLAKE2b-256 184a86dfb9c5d29f2b167ccc6661814feeb46380ab07ba221fc50e70e2c37a34

See more details on using hashes here.

File details

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

File metadata

  • Download URL: codebuddy_agent_sdk-0.3.157-py3-none-macosx_11_0_arm64.whl
  • Upload date:
  • Size: 31.7 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.157-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 bace26f66cb70ac89afca84b386b3b50aeb84655fcac9887a73e9d96aca8d1d0
MD5 de64d52aa231259404717d1032349bf3
BLAKE2b-256 1e265ab57a96262be27ce61fe7f5a150a9e0badda28bcadf3048545ea6e3f2ec

See more details on using hashes here.

File details

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

File metadata

  • Download URL: codebuddy_agent_sdk-0.3.157-py3-none-macosx_10_12_x86_64.whl
  • Upload date:
  • Size: 34.2 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.157-py3-none-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 7bf14bbe8d6b5c9975cc6d9a3ce3a189827e26b508e99a418bf5acd0dc119ec7
MD5 f4866177df8ff4a55326075900694f4d
BLAKE2b-256 d08bd4a9fa4750119da3a93dfebb3f562a4792c35c3f9b327b1898f334f52d25

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