Open source · Early development

A language for
AI
workflows.

Write model calls, tools, memory, and action permissions in one readable program. Reuse Python libraries for the work underneath.

Python 3.10+ · MIT licensed · Early development

MODELS, TOOLS, AND ACTIONSSense blue and violet ribbon symbol agent reason act
DETERMINISTIC FOUNDATIONSEXPLICIT WORKFLOW RULES
A familiar foundation.
Explicit workflow concepts.

Python-like syntax

BYO-LLM

Explicit side effects

Human control

THE PROBLEM

What problem does
Sense solve?

Calling an AI model is one step. You still need code to store information, track changes, connect tools, and check permissions.

For example, a support assistant needs to remember a customer’s preference, check its earlier value, look up an order, and get approval before issuing a refund. You have to connect these parts and keep their rules clear as the application grows.

Sense puts memory, history, tools, and policies into the language. The goal is to reduce repeated setup code and make these rules easier to read and change. Python and frameworks can do this too; Sense offers a consistent way to write it.

WHY SENSE?

Make workflow rules
easier to follow.

An AI workflow is a program that connects model decisions to tools and other steps. Sense aims to make those connections explicit and reduce repeated setup code.

What changes?

Models, tools, agents, and actions have dedicated language constructs. Calling a declared action prepares it; its body runs only when committed. The local inspector lets you explore the program’s declared tools, actions, and state.

Where could it help?

Try a small report, support, or operations workflow where you want to read the model steps and execution rules together. For example: draft a response, prepare a send operation, then check it before execution.

What is the tradeoff?

You learn new syntax and use an early runtime. Python and agent frameworks can implement similar workflows. Keep your current tools if they already meet your needs; Sense is an option to explore, not a required migration.

Sense is a small domain-specific language implemented in Python. Its goal is clearer workflow code, not better model intelligence or automatic completion of any goal. See how it fits with existing tools ↓

01 / THE LANGUAGE

See what your
program will do.

Declare the model, store context, and decide when an action runs. These examples show the current syntax.

SMALL, READABLE EXAMPLES

Reasoning is
a language feature.

Choose a model and ask a question. The Answer records its value and source; confidence can be unknown.

Explore reasoning ↗
Uses OpenAI. Install sense-lang[openai] and set OPENAI_API_KEY to run this example.
hello.snsSense
# A model is a value. Reasoning is built in.
model reasoning = inference("openai", "gpt-4o")
set delegation = reasoning

result = ask("What should we build next?")

print(result.value)
print(result.confidence)
print(result.source)
Real Sense syntaxread · change · run

02 / INTELLIGENCE, BUILT IN

The pieces of
an AI workflow.

Use models and tools, retain information with memory, inspect its history, and set permissions with policies. Agents and sessions organize these pieces.

MEMORY + HISTORY

Keep the current value and the changes that led to it.

Store a report’s status as it moves from draft to reviewed. Persistent memory records each update, so you can inspect earlier values without maintaining a separate history list.

persistent memory reports

reports.remember("status", "draft")
reports.remember("status", "reviewed")

print(reports.recall("status"))
print(reports.history("status"))
print(reports.as_of("status", 1))

On a new store: the latest status is “reviewed”; version 1 is “draft”. Re-running appends more history. Reading an older version does not undo external actions.

Explore persistent memory ↗

POLICY + SCOPE

Write permission rules where the work happens.

Allow a research step to use a search tool while denying a send operation. A tool or action declares its required capability; policy supplies the rule used when that capability is checked.

session research:
    policy:
        allow web.search
        deny email.send

    # Rules for this scope.
    # Add tools and work here.

This block declares rules; it does not perform a search. Inner scopes can override outer rules. Unmentioned capabilities default to allow, and arbitrary Python calls are not sandboxed.

Explore scoped policies ↗

03 / DELIBERATE BY DESIGN

Prepare an action.
Decide when it runs.

An action has a lifecycle. Preparing it does not run its effect. Permissions are checked by the interpreter, and the effect happens only when you commit.

Understand the safety model ↗
01
prepare

Bind the arguments. The action body has not run.

◇
02
verify()

Check the action against your policy.

✓
03
commit()

Re-check permissions. Perform the effect.

↗
Checks apply to declared capabilities. Approval can be required. Recovery logic is written by the developer.

CHOOSING AN APPROACH

How Sense fits.

There are several ways to build an AI workflow. The difference is how you write it and which parts the tool provides.

