README Quick Start imports a non-existent export: 'agentic-flow' provides only { main, reasoningbank }, and the same README forbids that import 22 lines later
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 812
- Forks
- 175
- Avg merge
- 2m
- Merged PRs (30d)
- 3
Description
Summary
The Quick Start snippet in README.md (lines 61–70) imports a class that the package does not export. Running it verbatim fails at module resolution, before any of the API is exercised.
The same README warns against that import 22 lines later.
Version: agentic-flow 2.1.2, Node v22.23.0, macOS 15 (darwin 25.6.0).
Reproduce
The snippet as published:
import { AgenticFlow } from "agentic-flow";
const flow = new AgenticFlow();
await flow.initialize();
// Route task to best agent
const result = await flow.route("Fix the login bug");
console.log(`Best agent: ${result.agent} (${result.confidence}% confidence)`);
Result:
import { AgenticFlow } from 'agentic-flow';
^^^^^^^^^^^
SyntaxError: The requested module 'agentic-flow' does not provide an export named 'AgenticFlow'
What the package root actually exports
node --input-type=module -e "
import * as af from 'agentic-flow';
console.log(Object.keys(af).sort()); // [ 'main', 'reasoningbank' ]
console.log(typeof af.default); // undefined
"
Two named exports, main and reasoningbank. No AgenticFlow, no default export. package.json declares no types, so there is no type declaration that would surface this at compile time either — a TypeScript user gets the same runtime failure.
No subpath exports an AgenticFlow class either. The closest candidates:
| Subpath | Exports |
|---|---|
agentic-flow/router |
ModelRouter, AnthropicProvider, GeminiProvider, OllamaProvider, ONNXLocalProvider, OpenRouterProvider, CLAUDE_MODELS, getModelName, listModels, mapModelId |
agentic-flow/orchestration |
createOrchestrationClient, createOrchestrator, getRunStatus, cancelRun, getRunArtifacts, harvestMemory, recordLearning, searchMemory, seedMemory |
agentic-flow/sdk |
95 exports (QueryController, E2BSwarmOrchestrator, batchPrompts, …) |
Note ModelRouter routes to an LLM model (Claude/Gemini/Ollama), not to an agent, so it is not a renamed version of the flow.route() shown in the snippet. There appears to be no public programmatic equivalent of the CLI's hooks route agent selection at all.
The README contradicts itself
README line 61 (Quick Start) tells the reader to import { AgenticFlow } from "agentic-flow".
README line 92, in Programmatic orchestration API (library-safe), says:
Do not use the default entry (
import 'agentic-flow') for library use; it runs the CLI and starts servers.
So the headline example demonstrates the exact import the library-safe section forbids — and that import cannot work regardless, because the symbol is absent.
(For what it's worth, I could not reproduce the "starts servers" half: await import('agentic-flow') completed and the process exited on its own, with only the stdout/stderr socket handles active. The missing export is the reproducible part.)
Suggested fix
Replace the Quick Start snippet with the agentic-flow/orchestration example the README already documents as library-safe, e.g.:
import { createOrchestrationClient } from "agentic-flow/orchestration";
…or export an AgenticFlow class from the package root if that API is intended to exist. Either way the two sections should agree, since Quick Start is the first code a new user runs.
Shipping types in package.json would also turn this class of error into a compile-time one for TS users.
Unrelated, emitted on every import
[AgentDB Patch] Controller index not found: node_modules/agentdb/dist/controllers/index.js
Printed to stdout on any import 'agentic-flow', which also means it contaminates the output of anything parsing stdout.
Related
- #182, #185, #186, #187 — CLI commands whose output does not describe what happened. This is the documentation-side counterpart: the published example cannot run.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in README.md lines 61–70 and compare the Quick Start snippet with the library-safe orchestration example and warning around line 92. Verify the documented package exports and update the example so it uses a runnable, supported entry point; the Quick Start and library-safe guidance should no longer contradict each other.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100