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

Uploaded Python 3Windows x86-64

codebuddy_agent_sdk-0.3.147-py3-none-musllinux_1_1_x86_64.whl (44.7 MB view details)

Uploaded Python 3musllinux: musl 1.1+ x86-64

codebuddy_agent_sdk-0.3.147-py3-none-musllinux_1_1_aarch64.whl (44.5 MB view details)

Uploaded Python 3musllinux: musl 1.1+ ARM64

codebuddy_agent_sdk-0.3.147-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.147-py3-none-manylinux_2_17_aarch64.whl (46.4 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ ARM64

codebuddy_agent_sdk-0.3.147-py3-none-macosx_11_0_arm64.whl (31.5 MB view details)

Uploaded Python 3macOS 11.0+ ARM64

codebuddy_agent_sdk-0.3.147-py3-none-macosx_10_12_x86_64.whl (34.0 MB view details)

Uploaded Python 3macOS 10.12+ x86-64

File details

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

File metadata

  • Download URL: codebuddy_agent_sdk-0.3.147-py3-none-win_amd64.whl
  • Upload date:
  • Size: 50.6 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.147-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 41c706eb0a9029adf9205fcf000d09e04b69249f6378c2a5f2760eca49dfc164
MD5 799586a5fbb8d1204299072d2a054f2e
BLAKE2b-256 3170945eab75689fa1fb0f2e3f8a03ce35685f8e1871a85cc6256673f05d6cab

See more details on using hashes here.

File details

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

File metadata

  • Download URL: codebuddy_agent_sdk-0.3.147-py3-none-musllinux_1_1_x86_64.whl
  • Upload date:
  • Size: 44.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.147-py3-none-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 47136bfe2b9b5e85a42bfad8cef02129987b229c0823c97b6229860fdc533d6b
MD5 92d312113b99d20e03d0933766f88aa9
BLAKE2b-256 94f9a75406dc2e53cd497985f983239bc08a0b621973e4b06a6733a758675642

See more details on using hashes here.

File details

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

File metadata

  • Download URL: codebuddy_agent_sdk-0.3.147-py3-none-musllinux_1_1_aarch64.whl
  • Upload date:
  • Size: 44.5 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.147-py3-none-musllinux_1_1_aarch64.whl
Algorithm Hash digest
SHA256 ea47353fd0c82820c5d1b0a11f864c056868e2e8c83b02e88d3673d9795c221c
MD5 0aa2842341d69a1dac4fbbe7cca9cc7a
BLAKE2b-256 6b03bac51b1a16d12ef891c0d1967b5a4d06b622f95ea84acda95d3b39a15dca

See more details on using hashes here.

File details

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

File metadata

  • Download URL: codebuddy_agent_sdk-0.3.147-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.147-py3-none-manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 a4ec249432a825527169e90b971428d83b743fc05be916633aab5ac3de78fd84
MD5 884c824932b463414933657b5ad34970
BLAKE2b-256 26e2e9707f49f002991a93b86b442727af44220c32c4483dd1196818316ad6f4

See more details on using hashes here.

File details

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

File metadata

  • Download URL: codebuddy_agent_sdk-0.3.147-py3-none-manylinux_2_17_aarch64.whl
  • Upload date:
  • Size: 46.4 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.147-py3-none-manylinux_2_17_aarch64.whl
Algorithm Hash digest
SHA256 44025b86e22b52575e653ed6279099856065defcb1fd361a59da632a4843c586
MD5 79f92d53f9614dcd601ffe2a3cbf2e3e
BLAKE2b-256 bdc88765fb8ef142a55ede5d591745a289f05aaa5e171791d44e58e5fdfeaaf9

See more details on using hashes here.

File details

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

File metadata

  • Download URL: codebuddy_agent_sdk-0.3.147-py3-none-macosx_11_0_arm64.whl
  • Upload date:
  • Size: 31.5 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.147-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 465f715b2159ddaa43597fe505a40d1cf9b3032ac154e344b60c6f43fde1d83c
MD5 94258a18cdc1e2d2d1a9aa2d009c911f
BLAKE2b-256 328c688aa1399f9668c2ac83def92613825be5cb5cb054218b081ad88c4161fa

See more details on using hashes here.

File details

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

File metadata

  • Download URL: codebuddy_agent_sdk-0.3.147-py3-none-macosx_10_12_x86_64.whl
  • Upload date:
  • Size: 34.0 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.147-py3-none-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 a33929435c4174b65293025ec02f693ea20ba69b154641a1d1cdcef06b67d84b
MD5 b0b064ae71febfc67626632b6bca614f
BLAKE2b-256 2ae8f001d50c0b5179e296581225bf0006a3fd93ca1cd881e24f5d0354aa35e9

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