Different approaches to similar work
Approach What it provides When to consider it
Python + libraries General-purpose code and your choice of model and application libraries. You want to stay in an existing Python application and choose its workflow structure.
LangChain Agent building blocks and integrations for models, tools, and agent loops. You want existing agent abstractions through framework APIs.
LangGraph Stateful orchestration, persistence, durable execution, and human oversight. You need explicit orchestration and support for work that spans interruptions.
Deep Agents An agent harness with planning, filesystem tools, subagents, and context management. You want those capabilities supplied as a starting point for your agent.
Sense Workflow concepts expressed in a small language, with a Python-based interpreter and local inspector. You want to explore explicit workflow syntax and can accept an early runtime and a new language to learn.

Human oversight, memory, and agent state are not unique to Sense. Its goal is to make workflow code clearer through language constructs. It does not claim faster execution, better model answers, or feature parity with these tools.

Tool descriptions follow the official LangChain product guide, LangGraph overview, and Deep Agents overview. Checked September 7, 2026. This is a guide to their roles, not a complete feature ranking.

COMMON QUESTIONS

Before you try Sense.

Straight answers about the language, existing tools, and what you still need to build.

Is this a language or a Python framework?

Sense has its own syntax, parser, and interpreter, so it is a domain-specific language. The interpreter is written in Python and can call installed Python libraries. That describes the implementation; the practical reason to try it is whether its workflow structure helps you.

Why use Sense if I can already use Python?

You can build the same kind of workflow in Python. Sense puts models, tools, policies, and action stages into a consistent language structure. It is worth exploring if that makes your code easier to read and change. It does not claim to be faster or to replace Python’s ecosystem.

Why not LangChain, LangGraph, or Deep Agents?

You can build agents with LangChain, LangGraph, or Deep Agents. Sense offers another way: write model calls, memory, and permissions directly in your code.

For example: save a value, check its history, allow a search, or require approval before sending an email.

AI can write the code and choose the steps. You still decide what your application can do.

Why try Sense? To see whether these built-in features make your code simpler to write, read, and maintain.

Can I give Sense a goal and let it do everything?

No. You still choose tools, write instructions, configure models, and define execution rules. Sense provides a way to express that program. It does not make a model more capable or guarantee that it achieves the goal.

If AI writes my code, why learn Sense?

Generated code still needs review, maintenance, and debugging. Sense aims to make the workflow rules easier to see. That only helps if you find the resulting code clearer; AI code generation alone is not a reason to adopt another language.

Do I need to rewrite my application?

No rewrite is needed to try an isolated Sense script. It can call installed Python modules through Python interop. Existing Python code does not automatically become Sense code, and compatibility with a library or framework needs checking. Start with one small workflow.

Do I need special keywords for ordinary programming too?

Sense also has functions, variables, conditions, loops, imports, and return values. Use local when you need a new local binding rather than updating an existing outer one. return produces a result; returns annotates a result type on constructs such as tools. Start with ordinary code and add memory, policies, or agents when your program needs them. See the full keyword reference.

What is the simple difference between a function, an agent, a tool, and an action?
  • Function: runs a piece of code when you call it. Example: calculate a total. Pro: simple and reusable. Con: no built-in capability check or pause/resume lifecycle.
  • Agent: runs a task when started and keeps its own state. Example: investigate a report and pause for input. Pro: you can track its status and resume paused work. Con: you must manage its lifecycle; declaring an agent does not make it intelligent.
  • Tool: a callable operation that can be offered to a model, with a description and optional required permission. Example: look up an order. Pro: reusable access with capability checks when declared. Con: it runs when called; there is no separate commit step.
  • Action: prepares an operation whose body runs later, on commit. Example: prepare an email before sending. Pro: a clear point for permission checks and optional approval. Con: more execution steps, and recovery code is still your responsibility.

Start with a function. Use a tool for model-callable work or capability checks, an action when execution needs a separate commit, and an agent when you need task state and pause/resume.

How do model, ask, and Answer fit together?

model declares a model value. set delegation selects the model for the current scope, and ask(...) uses that selection. The returned Answer has a value, source, and confidence field. OpenAI and Anthropic are supported today, and more provider integrations are planned. Their confidence is currently nil, meaning unknown. An Answer is not proof that the response is correct.

Does every agent need an LLM?

No. An agent runs the code you put in its body. It can use ordinary functions, memory, tools, and model calls as needed. Use a model when the task needs it; the agent keyword itself does not call a model or decide what to do.

When should I use a session instead of an agent?

