Bog Agents — a still-water agent framework. Patient by default, opinionated where it matters, batteries included. Build agents on top of any major LLM provider (Anthropic, OpenAI, Bedrock, Google, Mistral, Groq, DeepSeek) or run local with Ollama. 80+ middlewares, real subagents, file-system + shell + sandbox backends, MCP tooling, a typed config surface. Built on LangGraph; pass through in harmony.
Project description
Bog Agents
Patient as still water. Opinionated where it matters. Pass through in harmony.
The Python SDK underneath bog-agents-cli and
bog-agents-daemon — and an
SDK in its own right when you want to build agents that aren't a CLI.
One create_agent() call gets you a compiled LangGraph agent with file tools, a shell,
git, sub-agents, plan mode, auto-quality checks, retry-with-backoff against transient
provider failures, and 80-something composable middlewares. Pluggable backends. Any
tool-calling LLM. The defaults are deliberate — you ship something that works on day
one without writing scaffolding.
Philosophy
Most agent frameworks make you assemble the kit. We don't. Bog Agents starts you with a working agent and lets you peel away or bolt on layers as you understand what you actually need.
- Patient by default. Failures retry with bounded backoff. Hung commands time out. Provider hiccups don't kill the run.
- Opinionated where it matters. Secure-by-default backends, a memory-only secrets vault, structured logging at every chokepoint, panic dumps on uncaught exceptions.
- No ceremony.
create_agent()returns a compiledCompiledStateGraphyou can invoke. Plug it into your app. Done. - Composable. 80+ middlewares snap on or off. Subagents nest. Backends swap. The framework gets out of your way.
The bog is calm, deep, and unhurried. So is the agent.
Install
pip install bog-agents
Provider extras as needed:
pip install "bog-agents[anthropic]" # Claude
pip install "bog-agents[openai]" # GPT
pip install "bog-agents[bedrock]" # AWS Bedrock
pip install "bog-agents[google-genai]" # Gemini
pip install "bog-agents[ollama]" # local models
Or all of them: pip install "bog-agents[all-providers]".
30-second Quick Start
from bog_agents import create_agent
agent = create_agent(
model="anthropic:claude-sonnet-4-6",
system_prompt="You are a careful, concise software engineer.",
)
result = await agent.ainvoke({
"messages": [{"role": "user", "content": "List Python files in this repo."}]
})
print(result["messages"][-1].content)
That gets you: filesystem tools, shell execution, sub-agents, plan-mode, summarization middleware, prompt caching for Anthropic models, and the standard tool-call patcher. No additional setup.
With more knobs
from bog_agents import create_agent, FeatureConfig
from bog_agents.middleware import (
GitToolsMiddleware,
MemoryMiddleware,
ProviderRetryMiddleware,
SkillsMiddleware,
)
agent = create_agent(
model="anthropic:claude-sonnet-4-6",
config=FeatureConfig(
enable_audit_trail=True,
enable_cost_tracking=True,
budget_usd=5.0,
),
middleware=[
ProviderRetryMiddleware(max_attempts=3),
GitToolsMiddleware(),
MemoryMiddleware(sources=["./AGENTS.md"]),
SkillsMiddleware(sources=["./skills"]),
],
)
What's in the box
Backends
Pluggable filesystems and shells. Pick one or compose them.
| Backend | Use when |
|---|---|
StateBackend (default) |
Agent reads / writes happen in graph state. Great for sandboxed tests. |
FilesystemBackend |
Real filesystem. Path traversal blocked by virtual_mode=True (the default since 0.8.0). |
LocalShellBackend |
Filesystem + shell execution on the host. UTF-8 stdout decoding, configurable timeouts, stdin=/dev/null so interactive prompts can't hang the agent. |
CompositeBackend |
Route different path prefixes to different backends. |
SandboxBackend |
Modal / Daytona / RunLoop / LangSmith remote sandboxes. |
Middlewares (selected)
ProviderRetryMiddleware— bounded exponential backoff with jitter on transient provider errors (5xx, timeouts, connection resets). Never retries tool calls.MemoryMiddleware— loadAGENTS.mdfiles into the system prompt. 64 KiB cap;</agent_memory>close-tags neutralized to prevent prompt-injection forgery.SkillsMiddleware— bundle reusable agent skills with metadata.GitToolsMiddleware— git status / log / diff / blame; opt-in commit / push.SubAgentMiddleware— recursive task decomposition with typed subagent specs.PlanModeMiddleware— structured plan-then-execute flow.SummarizationMiddleware— token-aware history compression.AnthropicPromptCachingMiddleware— automatic prompt-cache breakpoints.HumanInTheLoopMiddleware— pause-and-confirm for risky tool calls.AuditTrailMiddleware— structured records of every agent decision.RBACMiddleware/DLPMiddleware— access control + data-loss prevention.
Plus 60+ more for cost tracking, citations, hooks, MCP tools, agent teams, parallel
worktrees, hot-reload skills, regulatory alerts, and more. Browse them under
bog_agents.middleware.
Providers
| Provider | Extra | Notes |
|---|---|---|
| Anthropic | anthropic |
Default. Claude 4.6 / 4.7 with prompt caching. |
| OpenAI | openai |
Responses API by default. |
| AWS Bedrock | bedrock |
Claude / Llama / Titan via bedrock: prefix. |
google-genai |
Gemini family. | |
| Mistral | mistralai |
|
| Groq | groq |
|
| DeepSeek | deepseek |
|
| Fireworks | fireworks |
|
| Baseten | baseten |
|
| xAI | xai |
|
| Ollama | ollama |
Local models. |
Pass model="provider:model-id" and create_agent does the rest.
Async first, sync if you want it
# Async — recommended
result = await agent.ainvoke({"messages": [...]})
# Sync — works fine too
result = agent.invoke({"messages": [...]})
Streaming is supported via the standard LangGraph stream APIs.
What's new in 0.8.0
ProviderRetryMiddleware— bounded retries on transient provider failures.virtual_mode=Trueis now the default forFilesystemBackend(andLocalShellBackend). Path traversal blocked unless explicitly opted out.- Subprocess
stdin=/dev/nullinLocalShellBackend.execute()— interactive commands like Windowsdateget an immediate EOF instead of hanging. - Typed subagent validation at
create_agent()— typo'dname/description/system_promptfails fast instead of surfacing as aKeyErrorlater. FileOperationErrorLiteral extended withparent_not_found.MemoryMiddlewarecaps each AGENTS.md source at 64 KiB and neutralizes</agent_memory>close-tags (prompt-injection defense).
See CHANGELOG.md
for the full 0.8.0 entry.
When to use this vs. the CLI
- Use the SDK when you're embedding an agent in a Python application, building your own UI, writing tests, or composing agents into a larger system.
- Use
bog-agents-cliwhen you want a coding agent in your terminal right now with no Python wiring. - Use
bog-agents-daemonwhen you want agents that wake themselves on cron / file changes / webhooks / git pushes.
Documentation
- Architecture overview:
CLAUDE.md - Middleware index: read the docstrings under
bog_agents.middleware - Sample agents:
bog_agents/bundled_agents/ - Repo: https://github.com/bogware/bog-agents
- Issues: https://github.com/bogware/bog-agents/issues
License
MIT. See LICENSE.
Pass through in harmony.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file bog_agents-0.8.2.tar.gz.
File metadata
- Download URL: bog_agents-0.8.2.tar.gz
- Upload date:
- Size: 392.8 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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
33b677be65a46a675828df54fc1fb15ef9d7d976fce974836f044b97229a9006
|
|
| MD5 |
f5695c036b491ac887657e1cc917cdb7
|
|
| BLAKE2b-256 |
efa7990f3b7b4afe531d5958f1f5f5e19e6f721f4dfd582d8d010bc267b8a98c
|
File details
Details for the file bog_agents-0.8.2-py3-none-any.whl.
File metadata
- Download URL: bog_agents-0.8.2-py3-none-any.whl
- Upload date:
- Size: 474.5 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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b63370828e4de353ed1b48339239e53eb6fa3530402769e16b62879601b79e18
|
|
| MD5 |
c81ed1796fb54710c0df47c6ca0ad808
|
|
| BLAKE2b-256 |
33ef986fe51925318f2ffaa22be96e59e61a5d4d2fded723fa9d81701e6e8d32
|