Skip to main content

Bog Agents - batteries-included agent harness for building AI agents. Supports any major provider (Anthropic, OpenAI, AWS Bedrock, Google, etc.) and local models via Ollama. Built on LangGraph.

Project description

Bog Agents

The Python SDK underneath bog-agents-cli and bog-agents-daemon. One create_agent() call gets you a compiled LangGraph agent with file tools, a shell, git, sub-agents, plan mode, auto-quality checks, and 80-some composable middleware. Pluggable backends. Any tool-calling LLM.

PyPI License Downloads


Install

pip install bog-agents
# or
uv add bog-agents

Python 3.11 or better. Bring your own provider package — Anthropic, OpenAI, AWS, Google, local Ollama, doesn't matter. Pick one or pick all of them.


First run

from bog_agents import create_agent

agent = create_agent()  # default: anthropic:claude-sonnet-4-6

result = agent.invoke(
    {"messages": [{"role": "user", "content": "Hello!"}]},
    config={"configurable": {"thread_id": "my-thread"}},
)

Pick whatever model you've got the keys for:

agent = create_agent(model="openai:gpt-5.4")
agent = create_agent(model="bedrock_converse:us.anthropic.claude-sonnet-4-6")
agent = create_agent(model="google_genai:gemini-2.5-pro")
agent = create_agent(model="ollama:gpt-oss:20b")  # local, free

What it does

Builds the agent. create_agent() returns a compiled LangGraph graph wired with whatever middleware stack you ask for. Default is sensible. Power users override every piece.

Talks to anything. Anthropic, OpenAI, AWS Bedrock, Google AI / Vertex AI, DeepSeek, Mistral, Groq, NVIDIA, Ollama, Cohere, xAI, Perplexity, Fireworks, OpenRouter, Together, HuggingFace — anything LangChain knows about, this handles.

Reads, writes, edits, runs, commits. Filesystem tools, shell tools, git tools — all pluggable. Local backend by default; swap in a remote sandbox (Modal, Daytona, Runloop, LangSmith) when you want isolation.

Sub-agents. Spawn child agents to parallelize work that doesn't need to share state.

Plan mode and checkpoints. Read-only plan mode for scouting; git-based snapshots before mutations so you can roll back without thinking about it.

Production hooks. bog_agents.serve.AgentServer exposes a REST + SSE API. bog-agents-daemon schedules ambient runs on cron, file-change, webhook, and git-push triggers. Built for the long haul, not just a demo.


A loaded example

When you want the whole posse:

from bog_agents import create_agent

agent = create_agent(
    model="anthropic:claude-sonnet-4-6",
    enable_git_tools=True,
    enable_repo_map=True,
    enable_checkpointing=True,
    enable_cost_tracking=True,
    enable_plan_mode=True,
    auto_lint=True,
    working_dir="/path/to/project",
)

result = await agent.ainvoke(
    {"messages": [{"role": "user", "content": "Fix the failing tests"}]},
    config={"configurable": {"thread_id": "my-session"}},
)

Middleware

Eighty-some pieces in the stack. Mix what you need; leave the rest in the wagon.

Middleware What it does
FilesystemMiddleware read / write / edit / multi-edit / glob / grep
GitToolsMiddleware status, diff, log, commit, add, branch, stash, blame, show
RepoMapMiddleware symbol-extracted code map (Python, JS, TS, Rust, Go, Java)
CheckpointingMiddleware git-based snapshot before mutations + diff/undo
CostTrackerMiddleware tokens, cost, budgets, effort levels
PlanModeMiddleware read-only mode that blocks mutating tools
AutoQualityMiddleware auto-lint / auto-test after edits with project detection
ArchitectMiddleware dual-model architect ↔ reviewer cross-talk
ParallelAgentsMiddleware concurrent sub-agent execution
LifecycleHooksMiddleware 15 event types for external tool integration
ContextPackingMiddleware structured context compression
SummarizationMiddleware auto-summarize when the context window fills
MemoryMiddleware persistent AGENTS.md memory across sessions
SkillsMiddleware custom skill / instruction loading
SafeToolsConfig per-tool auto-approval rules

Run as an HTTP server

For when something else needs to drive.

pip install 'bog-agents[serve]'
from bog_agents import create_agent
from bog_agents.serve import AgentServer

agent = create_agent()
server = AgentServer(agent)
server.run()  # http://127.0.0.1:8420

Endpoints out of the box:

GET  /health
GET  /info
GET  /openapi.json     <-- hand-rolled OpenAPI 3.0 schema; Swagger UI works
POST /invoke
POST /stream            <-- Server-Sent Events
POST /threads
GET  /threads
POST /threads/{id}/messages
GET  /threads/{id}/history

Companion packages

Package What it's for
bog-agents-cli TUI and non-interactive CLI. Drives an agent from your terminal.
bog-agents-daemon Ambient agent scheduler. Cron, file-watch, webhooks, git push.

All three release together with the same version number.


Security model

LocalShellBackend.execute() runs commands on the host with shell=True. No sandbox. No process isolation. That's by design — when you're in your own checkout you don't want a wall in the way. When you're running someone else's input, set up a remote sandbox backend (ModalBackend, DaytonaBackend, RunloopBackend, LangSmithBackend) and route the same agent through it.

The shell decodes child output as UTF-8 with errors='replace', so output containing checkmarks, ANSI escapes, or box-drawing characters never trips the Windows cp1252 reader. Recurring fix across 0.7.3.

For Bedrock specifically, the SDK's credential probe falls back from an expired SSO session to static ~/.aws/credentials keys automatically — see [models.providers.bedrock] auth_mode in the CLI's config.toml, or set BOG_AGENTS_BEDROCK_AUTH_MODE. New in 0.7.4.


Resources


Contributing

Contributing Guide. Conventional Commits required (feat:, fix:, etc.). 150-char line length. ruff + ty clean. Full test suite green per package, no fork-of-fork lineage drift.


License

MIT.


Saddle up.

Project details


Download files

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

Source Distribution

bog_agents-0.7.5.tar.gz (379.6 kB view details)

Uploaded Source

Built Distribution

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

bog_agents-0.7.5-py3-none-any.whl (461.8 kB view details)

Uploaded Python 3

File details

Details for the file bog_agents-0.7.5.tar.gz.

File metadata

  • Download URL: bog_agents-0.7.5.tar.gz
  • Upload date:
  • Size: 379.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.8 {"installer":{"name":"uv","version":"0.11.8","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 bog_agents-0.7.5.tar.gz
Algorithm Hash digest
SHA256 5517e095e23899348616a64c6e6818fdb31a1996e3d2acc5b4a00cc27fdfc843
MD5 c4179fc1031a58e72b6a77e1875e8fd6
BLAKE2b-256 4481923df07b8c669b094ce34b617b0a635c309650e48ccfad87b2ff6ce48816

See more details on using hashes here.

File details

Details for the file bog_agents-0.7.5-py3-none-any.whl.

File metadata

  • Download URL: bog_agents-0.7.5-py3-none-any.whl
  • Upload date:
  • Size: 461.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.8 {"installer":{"name":"uv","version":"0.11.8","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 bog_agents-0.7.5-py3-none-any.whl
Algorithm Hash digest
SHA256 523c0f69da42f35900ba8f464bdbf4319d8e66f319fdb55ad4da715b8244cb9a
MD5 0df4e8aa3ee554b8f1be1d607ae7914b
BLAKE2b-256 879c3af36a341ce7d129cb35c1bd4fc9432fd2597421f505ce4ddd2a523b7abb

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