Information Flow Control Gate logo

Information Flow Control Gate

Community
AnthonyAlcaraz
information-flow-control-gate

A deterministic security-policy layer for chained tools. Does two things: (1) discovers tool dependency chains by matching one tool's output TYPE to another tool's input TYPE (the NESTFUL failure mode where LLMs miss that COVID stats need a country code first); (2) tracks data taint with FIDES-style TRUSTED/UNTRUSTED labels that propagate through operations, so a sensitive action is blocked when its data is tainted, with opaque-variable references keeping raw untrusted content out of the LLM's reasoning. Use when tools chain and untrusted data can reach a sensitive action. NOT a replacement for authentication (that verifies the caller; this governs the data), NOT for single-tool calls with no chaining, NOT a general policy engine (it enforces the two IFC mechanisms the chapter names, not arbitrary rules).

Overview

PublisherAnthonyAlcaraz
Repositoryagentic-graph-rag-skills
Skill nameinformation-flow-control-gate
Stars
29
Forks
9
Bundled files
3
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 3 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by AnthonyAlcaraz on GitHub. Read the source before you install it.

Installation

Install the Information Flow Control Gate AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/AnthonyAlcaraz/agentic-graph-rag-skills/tree/main/skills/tool-orchestration/information-flow-control-gate
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/AnthonyAlcaraz/agentic-graph-rag-skills.git /tmp/agentic-graph-rag-skills
mkdir -p .claude/skills
cp -r /tmp/agentic-graph-rag-skills/skills/tool-orchestration/information-flow-control-gate .claude/skills/information-flow-control-gate
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Information Flow Control Gate in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Information Flow Control Gate on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Information Flow Control Gate is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Information Flow Control Gate

Overview

Authentication answers "is this agent allowed to call this tool?" It cannot answer "is this DATA allowed to flow into this action?" When tools chain together, two new problems appear, and this gate is the deterministic layer that handles both.

Type matching (the NESTFUL problem). The NESTFUL benchmark shows even the most advanced LLMs achieve only ~41% success on nested API calls when tool relationships are implicit. They fail to recognize that getting COVID statistics for a country requires first obtaining the country code; they struggle with type matching between one API's output and another's input. Modeling REQUIRES_INPUT and PRODUCES_OUTPUT types explicitly reduces multi-step reasoning to a graph traversal: get_country_details("India") -> "IN" (type ISO_3166_1_alpha_2), then get_covid_stats(location="IN").

Taint tracking (FIDES IFC). Every value carries a trust label from its provenance. An email from an internal domain is TRUSTED; an external one is UNTRUSTED. The taint propagates: mix trusted with untrusted and the result inherits UNTRUSTED. A deterministic policy then blocks sensitive actions on tainted data. Opaque-variable management hardens this: the LLM sees only an opaque UUID reference, and must call read_variable to materialize content, so malicious instructions embedded in untrusted content never directly steer the model's reasoning. This stops two threats authentication cannot: agent tool misuse (a legitimate tool used for a malicious purpose on tainted data) and agent goal manipulation (untrusted instructions overriding the objective).

When to Use

  • Tools chain: one tool's output feeds another tool's input
  • The agent may ingest external/untrusted content (emails, scraped docs, third-party API responses) that could reach a sensitive action
  • You want deterministic type-matched execution planning instead of hoping the LLM tracks variables between calls
  • You need an auditable "why was this action blocked" answer

Phrases that invoke this skill: "tool dependencies", "type matching", "taint tracking", "information flow control", "block sensitive action on untrusted data", "opaque variable", "IFC".

