cross-agent

A way for one coding agent to delegate work to other specialized agents. Each peer agent can have its own tools and instructions.

In plain words
What is it for?
Use it to create peer agents, describe their specialties, send them tasks, collect their responses, and shut them down when the work is complete.
Why use it?
It helps split a task between agents with different roles, such as assigning research to one agent while another handles the main work.

Agent

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/promptise-com/foundry/cross-agent
Clone the repo
git clone --depth 1 https://github.com/promptise-com/Foundry
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,437 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.02437
Opus 5 $0.00000 $0.01218
Sonnet 5 $0.00000 $0.00487
Haiku 4.5 $0.00000 $0.00244

Measured 2d ago against content hash 8f64d82270ac, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

cross-agent scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

docs/core/agents/cross-agent.md · 268 lines

How it starts

The opening of the file, as written. The whole thing — 268 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Cross-Agent Delegation

Enable agents to delegate tasks to peer agents using auto-generated tools like ask_agent_researcher and broadcast_to_agents.

Quick Example

import asyncio
from promptise import build_agent
from promptise.config import HTTPServerSpec
from promptise.cross_agent import CrossAgent

async def main():
    # Build a specialist peer agent
    researcher = await build_agent(
        servers={"search": HTTPServerSpec(url="http://localhost:8001/mcp")},
        model="openai:gpt-5-mini",
        instructions="You are a web research specialist.",
    )

    # Build the main agent with delegation to the peer
    agent = await build_agent(
        servers={"files": HTTPServerSpec(url="http://localhost:8002/mcp")},
        model="openai:gpt-5-mini",
        cross_agents={
            "researcher": CrossAgent(agent=researcher, description="Web research"),
        },
    )

    result = await agent.ainvoke({
        "messages": [{"role": "user", "content": "Research the latest trends in AI safety"}]
    })
    print(result["messages"][-1].content)

    await agent.shutdown()
    await researcher.shutdown()

asyncio.run(main())

Concepts

Cross-agent delegation lets a primary agent call peer agents as if they were regular tools. When you pass the cross_agents parameter to build_agent(), Promptise generates two kinds of tools:

  1. Per-peer ask tools -- For each peer named <name>, a tool called ask_agent_<name> is created. The primary agent calls this tool to forward a message to that specific peer and receive its response.
  2. Broadcast tool -- A single broadcast_to_agents tool that sends the same message to multiple peers in parallel and returns a mapping of peer name to response.

Peers are standard LangChain Runnable objects (typically PromptiseAgent instances returned by build_agent()). No new infrastructure is required -- delegation happens in-process via async calls.

Primary Agent
  |
  |-- ask_agent_researcher(message="...")  --> Researcher Agent --> response
  |-- ask_agent_analyst(message="...")     --> Analyst Agent   --> response
  |-- broadcast_to_agents(message="...")   --> [all peers]     --> {name: response}

Read the full file on GitHub · 268 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 268 lines · 0 tokens per session scan A 8f64d82270ac

Subscribe to this mod's changes

cross-agent is an agent published in the GitHub repository promptise-com/Foundry (869 stars, last pushed 12d ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 2,437 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other agents, from other repositories

lg-react-named-services-config

Agent "lg-react-named-services-config" from kdcube/kdcube, covering lg-react: connecting named services — two config shapes, shape a — per-service connections, shape b — whole surface, choosing and keeping the three declarations honest.

kdcube/kdcube · 0 tokens

rn-tester

Tests React Native features on simulator/emulator. Verifies UI renders correctly, user flows work, and internal state matches expectations. Use when a feature has been implemented and needs verification. PARENT-SESSION-ONLY: requires MCP tools (cdp, device) — do NOT spawn via Task tool, run protocol inline in parent…

Lykhoyda/rn-dev-agent · 337 tokens

rn-debugger

Diagnoses broken or unexpected behavior in a React Native app running on simulator/emulator. Gathers parallel evidence (component tree, logs, network, store), narrows root cause, applies a fix, and verifies recovery. PARENT-SESSION-ONLY: requires MCP tools (cdp, device, collectlogs) — do NOT spawn via Task tool, run…

Lykhoyda/rn-dev-agent · 341 tokens

rn-code-architect

Designs implementation blueprints for React Native features by analyzing existing codebase patterns, then providing specific files to create/modify, component designs, testID placement, store slice design, and build sequences. Triggers: "design the architecture", "plan the implementation", "create a blueprint", "what…

Lykhoyda/rn-dev-agent · 238 tokens

rn-code-reviewer

Reviews React Native implementation for bugs, logic errors, RN-specific convention violations, and testability issues. Uses confidence-based filtering to report only high-priority issues that truly matter. Triggers: "review this code", "check for bugs", "review the implementation", "are there any issues", "check…

Lykhoyda/rn-dev-agent · 234 tokens

harness-scout

Picks the right AI agent harness for a described task or project. Use when the user asks "what harness/framework/agent tool should I use", compares agent frameworks, or starts an agent project without a stack decision. Grounded in the live best-of-Agent-Harnesses dataset, never in training-data memory.

RyanAlberts/best-of-Agent-Harnesses · 68 tokens