A session runs a block in a child scope, letting you choose a model or policy for that work without changing the outer setting. An agent has identity, execution state, and a start/pause/resume lifecycle. Use a session to scope work and an agent when that lifecycle is useful. Neither means crash recovery is automatic.

Can I call a tool myself, without asking a model?

Yes. Your code can call a tool directly. Its declared capability is checked and its body runs if permitted. Offering it through ask_with_tools(...) additionally lets the model request it. A tool is not limited to model-selected calls.

Where does a skill fit in?

A skill(...) groups related tools under a name and description. For example, bundle order lookup and shipment tracking tools for reuse. Pro: pass one bundle instead of repeating the same tool list. Con: it is another grouping to maintain and does not write the tools for you. A skill is a value created by a function, not a separate agent.

What is the difference between memory and persistent memory?

memory holds key/value information in the running process. persistent memory saves supported values in a SQLite-backed store across runs and records changes as versions. Use working memory for temporary notes and persistent memory when later runs need the information. This is data storage, not automatic model learning.

What do remember, recall, history, and as_of do?

remember(key, value) stores a value; recall(key) reads the latest one. Persistent memory also provides history(key) to list changes and as_of(key, version) to read an earlier value. For example, inspect when a stored status changed from draft to reviewed. These are methods on memory, not separate reserved keywords.

Does forget delete the history too?

For ordinary memory, forget(key) removes the current entry. For persistent memory, it records a removal while retaining earlier versions. Recall then returns nil, but history remains available. Do not use forget as a promise to erase sensitive data from storage.

Does a model automatically know everything in memory?

No. Declaring memory stores data; it does not automatically add it to every prompt. Use ask_with_memory(...) when you want stored context included in a model request. Choose what you store and share; persistent data can still be outdated or incorrect.

How do policy, allow, deny, and requires work together?

requires names a capability on an operation, such as web.search. A policy block uses allow or deny to set its permission. The runtime checks that declared capability when the operation is used. Action verification and commit each check permissions. These rules do not inspect whether the content of an operation is a good decision.

Do policies apply everywhere, and what happens without a rule?

Rules are scoped. The nearest matching rule is used, and an inner scope can override an outer rule. A capability without a matching rule defaults to allow. Policies govern declared capabilities; they are not an operating-system sandbox or an automatic block on all Python side effects.

Is approval required for every action?

No. Use requires approval when the action needs approval before commit. Without that requirement, an action still has preparation, verification, and commit steps, but does not automatically ask a person. You must connect the approval step to the appropriate person or application process.

Does rollback undo any action automatically?

No. You write the recovery logic for operations that support it. Compensation can fail and may not fully undo an external effect. Sending a correction does not unsend an email. Sense does not generate an undo operation for you.

What do async, approval, and Python imports add?

async enables concurrent agent or tool work; it does not automatically make shared application state safe. requires approval adds an approval requirement before an action can commit. import python connects installed Python functionality. These features serve different purposes: concurrency, an execution gate, and integration.

Which LLM providers are currently integrated?

Sense currently integrates OpenAI and Anthropic, with more LLM provider integrations planned. Select one with inference("openai", ...) or inference("anthropic", ...). Each needs its provider package, an API key, and an internet connection. Check the documentation for the latest supported providers as integrations are added.

What do I install for OpenAI or Anthropic?

For OpenAI, install pip install "sense-lang[openai]" and set OPENAI_API_KEY. For Anthropic, install pip install "sense-lang[anthropic]" and set ANTHROPIC_API_KEY. Choose a model available to your provider account. Installing Sense alone does not include provider access or API credits.

Does Sense include an offline LLM?

No. The mock provider returns configured demo responses; it does not run an LLM or perform local inference. Real model responses use an integrated provider. OpenAI and Anthropic are supported today, with more integrations planned. Ordinary code, memory operations, and local examples can run without calling a model.

Can I trust Sense with production work?

Sense is in early development. Evaluate it on small, low-risk workflows first. Its capability checks are not a sandbox for arbitrary Python code, and pausing an agent is not a promise of recovery after a process crash. Review the implementation and limitations before depending on it.

Review the current roadmap ↗

YOUR NEXT PROGRAM STARTS HERE

Make something
that makes sense.

Connect a supported LLM provider to run model calls. OpenAI and Anthropic are available today, with more integrations planned.

Follow the quickstart
FROM ZERO TO SENSEINSTALL + CONFIGURE
01

Install Sense

02

Open the interactive shell

Python 3.10+ required. Model calls need the provider package, an API key, and an internet connection.

A young language, built in the open. Sense is in active development. Explore the current implementation and help shape what comes next.

Read the docs ↗