Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

kcastle-agent

A minimal OpenAI Responses Agent core with optional harness infrastructure.

from openai import AsyncOpenAI

from pathlib import Path

from kagent import Agent, Session

session = Session.create(Path.home() / ".kcastle" / "sessions")

agent = Agent(
    client=AsyncOpenAI(),
    model="gpt-5.6-sol",
    instructions="You are a helpful agent.",
    state=session.state,
    commit=session.commit,
)

async for event in agent.run("Hello"):
    print(event)

Agent is the brain: it owns causal State, the loop, steering, follow-ups, cancellation, events, and compaction. kagent.harness surrounds it with Session persistence, an explicit Env, and executable ToolRuntime adapters. User interfaces render events and provide approvals only. When one model response contains multiple function calls, execute_tool may run concurrently; custom executors must be safe for concurrent use.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

kcastle_agent-0.1.0a3.tar.gz (11.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

kcastle_agent-0.1.0a3-py3-none-any.whl (17.1 kB view details)

Uploaded Python 3

File details

Details for the file kcastle_agent-0.1.0a3.tar.gz.

File metadata

  • Download URL: kcastle_agent-0.1.0a3.tar.gz
  • Upload date:
  • Size: 11.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.12.2 {"installer":{"name":"uv","version":"0.12.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for kcastle_agent-0.1.0a3.tar.gz
Algorithm Hash digest
SHA256 3bcd9eb3d6f9d2b5b0fc6d3e19cbc7206ab7a0661ba06a4a20d07ce7278a8d16
MD5 2a0edfc92bd498a0c65939cf2f9b0f03
BLAKE2b-256 35fe7584bb4fc3f82743961f06b54cd2b02439aac92e4ea6db01939fa04bc943

See more details on using hashes here.

File details

Details for the file kcastle_agent-0.1.0a3-py3-none-any.whl.

File metadata

  • Download URL: kcastle_agent-0.1.0a3-py3-none-any.whl
  • Upload date:
  • Size: 17.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.12.2 {"installer":{"name":"uv","version":"0.12.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for kcastle_agent-0.1.0a3-py3-none-any.whl
Algorithm Hash digest
SHA256 8fca4cc6392625078078819a384ecf3b6b95484e25f5b947764c2fe7b28316a0
MD5 595797c2666c009cb5a456ab840e3c4f
BLAKE2b-256 fb5af00a881d5099280c1a204d1bccdcefebb0aee82a03179d7e5ac4d7955cfd

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