agentleFS
agno-agiagno-agi/agentos-render/.agents/skills/extend-agent/SKILL.md

extend-agent

Skill5 starsChanged 2 days agoApache-2.0View on GitHub

User-driven loop to change an existing agent in this AgentOS — add a tool/MCP server/toolkit, add a capability (knowledge base, learning/memory, sub-agent, scheduled task), grow the safe Studio registry so components built at runtime gain a new capability, refine its instructions, or fix a specific known bug, verifying each change against the selected development runtime. Use whenever the user names a concrete change to an agent, or wants a new building block available to the platform. For agent hardening without a specific change in mind, use improve.

  • Reads credentials
  • Sends data out

We split this skill into the rules it gives an agent

9 rules. About 0 are common, 6 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈6

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Read AGENTS.md and inspect git status.

    line 16
  2. Distinctive:

    If setup is needed, follow setup-platform.

    line 21
  3. Distinctive:

    Keep the API in a persistent terminal and inspect that process's log.

    line 26
  4. Very specific:

    Check /health at the configured endpoint with its existing authentication.

    line 29
  5. Distinctive:

    Use the change already specified by the user.

    line 50
  6. Very specific:

    Search the agno-docs MCP (.mcp.json) for import path, constructor args, required env vars, pip deps.

    line 61
  7. Distinctive:

    Run Python in the selected Compose or host environment from Step 0, for example:

    line 63
  8. Distinctive:

    Verify proposed imports in that same environment before adding them to startup.

    line 72
  9. Very specific:

    Use --form-string for literal fields so semicolons and leading @ in user input are sent unchanged.

    line 116

≈ “Common” is an estimate: at least 1 in 5 of the 308,232 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Extend an Agent

Coding-agent workflow: run as /extend-agent or by describing the task.

Implement the concrete requested change and verify the affected behavior. Use improve for broader agent hardening when requested; a narrow change does not require a separate hardening campaign.

0. Select the development runtime

Read AGENTS.md and inspect git status. Use the runtime already serving this checkout; do not switch modes or start a second API on port 8000.

  • Compose API: confirm its bind mount points to this checkout. Run Python with docker compose exec -T agentos-api python; inspect docker compose logs agentos-api. If setup is needed, follow setup-platform.
  • Existing host API: reuse its startup command; local sandbox setup now uses Compose. Confirm the process's working directory and startup environment. Run Python with .venv/bin/python and the same .env/runtime/DB settings as that process; use uv run --no-project --env-file .env .venv/bin/python when loading the env file. Keep the API in a persistent terminal and inspect that process's log. No API container or container bind mount is required in this mode.

Check /health at the configured endpoint with its existing authentication. If unavailable, diagnose the selected runtime rather than assuming Compose is required. Use a bounded startup wait and inspect logs on failure. For MCP checks use scripts/mcp_check.sh with Compose or MCP_CHECK_HOST=1 ./scripts/mcp_check.sh with the host API.

Infer the target from the request and registrations; ask for its ID only if ambiguous.

1. Read the agent

Confirm the slug is code, not a Studio-built component:

curl -s http://localhost:8000/agents | jq -r '.[] | "\(.id)\tis_component=\(.is_component)"'

is_component=true has no source file — route the change through OS Manager (edit_agent / edit_team / edit_workflow, then publish_component). Never create agents/<slug>.py under that id: code wins on resolution and silently shadows the built component.

Open the user's agents/<slug>.py. For OS Manager (os-manager-internal), inspect its OSManager(...) configuration in app/main.py and the installed framework source; its members are framework-owned. Capture purpose, tools, learning, knowledge and model. Do not recreate the internal agents in this template.

2. Resolve the requested change

Use the change already specified by the user. Ask only for missing details that affect the outcome. If they want guidance, the available directions include:

  • Add a tool — MCP server, agno toolkit, or function tool.
  • Add a capability — knowledge base, learning/memory, sub-agent/context provider, scheduled task.
  • Grow the registry — declare a block in app/registry.py so everything the platform builds can carry it. Offer this unprompted when the ask is plural ("agents should be able to…").
  • Refine instructions — clarify, narrow, change tone or format.
  • Fix a bug — ask for the failing prompt, the observed behavior, what they want instead.
  • Something else.

3. Ground the change

Search the agno-docs MCP (.mcp.json) for import path, constructor args, required env vars, pip deps. Fallback: https://docs.agno.com/llms.txt. When docs are loose, the installed source settles it:

Run Python in the selected Compose or host environment from Step 0, for example:

import inspect
from agno.agent import Agent

print(inspect.signature(Agent.__init__))

Verify proposed imports in that same environment before adding them to startup.

A failing import is a dead platform, not a degraded agent — app/main.py imports every agent at module scope.