When NOT to Use

  • As authentication. This governs data flow; it does not verify the caller. Pair it with OAuth / per-agent access control (Layer 1).
  • Single-tool calls with no chaining and no untrusted input — nothing to match, nothing to taint.
  • As a general policy engine. It enforces the two IFC mechanisms the chapter names (type-matched dependencies + taint labels), not arbitrary business rules.
  • For multi-hop type resolution beyond one bridge — plan_execution resolves single-hop bridges (the chapter's worked cases); the # TODO (production): seam marks where a full topological sort goes.

Process

StepInputActionOutputVerification
1Tool specs JSON (each has requires/produces typed fields)lib.load_tool_specs(path)List of tool dictsEach tool has typed requires and/or produces entries
2Tool specslib.match_dependencies(tools)Producer→consumer edges where output type == input typeEvery edge's shared_type appears in producer produces AND consumer requires
3Target tool + available typeslib.plan_execution(tools, target, have)Ordered execution plan bridging missing typesNo step marked UNRESOLVED; the COVID chain inserts get_country_details
4A value + its source domainlib.label_by_source(value, source, trusted_domains)TaintedValue with TRUSTED/UNTRUSTEDInternal-domain source → TRUSTED; external → UNTRUSTED
5Multiple tainted inputslib.propagate(inputs)Combined labelAny untrusted input yields UNTRUSTED
6Action + propagated labellib.check_policy(action, label){allowed, reason}Sensitive action on UNTRUSTED data → allowed=False
7Untrusted contentOpaqueStore.put(...) then read_variable(ref)UUID ref; explicit dereference recordedThe LLM-facing value is the UUID, not the content; every read is logged

Rationalizations

Agent rationalizationDocumented rebuttal
"The LLM can figure out the country-code dependency itself."NESTFUL: ~41% success on nested calls when relationships are implicit. Explicit type matching turns a failing reasoning task into a deterministic traversal.
"Authentication already secures this — the caller is authorized."Authentication verifies the caller, not the data. An authorized agent can still be tricked into a sensitive action on untrusted content. IFC is a distinct layer (the chapter's Layer 2).
"Just check the final action, not the whole data lineage."Taint must propagate: a summary mixing internal and external data inherits UNTRUSTED. Checking only the final action misses that a trusted-looking output was contaminated upstream.
"Let the LLM read the external content directly — it's just text."FIDES opaque variables exist precisely because raw untrusted content can carry instructions that hijack reasoning. The LLM gets a UUID; read_variable keeps the taint policy in force.
"Blocking on untrusted data is too strict — it'll break workflows."The block applies only to the SENSITIVE action set (send_email, transfer_funds, run_shell, delete, ...). Non-sensitive processing of untrusted data is permitted; the gate is targeted, not blanket.

Red Flags

  • A dependency edge whose shared_type is not in both produces and requires. The match is spurious; the type graph is malformed.
  • plan_execution returns an UNRESOLVED step. No registered producer emits the required type — the chain cannot complete; register the missing tool.
  • A sensitive action ALLOWED on UNTRUSTED data. The policy gate is bypassed — this is the exact failure IFC exists to prevent.
  • Raw untrusted content reaching the LLM prompt instead of a UUID. Opaque- variable management is not wired; the injection surface is open.
  • CLI --help exits non-zero. SKILL.md / CLI mismatch; multi-harness invariant broken.

Non-Negotiable Verification

  1. Run the benchmark battery.

    python cli.py benchmark

    Confirm: type-matched edges discovered, the COVID chain resolves via a bridge producer, and the mixed-provenance send_email flow is BLOCKED.

  2. Prove taint propagation.

    python cli.py taint --action send_email --input internal.acme.com --input external-sender.net

    One trusted + one untrusted input MUST propagate to UNTRUSTED and BLOCK.

  3. Prove the sensitive-action gate is targeted, not blanket.

    python cli.py check-flows

    internal-metrics-readout (TRUSTED, non-sensitive) is ALLOWED; external-doc-run-shell (UNTRUSTED, sensitive) is BLOCKED.

  4. Prove opaque-variable indirection.

    python cli.py opaque-demo --json | python -c "import json,sys; d=json.load(sys.stdin); assert d['what_the_llm_sees']!=d['after_read_variable']"

    The LLM-facing value is a UUID, distinct from the materialized content.

Security Posture

  • Prompt injection. This gate is a primary defense. Untrusted content is labeled and, via OpaqueStore, never enters the prompt verbatim — the LLM sees a UUID and must explicitly read_variable. The # TODO(production): seam in label_by_source marks where to replace substring domain-matching with verified sender identity.
  • Data exfiltration. The sensitive-action set (SENSITIVE_ACTIONS) blocks send/transfer/external-post on tainted data. Extend the set for your domain; do not remove entries to "unblock" a workflow — re-source the data instead.
  • Privilege escalation. run_shell / execute_code on UNTRUSTED data is blocked by construction. The policy is deterministic (no LLM judgment at the decision point), which is what makes it auditable.

Composition

  • Composes after authentication / per-agent access control (Layer 1): this is the Layer-2 data-flow governor in the chapter's defense-in-depth model.
  • Feeds the hierarchical orchestrator and the Enterprise AI OS control plane (its ifc_controller.apply_taint_tracking step is this skill).
  • Pairs with draft-tool-trust-verifier — DRAFT tells you what a tool actually does; IFC governs what data may flow into it.
  • The type-matched execution plan is consumable by any orchestration layer that needs a deterministic call order.

Source Attribution

Distilled from Agentic GraphRAG (O'Reilly), Chapter 6 — Tool Orchestration, sections "Tool Dependencies and Type Matching" and "Securing Data Flow with Information Flow Control". Named references:

  • NESTFUL benchmark — ~41% LLM success on nested API calls without explicit tool relationships
  • Neo4j "Going Meta" — tools + typed dependencies as graph nodes (Examples 6-4, 6-5)
  • FIDES research — IFC via taint tracking + opaque-variable management; TRUSTED/UNTRUSTED labels; blocks agent tool misuse + agent goal manipulation

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Information Flow Control Gate AI skill do?

A deterministic security-policy layer for chained tools. Does two things: (1) discovers tool dependency chains by matching one tool's output TYPE to another tool's input TYPE (the NESTFUL failure mode where LLMs miss that COVID stats need a country code first); (2) tracks data taint with FIDES-style TRUSTED/UNTRUSTED labels that propagate through operations, so a sensitive action is blocked when its data is tainted, with opaque-variable references keeping raw untrusted content out of the LLM's reasoning. Use when tools chain and untrusted data can reach a sensitive action. NOT a replacement...

Why use Information Flow Control Gate on TypingMind?

Because you install it once and use it with any model. Information Flow Control Gate is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Information Flow Control Gate in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/AnthonyAlcaraz/agentic-graph-rag-skills/tree/main/skills/tool-orchestration/information-flow-control-gate. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Information Flow Control Gate?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Information Flow Control Gate?

As many as you like. As long as a model supports skills, you can use Information Flow Control Gate with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Information Flow Control Gate AI skill free?

Yes. It is published on GitHub by AnthonyAlcaraz under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