uv add noesis or pip install noesis. Import as import noesis as ns.
Core functions
ns.run()
Execute a baseline episode using the current session.Task or goal for the episode.
Seed for reproducibility.
True enables the default intuition policy, False disables it, or pass an Intuition implementation.Metadata tags attached to the episode.
Optional runtime context. If provided, execution bypasses the default session.
"ep_2024_abc123_s0")
Example:
context is integration-specific; it is passed through to the runtime and ports.
ns.solve()
Execute an episode through a specific adapter/graph.Adapter name/import path or callable to execute the task.
ns.summary.read()
Load the summary for an episode.ns.events.read()
Load the event timeline for an episode.stream=True to iterate lazily.
ns.list_runs()
List recent episodes (newest first).episode_id, task, started_at, flags, success, manifest, and manifest_status (when strict_manifest=True).
ns.last()
Get the most recent episode ID.ns.set() / ns.get()
Update or read the current configuration snapshot.runs_dir, planner_mode (meta/minimal), direction_min_confidence, learn_home, learn_mode, learn_auto_apply_min_confidence, learn_auto_apply_min_successes, intuition_mode, timeout_sec, prompt_provenance_enabled, prompt_provenance_mode, agents, tasks.
Intuition and policies
ns.DirectedIntuition
Base class for policies that can emit hints, interventions, or vetoes.hint(advice, confidence=0.5, rationale=None, evidence_ids=None, target="input", scope="episode")intervene(advice, patch, confidence=0.6, rationale=None, evidence_ids=None, target="input", scope="episode")veto(advice, confidence=0.8, rationale=None, evidence_ids=None, target="plan", scope="episode")
IntuitionEvent (schema)
Fields includekind, advice, confidence, policy_id, policy_version, policy_kind, applied, rationale, evidence_ids, patch, target, scope, and blocking (plus schema_version).
NoesisVeto
Raised when a policy vetoes an episode.Session management
Use sessions when you need isolated configuration, explicit lifecycle control, or registered ports.SessionBuilder reads config from env/TOML; you can also inject ports before building. Within a session, run/solve behave like the module-level helpers but share the session’s config and runtime context.
Module facades
ns.summary.read(episode_id, context=None): readsummary.json.ns.events.read(episode_id, stream=False, context=None): iterate events; passstream=Trueto lazily consume.ns.context: helpers for building runtime contexts and attaching ports (advanced use — see the “Add a memory port” guide).ns.learn.emit(...): advanced learning signal emission (seenoesis.learn; patterns live in guides such as export metrics/learning signals).
Episode index
EpisodeIndex
Manage an on-disk episode manifest (and optional FAISS similarity index).append(episode_id, summary_path, state_path, status, task, using, provenance=None, embedding=None)iter(include_expired=False)→ iterator ofEpisodeRecordsearch(embedding, k=5)→ similarity matches (empty if FAISS disabled)vacuum()→ prune expired records
Type definitions
IntuitionEvent
Returned by policy methods. See schema above for fields.Environment variables
| Variable | Description |
|---|---|
NOESIS_RUNS_DIR | Artifact storage directory |
NOESIS_PLANNER | Planner mode (meta/minimal) |
NOESIS_DIRECTION_MIN_CONFIDENCE | Direction minimum confidence |
NOESIS_INTUITION_MODE | Intuition mode |
NOESIS_TIMEOUT_SEC | Default timeout (seconds) |
NOESIS_LEARN_HOME | Learning artifacts directory |
NOESIS_LEARN_MODE | Learning mode |
NOESIS_LEARN_AUTO_APPLY_MIN_SUCCESSES | Minimum successes before auto-apply |
NOESIS_LEARN_AUTO_APPLY_MIN_CONFIDENCE | Confidence threshold for auto-apply |
NOESIS_PROMPT_PROVENANCE_ENABLED | Enable prompt provenance (true/false) |
NOESIS_PROMPT_PROVENANCE_MODE | Prompt provenance mode |
NOESIS_AGENTS | Agent registry override |
NOESIS_TASKS | Tasks registry override |