Repo-specific rules per branch:

  • Learning / memory — the lever is learning=shared_learning (app/registry.py). enable_user_memories is not an Agent parameter; enable_agentic_memory must stay off beside a LearningMachine. Entities are Agno's — don't index them from a second component. add_history_to_context includes session history; it does not replace per-user learning.
  • Knowledge — wire knowledge=shared_knowledge (app/registry.py) as one object (a list on an agent searches nothing). A product agent gets its own base — see create-agent's product pattern.
  • Shared notes — import shared_notes from app.registry and add shared_notes.tools() to tools. Studio uses the declared toolkit name filesystem. Default tools read, write, append, replace, list, search and move PostgreSQL notes. User scoping follows AgentOS user isolation; keep personal profiles in learning and Company knowledge in Company wiki. Do not attach it to end-user product agents.
  • Sub-agent / context — choose a supported Agent/Team composition or tool interface from the pinned framework, and verify the import and constructor before wiring it. For read access to a directory, use WorkspaceContextProvider (agno.context.workspace) with mode=ContextMode.tools (agno.context.mode): spread provider.get_tools() into tools= and append provider.instructions() to the instructions. Default exclusions block env and credential files.
  • Scheduled task — agno scheduler docs; scheduler=True is already on in app/main.py.
  • Grow the registry — the bucket you declare into decides how a built component references it (tool_names, model_id, knowledge_name, learning_name, function_name). Tool names are global to an agent, so a toolkit exposing a name another declared toolkit already has is silently dropped — check first, enable add_instructions=True when the toolkit supports and supplies useful instructions:

    Inspect registry.tools and the proposed toolkit's registered functions in the selected runtime. Verify name collisions and the Studio-visible catalog rather than assuming a successfully imported toolkit is buildable. MCP toolkits (such as parallel_tools) register their functions only after connecting, so an empty function list from a fresh Python process is expected for them; confirm those with the OS Manager list_tools check in Step 6.

  • Refine instructions — propose a minimal diff; narrow ("on recent-events questions, follow up with a web_fetch") rather than forbid.
  • Fix a bug — reproduce on the live agent first (Step 6), then identify the responsible layer: instructions, tool, model, configuration or framework.

4. Propose, then edit

State the intended change and why. Proceed when the user has already authorized it; ask only when a material decision or scope expansion remains. Preserve existing registrations and shared resources. Edit the applicable files:

  • The component's file — instructions, tools, model, learning=, knowledge=.
  • app/registry.py — shared capabilities and resource wiring; keep the starter lean instead of creating a new module by default.
  • app/main.py — only for a new sub-agent, knowledge=[...], or interface wiring.
  • app/config.yaml — refresh the description and add a quick prompt that exercises the change.
  • pyproject.toml — only for new pip deps.

5. Reload the selected runtime

For Compose, restart agentos-api when needed. For the host API, use its reload process or restart that host process with the same environment; do not start an API container. Restart explicitly after YAML/env changes. After dependency changes, regenerate requirements, update the host venv if used (deactivate before setup), and rebuild both Dockerfile targets as required by AGENTS.md. Use a bounded health wait and inspect the matching runtime log if startup fails. Confirm the intended code and component IDs are served before probing.

6. Smoke test

Use --form-string for literal fields so semicolons and leading @ in user input are sent unchanged. Check the saved input when a response seems to ignore part of the request.

Pick a prompt that exercises the change. Use /agents/<id>/runs for agents or /teams/<id>/runs for the actual target team (OS Manager is os-manager-internal). The example assumes the local development endpoint:

curl -sS -X POST http://localhost:8000/agents/<slug>/runs \
  --form-string "message=<the targeted prompt>" \
  --form-string "user_id=claude-extend-agent" \
  --form-string "stream=false" \
  -o /tmp/extend-out.json -w "HTTP %{http_code} in %{time_total}s\n"
jq -r '.content // .' < /tmp/extend-out.json

Inspect the run status, answer, tool results and matching runtime logs; HTTP 200 alone is not success. Use the configured endpoint/authentication when different from the example.

A registry change gets one check first — ask os-manager-internal: "Call list_tools and show the row for <tool> exactly as returned — name, buildable, source. Do not create anything." buildable: true, source: declared means it landed; discovered means it came from boot discovery and a build will refuse it.

Side effects. os-manager-internal creates and publishes real components on "build me…" prompts, and learning components (os-manager-internal, anything with learning=) file what they're told into shared stores. Cases run through python -m evals against the application's configured database, where sessions and results persist for the UI. Use explicitly owned fixtures for mutating cases and never sweep shared data after probes. Verify HTTP availability separately from model behavior.

Did the change land? Yes → Step 7. Almost → one more pass, at most 2–3, then ask how to proceed. Worse → show git diff and offer to revert only your patch.

7. Loop or wrap up

Report completion once the requested change and relevant checks are handled. Continue another change only when requested.

8. Report

One line per accepted change, git diff --stat plus the agent-file diff, a suggested commit (feat(<slug>): …, fix(<slug>): …, chore(<slug>): refine instructions), and any remaining verification. Suggest improve only when broader agent hardening would be useful. Update AGENTS.md only when the change affects its documented conventions.

Download now (ZIP)

  • Other versions4 projects use a version of this.

    Word for word · 3

    1. agno-agi/agentos-railway★ 41100% same
    2. agno-agi/agentos-docker★ 14100% same
    3. agno-agi/agentos-fly★ 4100% same

    Edited · 1

    1. agno-agi/agentos-helm★ 149% same

    Wrote their own version · 0

    None found.

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repository7 other files it gives its agents.

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

Reviews can't be read right now.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.