Agent Context Needs an Import Statement
Engineering Blog
Apply modules, dependencies, and imports to agent context. Mike Morton explains the SemDAG architecture and how Cortex makes shared knowledge available across agents.
Cortex lets you and your team share context across your AI agents, giving each agent the right knowledge before it acts.
Connect through Cortex plugins, MCP or the Socra CLI.
Your systems carry decisions about what matters and why. When that knowledge is missing, agents have to make assumptions. Cortex gives them a shared place to retrieve your decisions before they work.
Cortex gives agents your specific knowledge and its reasons before the work begins.
Use domain names, explicit errors and behavior tests when changing the platform.
Name dashboards, charts and projects consistently. Take every color from the theme. Distinguish access denial from an unavailable connection. Add a regression test for the behavior being fixed.
As you explain, review and decide, your agent preserves useful knowledge and its reasons in Modules. You keep doing the work.
The agent maintains the dependencies between related Modules. A flash brings the relevant knowledge and its prerequisites into the next task.
Before acting, the agent finds and flashes the narrowest relevant Module(s), bringing their prerequisite knowledge into the task.
The agent reads your reasons, verifies the current code and runtime, then works against your standard. You review whether the result follows your system.
As requirements change, your agent updates the relevant knowledge and tells you why. Choose automatic updates or approval before changes are saved.
An Issue says what must change. Its Module says what must remain true.
your inbox
released work
Let each person choose light or dark in Settings
#421
dark-modeCheck every email template in dark mode
#423
dark-modeSend the welcome email when someone signs up
#409
welcome-emailEvery Issue names its Module. The agent or teammate who picks it up can flash that Module before work starts.
Issues declare dependencies on other Issues. The inbox releases an Issue after all its dependencies close.
The inbox shows released, unclosed work assigned to you.
This recorded CLI call retrieves a visit-report Module and its writing prerequisite. The example knowledge is fictional; the retrieval is real.
socra cortex flash example-fieldnote-visit-reportThe writing prerequisite arrives first:
Fieldnote visit reports use sentence-case titles and plain language. Explain unfamiliar terms on first use, so a colleague who did not attend can understand the report.
Then the requested visit-report Module:
A visit report names the visit’s date and location, separates direct observations from interpretations and ends with the next action and its owner. Keep that distinction because a later reader needs to know what was observed and what still needs checking.
Models can apply new knowledge without being retrained. Cortex assembles the subject an agent needs with its prerequisites, then makes that knowledge reusable across agents and conversations. Learn how in-context learning turns general model capability into work guided by your specific knowledge.
Your Modules live in the cloud as one graph: stored in your workspace, addressed by name and owned by you. People, CoAgents (AI teammates with their own identity) and the agents you connect flash the same source, each within the Module permissions they hold.
A Module is referenced by name from repositories and tools connected through Cortex.
Knowledge never moves to another workspace. No other workspace can read your Modules.
Every Module has an owner. Modules and Issues record who changed what: a person, a CoAgent or a connected agent.
Start alone and add members when you need them.
Your people, CoAgents, connected agents and Modules live in one workspace, and its knowledge never moves to another.
People, CoAgents and the agents you connect work from the same Modules, as their Module permissions allow.
Workspace
acme

Jordan Lee
Owner
Priya Shah
Admin
Dana Brooks
Member
Coda
AI teammateWorkspace boundary · private to this workspace
You don’t have to write Modules before you begin. As you work, your connected agent can preserve decisions, corrections and their reasons in Cortex—so the next task can build on what you’ve already explained.
Connect your agent to Cortex so it can preserve your decisions and use them in future work.