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

Uploaded Python 3Windows x86-64

codebuddy_agent_sdk-0.3.159-py3-none-musllinux_1_1_x86_64.whl (45.3 MB view details)

Uploaded Python 3musllinux: musl 1.1+ x86-64

codebuddy_agent_sdk-0.3.159-py3-none-musllinux_1_1_aarch64.whl (45.1 MB view details)

Uploaded Python 3musllinux: musl 1.1+ ARM64

codebuddy_agent_sdk-0.3.159-py3-none-manylinux_2_17_x86_64.whl (47.5 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ x86-64

codebuddy_agent_sdk-0.3.159-py3-none-manylinux_2_17_aarch64.whl (47.0 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ ARM64

codebuddy_agent_sdk-0.3.159-py3-none-macosx_11_0_arm64.whl (32.1 MB view details)

Uploaded Python 3macOS 11.0+ ARM64

codebuddy_agent_sdk-0.3.159-py3-none-macosx_10_12_x86_64.whl (34.6 MB view details)

Uploaded Python 3macOS 10.12+ x86-64

File details

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

File metadata

  • Download URL: codebuddy_agent_sdk-0.3.159-py3-none-win_amd64.whl
  • Upload date:
  • Size: 51.2 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.159-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 af9bfc011181b145510c14e82182df2139848d538ed02a7ba02cebc55fe0226d
MD5 cdbb2f2c8c654b18727a021978d28b8f
BLAKE2b-256 d61745966de76f46d6329bc85cd99c180fb55e0feb69794027f86292c0cfc962

See more details on using hashes here.

File details

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

File metadata

  • Download URL: codebuddy_agent_sdk-0.3.159-py3-none-musllinux_1_1_x86_64.whl
  • Upload date:
  • Size: 45.3 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.159-py3-none-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 424f56589596db0de731eb133e01d59f50491e402f20e16d0b6afb86c72f3602
MD5 fdb9888e54e60eab8a9f7913ad902083
BLAKE2b-256 713ec9d1b5cf77d5a9caecbcd5fc6314404b565c7e0afce6dcfd4544900874f2

See more details on using hashes here.

File details

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

File metadata

  • Download URL: codebuddy_agent_sdk-0.3.159-py3-none-musllinux_1_1_aarch64.whl
  • Upload date:
  • Size: 45.1 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.159-py3-none-musllinux_1_1_aarch64.whl
Algorithm Hash digest
SHA256 72e50d93f339362b0c6ed6a5d740128dabb47f3918f9d3fc4f9aa4bfacad9694
MD5 23261f15536cebaed22fd16819da4d75
BLAKE2b-256 409d7f68884e812beecee1f7835cf9b74d9d145e750e11685b506e1d5c5d1e51

See more details on using hashes here.

File details

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

File metadata

  • Download URL: codebuddy_agent_sdk-0.3.159-py3-none-manylinux_2_17_x86_64.whl
  • Upload date:
  • Size: 47.5 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.159-py3-none-manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 c1e957d75d776731c6215bd9179960e4587e72666e5072a44109c26fa8a4b0a8
MD5 066b2cf2cf73826f05207a0479ec4af0
BLAKE2b-256 0664fffed00a7c4b9f6446be700ec67834229a31c8eff9d91a582083039fc1b6

See more details on using hashes here.

File details

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

File metadata

  • Download URL: codebuddy_agent_sdk-0.3.159-py3-none-manylinux_2_17_aarch64.whl
  • Upload date:
  • Size: 47.0 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.159-py3-none-manylinux_2_17_aarch64.whl
Algorithm Hash digest
SHA256 5d945926e55e41e67250cc82eb2186915d4e1f7eda6ad9c073d76e6ab8ba53e4
MD5 145fa43f77771ce39a8f2221ef030f55
BLAKE2b-256 fb1c88b5e814f6e8766c5148f29b53072ad4d19067557822c1f23f58f97a0e26

See more details on using hashes here.

File details

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

File metadata

  • Download URL: codebuddy_agent_sdk-0.3.159-py3-none-macosx_11_0_arm64.whl
  • Upload date:
  • Size: 32.1 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.159-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 b8991311ea392853d2060b1b8ef22257dcce29f8eb13636f2ae2caf14024a1aa
MD5 2182941c9de609e1e8e5097b6841ea22
BLAKE2b-256 d21fd7b1d0b706bf5f81ae5c81093ade9115959fe4ecd7dd328924c0eba48a95

See more details on using hashes here.

File details

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

File metadata

  • Download URL: codebuddy_agent_sdk-0.3.159-py3-none-macosx_10_12_x86_64.whl
  • Upload date:
  • Size: 34.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.159-py3-none-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 b731eaee7d9908172b4b5147cf515ceed0e18b0f9db3226c605b3060c0b41507
MD5 402ea0a7f132b5940aa09488f097fcb4
BLAKE2b-256 2cdb0418def146b7d116c6d0b640c72c2b2fa80fb2f82977dce1976171179fd9

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