qadam-flow / features
AGENTS.md5 starsChanged 36 days agoMITView on GitHub
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 31,542 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository15 other files it gives its agents.
- AGENTS.mdAGENTS.md
- add-endpointSkill
- add-entitySkill
- add-featureSkill
- agent-browserSkill
- db-migrationSkill
- designSkill
- grill-meSkill
- local-docker-deploySkill
- mcp-builderSkill
- mintlifySkill
- playwright-e2e-testingSkill
- qadam-builderSkill
- ubiquitous-languageSkill
- versioningSkill
The file
We split this agents.md into the rules it gives an agent
1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 60
Only the id can pick between several rows of the same type — a platform may hold many custom OpenAI-compatible providers, and a bare name …
≈ “Common” is an estimate: at least 1 in 5 of the 40,246 AGENTS.md 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.
Files
AI Agents
Summary
Agents is a flow step type (backed by @aiqadam/qadam-agent) that executes an LLM-driven autonomous loop. The agent is given a prompt, a set of tools, an AI provider/model, and optional structured-output fields. It runs a ReAct-style loop (up to maxSteps) where the model can call any configured tool before producing a final answer. Tools can be piece actions, other flows, MCP servers, or knowledge-base files. The feature is entirely configured inside the Flow Builder as a special step and does not have its own backend entity — the agent configuration lives inside the flow version's step settings.
Key Files
Shared Types
packages/shared/src/lib/automation/agents/index.ts— enums (AgentToolType,AgentTaskStatus,ContentBlockType,ToolCallType,AgentOutputFieldType), types (AgentProviderModel,AgentResult,AgentStepBlock,AgentOutputField), andAgentPiecePropsproperty name enumpackages/shared/src/lib/automation/agents/tools.ts— all tool Zod schemas:AgentPieceTool,AgentFlowTool,AgentMcpTool,AgentKnowledgeBaseTool,AgentTooldiscriminated union;McpAuthConfig,PredefinedInputsStructure
Frontend
packages/web/src/features/agents/index.ts— barrel exportpackages/web/src/features/agents/hooks/agent-hooks.ts—agentQueries.useFlowsForAgent(),agentMutations.useValidateMcpTool()packages/web/src/features/agents/agent-tools/— tool management UI (add dropdown, per-tool dialogs, stores)packages/web/src/features/agents/agent-tools/stores/— Zustand stores for piece-tools dialog (pieces-tools.ts) and knowledge-base tools (knowledge-base-tools.ts)packages/web/src/features/agents/agent-tools/piece-tool-dialog/— multi-page dialog: piece list → action list → predefined inputs form → connection pickerpackages/web/src/features/agents/agent-tools/flow-tool-dialog/— dialog to attach another flow as a toolpackages/web/src/features/agents/agent-tools/mcp-tool-dialog/— MCP server URL + auth config dialog; callsmcpToolApi.validateAgentMcpToolto verify connectivitypackages/web/src/features/agents/agent-tools/knowledge-base-dialog/— dialog to attach a knowledge-base filepackages/web/src/features/agents/agent-timeline/—AgentTimelinecomponent that renders step-by-step execution blocks (markdown + tool calls) fromAgentResult.stepspackages/web/src/features/agents/ai-model/—AIModelSelectorcomponent;PROVIDER_EMBEDDING_MODELSconstantpackages/web/src/features/agents/ai-providers.ts—SUPPORTED_AI_PROVIDERSlist with metadata per providerpackages/web/src/features/agents/structured-output/—AgentStructuredOutputcomponent for defining output field schemapackages/web/src/app/builder/step-settings/agent-settings/index.tsx— builder panel for configuring an agent steppackages/web/src/app/builder/test-step/agent-test-step/index.tsx— test panel for running a single agent step and viewing resultspackages/web/src/app/builder/qadams-selector/index.tsx— the only gate on the agent step: lines 147-149 show the tab only whenplatform.plan.agentsEnabled && !isNil(aiProviders) && aiProviders.length > 0. The plan flag is never the blocker (getPlan()inplatform.service.tshardcodesagentsEnabled: true), but with no configured AI provider the tab is still hidden.
Domain Terms
- AgentTool — a discriminated union of the four tool types a user can attach to an agent step
- AgentToolType —
PIECE,FLOW,MCP,KNOWLEDGE_BASE - AgentPieceTool — references a specific piece action by
pieceName,pieceVersion,actionName; can carrypredefinedInputlocking certain fields - AgentFlowTool — calls another flow by
externalFlowId; the flow is executed as a child run - AgentMcpTool — connects to an MCP (Model Context Protocol) server; supports SSE, StreamableHTTP, and SimpleHTTP protocols with None/Bearer/ApiKey/Headers auth
- AgentKnowledgeBaseTool — performs semantic search over a knowledge-base file or table; uses cosine similarity on 768-dim embeddings
- PredefinedInputsStructure — per-field config (
AGENT_DECIDE,CHOOSE_YOURSELF,LEAVE_EMPTY) baked into the tool so the agent knows which inputs it controls - AgentResult — runtime output containing
prompt,steps[],status, and optionalstructuredOutput - AgentStepBlock — either
MarkdownContentBlockorToolCallContentBlockdescribing one turn in the agent loop - ToolCallStatus —
IN_PROGRESS(streaming) orCOMPLETED - AgentTaskStatus —
COMPLETED,FAILED,IN_PROGRESS
Agent Step Configuration (stored in flow version)
The agent step is a PIECE action on @aiqadam/qadam-agent. Its settings.input contains:
agentTools—AgentTool[], allowed at mostMAX_AGENT_TOOL_PINS(100) entries per step. Each entry is walked by the engine and costs a pin lookup on the API/worker, so the flow write stores an over-cap step but marks it invalid (flow-version-validator-util.ts), the publish gate recomputes the cap soskipand imported steps cannot slip past it, andap_validate_flowreports it under "Agent Tool Limits". The worker refuses to provision such a step, andagentToolPins.fromInputreads at most the same 100 entries so an MCP report cannot fan out (#879).structuredOutput—AgentOutputField[]prompt— string (may include{{variables}})maxSteps— numberaiProviderModel—AgentProviderModel({ providerId?, provider, model })webSearch/webSearchOptions— optional web search tool configuration
providerId addresses one AI provider row; provider names its type. Both are stored,
because they answer different questions:
- Only the id can pick between several rows of the same type — a platform may hold many custom
OpenAI-compatible providers, and a bare name resolves to its oldest matching row.
providerIdis optional and permanently so: steps written before id-addressing carry none, and a pinned qadam version buildsv1/ai-providers/${provider}/configfrom the enum whatever is stored. - The name cannot be dropped once an id is present. Capability decisions happen before any config is
fetched and are keyed on the enum — which web-search tool builder applies (
common/web-search.ts), whether the OpenAI responses API is used (run-agent.ts), which advancedOptions schema is rendered, andgetEffectiveProviderAndModel's Cloudflare-Gateway unwrapping. None of those can consume a row id.
createAIModel and createEmbeddingModel (packages/qadams/community/ai/src/lib/common/ai-sdk.ts)
both take providerId ?? provider as the route's providerRef, and then build their SDK client
from the answering row's provider, not from the name the step stored — the row's auth and
config are shaped by its own type.
PIECE Tool Execution (engine)
agentTools.tools (packages/server/engine/src/lib/tools/index.ts) runs each PIECE tool call as a
one-step execution through the normal qadamExecutor, with constants from
EngineConstants.fromAgentToolCall:
- Run identity is the parent step's.
flowRunIdandrunEnvironmentcome from the agent step's own constants, so run-scoped engine RPCs the worker checks against the job's run (an inlinecallFlow'sresolveInlineFlow, #643) pass unchanged.flowId/flowVersionIdstay theDEFAULT_MCP_DATAplaceholders, so a tool's FLOW-scoped store keys andflows.currentare what they were before #643. - Not a step of that run.
isAgentToolCallmakes the progress reporter ignore the tool's step (sendUpdateandoutput.updateare no-ops), so it can never replace the parent run's snapshot. - Never pauses. An action with
pauses: trueis refused beforerun(), andcreateWaitpoint/waitForWaitpointthrow for any action that creates a waitpoint (a Queue-mode Call Flow with Wait for Response, approval links, …): a tool call cannot wait, and a waitpoint on the parent's real run would be left PENDING. The refusal is an ordinary FAILED step, which reaches the agent as a tool error. - Failures stay with the agent. A failed tool step — including a failed inline child — is
returned to the agent as
ExecutionToolStatus.FAILED; it does not fail the agent's run. Inline children are created withfailParentOnFailure: false, so nothing fails the parent out of band either.
Tool Validation
External MCP servers configured as agent tools are validated server-side via POST /v1/projects/:projectId/agent-tools/mcp/validate (see packages/server/api/src/app/agents/). The handler performs the JSON-RPC initialize → notifications/initialized → tools/list handshake against the target and returns its tool names. The outbound call is routed through safeHttp.axios from @aiqadam/server-utils (see packages/server/utils/src/safe-http.ts), whose http/https agents are built on request-filtering-agent to reject private / loopback / link-local / meta IPs by default. Operators can allow specific ranges via AP_SSRF_ALLOW_LIST (CIDR supported). All error paths collapse to a single generic message to avoid leaking reachability signal.
The validator lives under agents/ (not mcp/) because it belongs to the agent piece domain — validating an external MCP server the agent will connect to at flow-execution time. The mcp/ module handles the opposite direction: exposing Qadam Flow itself as an MCP server to external clients.
Timeline Rendering
AgentTimeline receives AgentStepBlock[] from the step output and renders:
- Markdown blocks as formatted text
- Tool call blocks as expandable cards showing tool name, type-specific metadata (piece icon, flow name, MCP URL, KB name), input, output, and status badge
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
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.

