Agent session management for coding agents (Claude, Codex, Gemini) in tmux
Project description
doeff-agents
Agent session management for coding agents (Claude, Codex, Gemini) in tmux.
Installation
pip install doeff-agents
Quick Start
Python API
from doeff_agents import (
session_scope, monitor_session, send_message,
LaunchConfig, AgentType, SessionStatus
)
from pathlib import Path
config = LaunchConfig(
agent_type=AgentType.CLAUDE,
work_dir=Path("/path/to/project"),
prompt="Read the README and summarize the project",
)
# Context manager ensures cleanup on exit/exception
with session_scope("my-agent-session", config) as session:
while not session.is_terminal:
new_status = monitor_session(session)
if new_status:
print(f"Status changed to: {new_status}")
if session.status == SessionStatus.BLOCKED:
send_message(session, "Continue with the next step")
time.sleep(1)
CLI
# Launch an agent
doeff-agents run --agent claude --work-dir . --prompt "Fix the bug"
# List sessions
doeff-agents ps
# Attach to a session
doeff-agents attach my-session
# Stop a session
doeff-agents stop my-session
# Monitor a session
doeff-agents watch my-session
Features
- Tmux abstraction: Pythonic wrapper around tmux commands
- Adapter pattern: Protocol-based adapters for different agents
- Status monitoring: Detect agent state from pane output
- Session lifecycle: Create, monitor, send, capture, kill
- Async support: Both sync and async APIs
- Context managers: Safe cleanup on exceptions/cancellation
Supported Agents
- Claude Code (
claude) - OpenAI Codex (
codex) - Gemini CLI (
gemini)
License
MIT
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
doeff_agents-0.1.1.tar.gz
(64.8 kB
view details)
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 doeff_agents-0.1.1.tar.gz.
File metadata
- Download URL: doeff_agents-0.1.1.tar.gz
- Upload date:
- Size: 64.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0b40df5b1677013cd607b2a524b8865cd4b3dc666843db0caf56c77f8586083c
|
|
| MD5 |
9b40d9d0b90ee1ff760b41d5d195ad43
|
|
| BLAKE2b-256 |
f545fd5fa3b5e8bb0c98d41e97e5b271772be078cda9ebe43cdbfd2b7d7084fd
|
File details
Details for the file doeff_agents-0.1.1-py3-none-any.whl.
File metadata
- Download URL: doeff_agents-0.1.1-py3-none-any.whl
- Upload date:
- Size: 48.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9543fc6028e96282fd28e80c39b156ea7babfb3f58081c51159810bb7ba09ce6
|
|
| MD5 |
a0eb2e753de5537b0e29213eff122c44
|
|
| BLAKE2b-256 |
674fef2e3308b2500d8e9873b4bf32b6c6971f53ece8df83d5184b02e11f0b29
|