feat: migrate agents to monorepo and update federation configs

This commit is contained in:
2026-07-17 21:15:33 +02:00
parent 38a9a11772
commit 8db07e5d21
10 changed files with 256 additions and 18 deletions
+24
View File
@@ -0,0 +1,24 @@
# Agent Rules
## Model Selection Advisor
Whenever you receive a new user request or begin a new task, you MUST invoke the `model_advisor` skill to evaluate the optimal model and tool strategy before proceeding with any significant planning or code modifications.
## OKF Knowledge Base Access
Whenever the user asks you to search, query, access, or update their "knowledge", "OKF", or "Wissensdatenbank", you MUST use the custom `ctx-guard` CLI tool.
The tool is executed from the Orchestrator's virtual environment: `/home/andre/coden/Orchestrator/.venv/bin/ctx-guard knowledge`.
**Available commands:**
- `search`: e.g., `/home/andre/coden/Orchestrator/.venv/bin/ctx-guard knowledge search "query" --limit 5`
- `capture`: e.g., `/home/andre/coden/Orchestrator/.venv/bin/ctx-guard knowledge capture "Note" --context privat`
- `status`: e.g., `/home/andre/coden/Orchestrator/.venv/bin/ctx-guard knowledge status`
- `ingest`: e.g., `/home/andre/coden/Orchestrator/.venv/bin/ctx-guard knowledge ingest`
Always run this command directly using your `run_command` tool to retrieve or update knowledge before answering the user's queries.
## PR Workflow Rule
All code changes or configurations made by agents MUST go through a Pull Request / Merge Request.
- You are not allowed to do quicksaves directly to the main branch.
- You must create a new branch, commit your changes, push to the remote, and open a PR.
- After creating the PR, you must review it for viability and only merge it once confirmed.
+11
View File
@@ -0,0 +1,11 @@
{
"last_updated": "2026-07-16T20:12:30Z",
"providers": {
"codex": {
"models": []
},
"antigravity": {
"models": []
}
}
}
+22
View File
@@ -0,0 +1,22 @@
#!/bin/bash
# check_quotas.sh - Modular script to check quotas
export PATH="$HOME/.local/bin:$PATH"
check_codex_quota() {
if command -v codex &> /dev/null; then
echo "[Codex Quota]"
codex quota || echo "Failed to fetch Codex quota"
fi
}
check_agy_quota() {
if command -v agy &> /dev/null; then
echo "[Antigravity Quota]"
agy quota || echo "Failed to fetch Antigravity quota"
fi
}
echo "--- Current Quotas ---"
check_codex_quota
check_agy_quota
echo "----------------------"
+23
View File
@@ -0,0 +1,23 @@
#!/bin/bash
# install_clis.sh - Install configured CLIs
set -e
echo "Starting CLI installations..."
echo "Checking codex..."
if command -v codex &> /dev/null; then
echo "codex is already installed. Version: $(codex --version 2>/dev/null || echo 'unknown')"
else
echo "Installing codex via curl..."
curl -fsSL https://chatgpt.com/codex/install.sh | sh
echo "codex installed successfully."
fi
echo "Checking agy (antigravity)..."
if command -v agy &> /dev/null; then
echo "agy is already installed."
else
echo "Warning: agy is not installed. Please install it manually."
fi
echo "All CLIs are set up."
+23
View File
@@ -0,0 +1,23 @@
#!/bin/bash
# setup_apis.sh - Trigger browser login flows
set -e
export PATH="$HOME/.local/bin:$PATH"
CLIS=("codex" "agy")
echo "Starting API Configuration via Browser Login..."
for cli in "${CLIS[@]}"; do
echo "Configuring $cli..."
if command -v "$cli" &> /dev/null; then
if [ "$cli" == "agy" ]; then
"$cli" auth
else
"$cli" login
fi
echo "$cli configured."
else
echo "Warning: $cli not installed. Please run install_clis.sh first."
fi
done
echo "API setup complete."
+35
View File
@@ -0,0 +1,35 @@
#!/bin/bash
# update_models_config.sh - Fetches latest models and quotas
export PATH="$HOME/.local/bin:$PATH"
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
CONFIG_FILE="$DIR/../models_config.json"
echo "{" > "$CONFIG_FILE"
echo " \"last_updated\": \"$(date -u +%Y-%m-%dT%H:%M:%SZ)\"," >> "$CONFIG_FILE"
# Logic to update config
echo " \"providers\": {" >> "$CONFIG_FILE"
# Codex Models
echo " \"codex\": {" >> "$CONFIG_FILE"
if command -v codex &> /dev/null; then
echo " \"models\": $(codex models --json 2>/dev/null || echo '[]')" >> "$CONFIG_FILE"
else
echo " \"models\": []" >> "$CONFIG_FILE"
fi
echo " }," >> "$CONFIG_FILE"
# Antigravity Models
echo " \"antigravity\": {" >> "$CONFIG_FILE"
if command -v agy &> /dev/null; then
echo " \"models\": $(agy models --json 2>/dev/null || echo '[]')" >> "$CONFIG_FILE"
else
echo " \"models\": []" >> "$CONFIG_FILE"
fi
echo " }" >> "$CONFIG_FILE"
echo " }" >> "$CONFIG_FILE"
echo "}" >> "$CONFIG_FILE"
echo "Models config updated at $CONFIG_FILE"
+35
View File
@@ -0,0 +1,35 @@
---
name: model_advisor
description: Evaluates a task and orchestrates execution across available CLI models based on cost, quotas, and strengths.
---
# Instructions
You have been invoked to act as a central orchestrator. You must evaluate the task, check available models and quotas, and delegate the work via CLI.
## Step 1: Check Quotas & Models
Run the following scripts from your workspace:
- `.agents/scripts/check_quotas.sh`
- Review `.agents/models_config.json` to see currently available models.
## Step 2: Evaluate the Task
Consider the following criteria:
1. **Complexity & Context**: Does it require massive context (Gemini Pro) or deep nuance (Claude Sonnet)?
2. **Cost & Quota**: Are quotas low? Use cheaper models if the task is simple.
## Step 3: Output a Recommendation & Delegate
If the task is best suited for a CLI-driven model (e.g., Codex or Antigravity with a specific model), you MUST proactively write and execute the terminal command to delegate the task.
Example output:
> [!TIP]
> **Model Advisor Recommendation**: The quota for Antigravity is healthy. I am delegating this refactoring task to Claude 3.5 Sonnet via the CLI.
Example command you might run:
```bash
agy run --model claude-3-5-sonnet "refactor the payment gateway"
```
If the task is best suited for the *current* IDE model, advise the user to proceed normally without CLI delegation. If it's suited for an IDE model you are *not* currently using, advise the user to switch models manually in the IDE.
## Step 4: Proceed
Once the CLI command completes, or if you decided to handle it locally, complete the user's request.