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

Uploaded Python 3Windows x86-64

codebuddy_agent_sdk-0.3.146-py3-none-musllinux_1_1_x86_64.whl (44.3 MB view details)

Uploaded Python 3musllinux: musl 1.1+ x86-64

codebuddy_agent_sdk-0.3.146-py3-none-musllinux_1_1_aarch64.whl (43.9 MB view details)

Uploaded Python 3musllinux: musl 1.1+ ARM64

codebuddy_agent_sdk-0.3.146-py3-none-manylinux_2_17_x86_64.whl (47.1 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ x86-64

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

Uploaded Python 3manylinux: glibc 2.17+ ARM64

codebuddy_agent_sdk-0.3.146-py3-none-macosx_11_0_arm64.whl (30.7 MB view details)

Uploaded Python 3macOS 11.0+ ARM64

codebuddy_agent_sdk-0.3.146-py3-none-macosx_10_12_x86_64.whl (33.1 MB view details)

Uploaded Python 3macOS 10.12+ x86-64

File details

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

File metadata

  • Download URL: codebuddy_agent_sdk-0.3.146-py3-none-win_amd64.whl
  • Upload date:
  • Size: 49.6 MB
  • Tags: Python 3, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.6 {"installer":{"name":"uv","version":"0.10.6","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.146-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 c8439fcf34bde5e9286808c565fdc32f1e1fdb24249ff2c6b6eabf166d094b16
MD5 c49037dcc9a807727e2c847aeec85b28
BLAKE2b-256 e5a31b9699cd6cc786fa3ed5f2fecd32854363dc67938009b00fb64aa4a8ad0a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: codebuddy_agent_sdk-0.3.146-py3-none-musllinux_1_1_x86_64.whl
  • Upload date:
  • Size: 44.3 MB
  • Tags: Python 3, musllinux: musl 1.1+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.6 {"installer":{"name":"uv","version":"0.10.6","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.146-py3-none-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 89dc73ad4606dababa167fd6267c89c5b3241ffa7cc612701162c767ed49a36d
MD5 8e143570d5b1788f4549ff2c6382be3b
BLAKE2b-256 75c53f06a52c51ca049a59562c0ca589bb66cb42f94d3d0d9944c5bed255c6fd

See more details on using hashes here.

File details

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

File metadata

  • Download URL: codebuddy_agent_sdk-0.3.146-py3-none-musllinux_1_1_aarch64.whl
  • Upload date:
  • Size: 43.9 MB
  • Tags: Python 3, musllinux: musl 1.1+ ARM64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.6 {"installer":{"name":"uv","version":"0.10.6","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.146-py3-none-musllinux_1_1_aarch64.whl
Algorithm Hash digest
SHA256 aed4d3d690248e74b46b90ed9f7e5e4bb538e3721d35a641a20b2db22d49bac6
MD5 d71761d11a8c973b5a7181e55387d577
BLAKE2b-256 a5c0b4bb122ece0c488284003faefb914fa537555e4d3d8874f4299c4631d07f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: codebuddy_agent_sdk-0.3.146-py3-none-manylinux_2_17_x86_64.whl
  • Upload date:
  • Size: 47.1 MB
  • Tags: Python 3, manylinux: glibc 2.17+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.6 {"installer":{"name":"uv","version":"0.10.6","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.146-py3-none-manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 aa24b6a03070e194251e4ede79f8b1d533726bf55d6f80b8593893944cce7439
MD5 3cc7cc202f08160765c4c7e89207907f
BLAKE2b-256 16176c725ea87db6b17423ae6d59b2b4a537750c7cd05bba3a7d040e4c308ef4

See more details on using hashes here.

File details

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

File metadata

  • Download URL: codebuddy_agent_sdk-0.3.146-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.10.6 {"installer":{"name":"uv","version":"0.10.6","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.146-py3-none-manylinux_2_17_aarch64.whl
Algorithm Hash digest
SHA256 6ba78cfd4d1a6270c5ecbca0c5ede983d911ce56a9f0d97dbf8626cb04699fec
MD5 87dd75f8d78eace8248b6802e65f9708
BLAKE2b-256 714df4561c46a95ac5c754f10de7bec885d6dcf96dab039b8e8198cf719643f6

See more details on using hashes here.

File details

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

File metadata

  • Download URL: codebuddy_agent_sdk-0.3.146-py3-none-macosx_11_0_arm64.whl
  • Upload date:
  • Size: 30.7 MB
  • Tags: Python 3, macOS 11.0+ ARM64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.6 {"installer":{"name":"uv","version":"0.10.6","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.146-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 6d5f171405a926b11352ee7098cc702616ff7b387186f98e57c2bf731d1fbeb3
MD5 bd8acb28d20389ad95d98fa900765edb
BLAKE2b-256 9897afaf7806a490e47ed1522517e296e23b248ea70ede4367c9a672b961d98f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: codebuddy_agent_sdk-0.3.146-py3-none-macosx_10_12_x86_64.whl
  • Upload date:
  • Size: 33.1 MB
  • Tags: Python 3, macOS 10.12+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.6 {"installer":{"name":"uv","version":"0.10.6","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.146-py3-none-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 dff4756cc39bb04e7db8b354531f623f2946e0c02c14096c8de38d9615dccbba
MD5 9b0c2a119a655e0c37864f9aadb346c4
BLAKE2b-256 e3bb596f73c18de8861462799fbcca62ad9b95a5d41f48c8c07f340e522f6fd6

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