Doraemon Cyber Team — Multi-server Ollama agent
Project description
DCT Agent — Doraemon Cyber Team
Multi-server Ollama agent · v3.1 made by baba01hacker
Install
Stable Release (PyPI)
Install the stable version from PyPI using pip or pipx:
# Using pip
pip install dct-agent
# Using pipx (recommended for CLI apps)
pipx install dct-agent
Latest Development Version (GitHub)
Install the latest version directly from GitHub:
# Using pipx (recommended)
pipx install git+https://github.com/Baba01hacker666/dct-agent.git
# Using pip
pip install git+https://github.com/Baba01hacker666/dct-agent.git
Once installed, launch the interactive CLI:
dct
# or as a module:
python -m dct
Quick Start
# Register servers
python -m dct add localhost 11434 local
python -m dct add 192.168.1.10 11434 home "home lab box"
python -m dct add 10.0.0.5 11434 vps1 "DigitalOcean"
# Probe all
python -m dct probe
# List all models across servers
python -m dct models
# Launch interactive shell
python -m dct
Shell Commands
Server Management
| Command | Description |
|---|---|
/servers |
List all servers with status, latency, model count |
/add <host> <port> [alias] [note] |
Register + probe a new server |
/remove <alias|#> |
Unregister a server |
/probe |
Probe all servers in parallel |
/probe <alias|#> |
Detailed probe of one server (all endpoints) |
/use <alias|#> |
Switch active server |
Model Management
| Command | Description |
|---|---|
/models |
Models on active server |
/models <alias|#> |
Models on specific server |
/allmodels |
All models across all servers |
/model <n> |
Switch model |
/pull <model> |
Pull on active server |
/pull <alias|#> <model> |
Pull on specific server |
/delete <model> |
Delete from active server |
/show <model> |
Model info, system prompt, modelfile |
Chat & Session
| Command | Description |
|---|---|
/clear |
Clear history |
/history |
Turn count + token estimate |
/system <prompt> |
Set system prompt |
/prompts |
List built-in system prompt presets |
/prompt <name> |
Apply a built-in system prompt preset |
/copy |
Copy transcript to clipboard (fallback prints text) |
/save <file> |
Save conversation JSON |
/load <file> |
Resume saved conversation |
/status |
Full server table |
Advanced Agent Control
| Command | Description |
|---|---|
/rewind or /back |
Rewind conversation by 1 turn (drop last user prompt and AI response) |
/retry |
Rewind conversation and immediately resend the last user prompt |
/editai |
Open the last AI response in an interactive editor to manually steer the agent |
/commit |
Generate a conventional Git commit message for staged files using the AI model |
Agent Mode
| Command | Description |
|---|---|
/agent |
Toggle agent mode ON/OFF (ON by default on startup) |
/agent status |
Show current state |
Agent mode is active by default. You can disable it on startup using the --no-agent CLI flag.
When agent mode is ON, the model autonomously calls tools:
run_python— execute Pythonrun_bash— execute bashrun_shell— shell commandread_file— read file (supports<start_line>,<end_line>, and<tail>slicing to save context)write_file— write/create file (includes Python syntax validation viaast)patch_file— find+replace in file (includes Python syntax validation viaast)list_dir— list directorytree— directory treefetch_url— fetch a URLweb_search— DuckDuckGo searchrun_subagent— spawn a sub-agent to delegate a sub-task (accepts<instruction>, optional<model>, optional<system_prompt>)
Direct Tools (no model)
| Command | Description |
|---|---|
/run python <code> |
Execute Python directly |
/run bash <code> |
Execute bash directly |
/read <path> |
Read and display file |
/write <path> |
Write file (interactive) |
/fetch <url> |
Fetch URL |
/search <query> |
Web search |
Broadcast
| Command | Description |
|---|---|
/broadcast <message> |
Send to ALL online servers simultaneously |
/bc <message> |
Same |
Side Queries (BTW)
| Command | Description |
|---|---|
/btw <question> |
Ask the active model a side question using current context without modifying the session history |
Model Router
The router picks the best server automatically:
- Preferred alias + model (if specified)
- Fastest online server that has the requested model
- Any online server (uses its first model)
Failover is automatic — if the active server dies mid-chat, the agent reprobes and jumps to the next available server.
Reliability & Resilience
Built for long-running autonomous tasks, DCT Agent implements professional-grade resilience:
- Context Pruning & Summarization: A sliding window monitors the context token size. When it gets too large (~30k tokens), the agent drops older tool executions and autonomously makes a secondary API call to summarize the dropped interactions. This summary is injected as a persistent memory, preventing token exhaustion while maintaining high-level task awareness.
- Network Retry Backoff: All requests use a robust HTTP session that automatically intercepts transient API errors (
429 Too Many Requests,502 Bad Gateway,503 Service Unavailable) and retries with an exponential backoff.
Server Registry
Servers persist in ~/.config/dct/servers.json. Add once, use everywhere.
Requirements
rich>=13.0
requests>=2.31
Python>=3.11
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 dct_agent-3.1.0.tar.gz.
File metadata
- Download URL: dct_agent-3.1.0.tar.gz
- Upload date:
- Size: 52.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
07ce2f1f83316dbb1bd02d151ad221f55049de00f306d1708a37c2da43b3ca9d
|
|
| MD5 |
c10312189be322c682c078ea530c51fc
|
|
| BLAKE2b-256 |
857b14e35ce811c1d4a94745dd561ba6d9094cb67db11fc98cfab5f34f5f4748
|
Provenance
The following attestation bundles were made for dct_agent-3.1.0.tar.gz:
Publisher:
publish.yml on Baba01hacker666/dct-agent
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
dct_agent-3.1.0.tar.gz -
Subject digest:
07ce2f1f83316dbb1bd02d151ad221f55049de00f306d1708a37c2da43b3ca9d - Sigstore transparency entry: 1858311746
- Sigstore integration time:
-
Permalink:
Baba01hacker666/dct-agent@794878ab5d2ab4d813cc84e46d6be3891aa5bb25 -
Branch / Tag:
refs/tags/v3.1.0 - Owner: https://github.com/Baba01hacker666
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@794878ab5d2ab4d813cc84e46d6be3891aa5bb25 -
Trigger Event:
push
-
Statement type:
File details
Details for the file dct_agent-3.1.0-py3-none-any.whl.
File metadata
- Download URL: dct_agent-3.1.0-py3-none-any.whl
- Upload date:
- Size: 54.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c44805c2b43e43d68c239ea7e2608a2e86ba475441982c52a673b52a30ec15b6
|
|
| MD5 |
c503ac508722a5f702c0a0befd2eb5f9
|
|
| BLAKE2b-256 |
7a2fa46fe8023fc398d3343f9901a21e35ee8a55f64ede8179154f6a99eb5c0a
|
Provenance
The following attestation bundles were made for dct_agent-3.1.0-py3-none-any.whl:
Publisher:
publish.yml on Baba01hacker666/dct-agent
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
dct_agent-3.1.0-py3-none-any.whl -
Subject digest:
c44805c2b43e43d68c239ea7e2608a2e86ba475441982c52a673b52a30ec15b6 - Sigstore transparency entry: 1858311754
- Sigstore integration time:
-
Permalink:
Baba01hacker666/dct-agent@794878ab5d2ab4d813cc84e46d6be3891aa5bb25 -
Branch / Tag:
refs/tags/v3.1.0 - Owner: https://github.com/Baba01hacker666
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@794878ab5d2ab4d813cc84e46d6be3891aa5bb25 -
Trigger Event:
push
-
Statement type: