Releases: khive-ai/khive.d
v0.3.3
khive 0.3.3 - Extensibility & Integration
Release Date: 2025-05-23
🚀 Major Features
Custom Script Integration
Transform khive from a tool into a platform. All core commands now support custom script overrides, enabling teams to implement specialized workflows while maintaining the khive interface.
📂 .khive/scripts/
Directory
khive_init.sh
- Custom initialization workflowskhive_fmt.sh
- Custom formatting pipelineskhive_ci.sh
- Custom CI/CD implementations
✨ Benefits
- Complete Control: Override any built-in behavior with team-specific logic
- Gradual Adoption: Migrate piece-by-piece from existing workflows
- Standardized Interface: Maintain consistent CLI experience across custom implementations
- Environment Integration: Receive rich context via
KHIVE_*
environment variables
# Your custom scripts take precedence automatically
khive init # Runs .khive/scripts/khive_init.sh if present
khive fmt # Runs .khive/scripts/khive_fmt.sh if present
khive ci # Runs .khive/scripts/khive_ci.sh if present
NEW: MCP (Model Context Protocol) Integration
Brand new MCP server management brings AI-native tooling directly into your development workflow.
🔌 Native MCP Support
- Server lifecycle management (start, stop, monitor)
- Tool discovery and execution
- Persistent connection handling
- Security controls with allowlists
🛠️ Natural CLI Experience
# Server management
khive mcp list
khive mcp status filesystem
khive mcp tools database
# Natural tool execution (no more JSON strings!)
khive mcp call filesystem read_file --path config.json
khive mcp call database query --sql "SELECT * FROM users"
khive mcp call api request --method POST --var data='{"key":"value"}'
⚙️ Configuration-Driven
{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem"],
"alwaysAllow": ["read_file", "write_file"]
}
}
}
🔧 Enhancements
Improved CLI Ergonomics
- Natural Arguments: MCP tool calls use standard CLI patterns (
--key value
) instead of JSON strings - Type-Safe Parsing: Automatic JSON detection for complex values while keeping simple strings simple
- Mixed Formats: Combine
--flags
,--var key=value
, and--json
as needed
Enhanced Security
- Script Validation: Custom scripts must be executable regular files
- MCP Security: Tool allowlists and execution timeouts
- Environment Isolation: Clean environment variable scoping
Better Developer Experience
- Rich Error Messages: Detailed failure context with recovery suggestions
- Verbose Logging: Comprehensive execution tracing with
--verbose
- JSON Output: Machine-readable output for all commands with
--json-output
📋 Full Changes
New Features
- ✨ Custom script support for
khive init
,khive fmt
, andkhive ci
- ✨ NEW: Complete MCP (Model Context Protocol) integration with
khive mcp
command - ✨ NEW: Natural CLI argument parsing for MCP tool calls
- ✨ NEW: MCP server lifecycle management (start, stop, monitor)
- ✨ NEW: Tool discovery and execution for MCP servers
- ✨ Rich environment variable context for custom scripts
- ✨ Security controls with tool allowlists for MCP operations
Improvements
- 🔧 Enhanced error handling across all commands
- 🔧 Consistent
--dry-run
support for safe operation preview - 🔧 Improved
--verbose
logging with execution context - 🔧 Better JSON output formatting for automation
- 🔧 Cross-platform compatibility improvements
Documentation
- 📚 Complete MCP integration guide
- 📚 Custom script development patterns
- 📚 Security best practices
- 📚 Migration guide from previous versions
🔄 Migration from 0.3.2
No Breaking Changes
All existing workflows continue to work unchanged. New features are opt-in additions.
Optional Enhancements
1. Add Custom Scripts (Optional)
# Create custom script directory
mkdir -p .khive/scripts
# Example: Custom CI with additional checks
cat > .khive/scripts/khive_ci.sh << 'EOF'
#!/bin/bash
echo "Running custom CI pipeline..."
# Your custom logic here
# Environment variables: KHIVE_PROJECT_ROOT, KHIVE_DRY_RUN, etc.
EOF
chmod +x .khive/scripts/khive_ci.sh
2. Configure MCP Servers (New Feature)
# Create MCP configuration for the new khive mcp command
mkdir -p .khive/mcps
cat > .khive/mcps/config.json << 'EOF'
{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem", "/path/to/workspace"],
"alwaysAllow": ["read_file", "list_directory"]
}
}
}
EOF
# Start using the new MCP integration
khive mcp list
khive mcp tools filesystem
Configuration Updates
- New:
.khive/scripts/
directory for custom implementations - New:
.khive/mcps/
directory for MCP server configurations - New:
khive mcp
command with full MCP protocol support - All existing configurations remain compatible
🎯 Use Cases
Team Workflow Standardization
# Custom init for company-specific setup
# .khive/scripts/khive_init.sh handles:
# - Company package registry configuration
# - Internal tool installation
# - Security compliance setup
khive init --stack python --extra security
AI-Enhanced Development
# Use MCP tools for AI-assisted development
khive mcp call codebase analyze --path src/ --focus security
khive mcp call documentation generate --module auth --format markdown
Advanced CI/CD Pipelines
# Custom CI with specialized requirements
# .khive/scripts/khive_ci.sh handles:
# - Security scanning
# - Performance benchmarks
# - Deployment verification
khive ci --verbose --json-output
🚀 What's Next
This release establishes khive as an extensible development platform. Future releases will expand on:
- MCP Ecosystem: Additional built-in MCP server integrations
- Script Templates: Common custom script patterns and examples
- Team Features: Shared configurations and collaborative workflows
- IDE Integration: Enhanced editor support for khive workflows
🙏 Community
Thanks to all contributors and early adopters who provided feedback on the extensibility patterns and MCP integration. Your input shaped this platform-defining release.
Get Started: pip install khive==0.3.3
Documentation: [khive.dev/docs](https://khive.dev/docs)
Community: [GitHub Discussions](https://github.com/khive-ai/khive.d/discussions)
khive 0.3.3 transforms your development environment from a collection of tools into a unified, extensible platform that grows with your team's needs.
What's Changed
- docs(architect): TDS for Issue #100: Migrate to lionfuncs by @ohdearquant in #108
- feat(research): Complete initial research report RR-86 for async testing by @ohdearquant in #111
- Docs (Architecture): TDS for Layered Resource Control (Issue #80) by @ohdearquant in #112
- docs(reader): Add comprehensive documentation for Reader Microservice by @ohdearquant in #114
- Docs: Research Report for docling (Issue #27) by @ohdearquant in #118
- Docs: Research Report RR-104 for CI and Prompt Enhancements by @ohdearquant in #121
- feat(reader): Design pydapter ingestion pipeline for Issue #26 by @ohdearquant in #119
- Fix(cli): Improve error messages for new-doc command (#103) by @ohdearquant in #120
- docs(reports): move memo to dedicated directory by @ohdearquant in #122
- Feat/add khive mcp by @ohdearquant in #144
- refactor: remove obsolete khive_fmt.sh script and update model names … by @ohdearquant in #145
Full Changelog: v0.3.2...v0.3.3
v0.3.2
Refactored
- InfoService to make use of khive native concurrency primitives
What's Changed
- refactor(services,connections): Refactor InfoService to use Endpoint primitives (Issue #97) by @ohdearquant in #98
- chore: Bump version to 0.3.2 in pyproject.toml, init.py, and uv.lock by @ohdearquant in #99
Full Changelog: v0.3.1...v0.3.2
v0.3.1
Khive Version 0.3.1 Release Notes
Date: 2025-05-18
This release significantly enhances Khive's capabilities in managing asynchronous operations, API connections, and overall system resilience. Key improvements focus on robust resource lifecycle management, advanced error handling, efficient request queuing, precise rate limiting, and comprehensive documentation for these new features.
✨ New Features & Enhancements
-
Standardized Async Resource Lifecycle Management (Issue #85, PR #89):
- Introduced standardized patterns for managing the lifecycle of asynchronous resources, particularly within the
Endpoint
class and across provider implementations. - Ensures consistent and proper cleanup of resources, improving stability and preventing leaks.
- Introduced standardized patterns for managing the lifecycle of asynchronous resources, particularly within the
-
Robust Error Handling - Circuit Breaker & Retries (Issue #84, PR #90):
- Implemented a
CircuitBreaker
pattern to prevent cascading failures when interacting with external services. - Added sophisticated retry mechanisms with exponential backoff and jitter for transient errors, enhancing the resilience of API operations.
- Integrated these patterns into the
AsyncAPIClient
andEndpoint
classes.
- Implemented a
-
Bounded Async Queue with Backpressure (Issue #83, PR #91):
- Introduced a
BoundedQueue
andWorkQueue
system for managing API requests. - Features include configurable capacity, backpressure mechanisms to prevent overload, worker management, and lifecycle control.
- Integrated with the
Executor
framework for efficient task processing.
- Introduced a
-
Token Bucket Rate Limiting (Issue #82, PR #92):
- Implemented a precise Token Bucket algorithm for API rate control.
- Includes
TokenBucketRateLimiter
,EndpointRateLimiter
(for per-endpoint limits), andAdaptiveRateLimiter
(for dynamic adjustments based on API responses). - Integrated into the
RateLimitedExecutor
for fine-grained control over request rates.
-
Comprehensive Documentation (Issue #87, PR #93 & previous documentation PRs):
- Added extensive documentation for the new
connections
layer, includingEndpoint
,EndpointConfig
,HeaderFactory
,match_endpoint
, and theAsyncAPIClient
. - Consolidated and expanded documentation for core async patterns:
- Async Resource Management (
docs/core-concepts/async_resource_management.md
) - Resilience Patterns (Circuit Breaker, Retry, Rate Limiting) (
docs/core-concepts/resilience_patterns.md
) - Async Queue (
docs/core-concepts/async_queue.md
)
- Async Resource Management (
- Updated
README.md
to reflect new documentation structure and features.
- Added extensive documentation for the new
This release marks a major step forward in making Khive a more robust, resilient, and developer-friendly framework for interacting with various AI services.
What's Changed
- feat(clients): Implement robust async API client with resource management (Closes #81) by @ohdearquant in #88
- feat(clients,connections): Standardize async resource lifecycle management (Issue #85) by @ohdearquant in #89
- feat(clients,connections): Implement circuit breaker and retry patterns (Issue #84) by @ohdearquant in #90
- feat(clients): Implement bounded async queue with backpressure (Issue #83) by @ohdearquant in #91
- feat(clients): Implement token bucket rate limiting (Issue #82) by @ohdearquant in #92
- docs(connections): Add comprehensive documentation for connections layer by @ohdearquant in #93
- docs(connections): Improve formatting and readability in documentatio… by @ohdearquant in #95
- chore: Bump version to 0.3.1 in pyproject.toml, init.py, and uv.lock by @ohdearquant in #96
Full Changelog: v0.3.0...v0.3.1
v0.3.0
Removed
- Entire protocols folder, please use
pydapter.protocols
instead, almost identical codes
Relocated
- providers to be under connections/providers
- deprecated connections/api folder, and moved files under
connections
What's Changed
- Feat/update endpoint providers by @ohdearquant in #79
- Feat/remove protocols folder - BREAKING by @ohdearquant in #78
Full Changelog: v0.2.11...v0.3.0
v0.2.11
Modified
- updated response format, by adding a lot more thinking pattern descriptions and a mandatory multi thinking section that begins with
To increase our reasoning context, let us think from 5 random perspectives in random order....
What's Changed
- Feat/update response format by @ohdearquant in #77
Full Changelog: v0.2.10...v0.2.11
v0.2.10
What's Changed
- chore: bump version to 0.2.10 and update pydapter dependency to 0.1.5 by @ohdearquant in #76
Full Changelog: v0.2.9...v0.2.10
v0.2.9
Updated
- updated prompts to instruct modes not to commit when the
.khive
is in.gitignore
- added
--stack
--extra
flag tokhive init
, now you can dokhive init --stack uv --extra all
What's Changed
- feat(cli): add stack and extra options to khive init by @ohdearquant in #75
Full Changelog: v0.2.8...v0.2.9
v0.2.8
Added
- full test suites for protocols
- modified khive team prompts, added back git, gh cli guide
- added common pitfall guides
Modified
- reports are now under
.khive
folder, (so if add .khive into your .gitignore, these reports will be ignored)
To-use the new prompts
- update to latest khive
uv pip install -U khive
- delete the prompts folder in your
.khive
folder - run
khive roo
in project root - modified the project info in
.khive/prompts/roo_rules/rules/000_project_info.md
- run
khive roo
again
all set
What's Changed
- Test suite for Event protocol by @ohdearquant in #73
- feat(docs): Add Git & GitHub CLI Quick Reference Guide and update pro… by @ohdearquant in #74
Full Changelog: v0.2.7...v0.2.8
v0.2.7
Updated
prompts for khive team, now asking orchestrator to clean up the branch after merge.
What's Changed
- Feat/update import handle by @ohdearquant in #63
- Feat/update prompts by @ohdearquant in #66
Full Changelog: v0.2.5...v0.2.7
v0.2.5
Changes
- added khive service mcp, containing khive info service, and khive reader service
- replaced
fastmcp
dependency withkhivemcp
and removed the custom implementation of mcp inkhive
package - added
as_event
decorator, event is a wrapper around a callable, and this decorator will keep track of the metrics - added
Log
to base type - renamed
traits/
toprotocols/
- added async file handle to reader service
The following code will
- call foo
- keep track of execution duration, input, output
- automatically embed the input and output,
- save into qdrant db,
call_foo
collections
need to do docker compose up
and have the qdrant running first
from khive.protocols.event import as_event
from pydapter.extras.async_qdrant_ import AsyncQdrantAdapter
@as_event(
request_arg="request",
embed_content=True,
store=True,
storage_adapter=AsyncQdrantAdapter,
event_type="call_foo",
url="http://localhost:6333",
collection="call_foo"
)
async def foo():
...
event = await foo()
log = event.to_log()
MCP
simply add the following into your mcp config, and you can use khive services
{
"mcpServers": {
"khive-services": {
"command": "uv",
"args": [
"run",
"python",
"-m",
"khivemcp.cli",
"absolute-path-to/khived/mcps/configs/services.yaml"
],
"alwaysAllow": [
"khive-info_handle_request",
"khive-reader_handle_request"
],
"timeout": 600
}
}
}
What's Changed
- chore(project): updating license by @ohdearquant in #55
- Feat/introducing traits by @ohdearquant in #57
- Feat/add memory persist by @ohdearquant in #61
- Feat/refactor connections by @ohdearquant in #60
- Feat/update traits by @ohdearquant in #59
- chore: update version to 0.2.5 in project files and coverage configur… by @ohdearquant in #58
- fix(reader-service): implement async file operations and persistent storage by @ohdearquant in #62
Full Changelog: v0.2.4...v0.2.5