index

A typed, reusable program component for AI systems where a model chooses which operation to use next. It defines the model instructions, inputs, outputs, available tools, and usage limits.

In plain words
What is it for?
Use it to run model requests that may call typed tools, track each independent execution, and connect the component to your own storage, credentials, history, and application transport.
Why use it?
It provides a predictable boundary for model-driven work without tying the application to one AI provider. Each run keeps its own state, conversation record, counters, and usage information.

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/mdrideout/junjo/index
Clone the repo
git clone --depth 1 https://github.com/mdrideout/junjo
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 1,441 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.01441
Opus 5 $0.00000 $0.00720
Sonnet 5 $0.00000 $0.00288
Haiku 4.5 $0.00000 $0.00144

Measured yesterday against content hash 6671b24bf3c0, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

index 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 yesterday.

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.

sdks/python/docs/content/docs/python/agents/index.md · 162 lines

How it starts

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

Agent is a reusable, typed Junjo executable for the case where a model chooses the next capability at runtime. It is a sibling of Workflow. An Agent has no fabricated Graph, and a Tool is an operation rather than a Node.

The definition declares all behavior-affecting structure up front:

  • a stable application-owned key and display name;
  • exact instructions and typed input/output boundaries;
  • one provider-neutral ModelDriverBinding;
  • an ordered collection of explicitly typed Tool definitions;
  • positive model-request and Tool-call limits.

Every execute call creates a fresh run identity, private Store, transcript, counters, usage aggregate, lifecycle snapshot, and per-run collaborator cache. The caller owns request dependencies, history selection, persistence, provider credentials, transactions, and product transport.

Minimal definition

The core package deliberately owns no provider SDK. A ModelDriver translates one immutable normalized ModelRequest into either FinalOutputResponse or ToolCallsResponse.

from pydantic import BaseModel

from junjo import (
    Agent,
    AgentLimits,
    ModelDriverBinding,
    ModelDriverDescriptor,
)
from junjo.agent import FinalOutputResponse
from junjo.agent.testing import ScriptedModelDriver

class Question(BaseModel):
    text: str

class Answer(BaseModel):
    text: str

driver = ScriptedModelDriver([
    FinalOutputResponse(output={"text": "deterministic answer"})
])

agent = Agent(
    key="answer_question",
    name="Answer Question",
    instructions="Answer using available evidence.",
    input_type=Question,
    model=ModelDriverBinding.shared(
        descriptor=ModelDriverDescriptor(
            driver_key="scripted",
            provider="junjo",
            model="scripted-v1",
            fixture=True,
        ),
        driver=driver,
    ),
    tools=[],
    output_type=Answer,
    limits=AgentLimits(model_requests=4, tool_calls=8),
)

result = await agent.execute(
    Question(text="What happened?"),
    dependencies=None,
)

The successful result always contains validated output, a detached normalized transcript, usage evidence, identities, counters, and terminal reason. Failure raises a typed AgentError; there is no output-less success result.

Read the full file on GitHub · 162 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. yesterday First seen · 162 lines · 0 tokens per session scan A 6671b24bf3c0

Subscribe to this mod's changes

index is an agent published in the GitHub repository mdrideout/junjo (20 stars, last pushed yesterday), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 1,441 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.