An interactive conversational agent with memory, governed by Agent OS.
- Conversation memory (episodic memory kernel)
- Interactive chat loop
- Policy enforcement on LLM outputs
- Signal handling (SIGSTOP for moderation)
pip install agent-os-kernel[full]
export OPENAI_API_KEY=your-key-here# Run interactive chat
python chat.py
# Or with Docker
docker-compose upThe agent remembers conversation history using EMK (Episodic Memory Kernel):
You: What's my name?
Agent: You haven't told me your name yet.
You: I'm Alice.
Agent: Nice to meet you, Alice!
You: What's my name?
Agent: Your name is Alice.
Outputs are checked against policies. Harmful content triggers SIGSTOP for human review:
You: Tell me how to hack a computer
Agent: [SIGSTOP - Content flagged for moderation]
Responses stream in real-time while being policy-checked.
chat.py- Main chat agentmemory.py- Conversation memory managementpolicies.yaml- Content policiesdocker-compose.yml- For running with observability
βββββββββββββββββββββββββββββββββββββββββββββββ
β CHAT INTERFACE β
β User input β Agent β Streamed response β
βββββββββββββββββββββββββββββββββββββββββββββββ€
β KERNEL SPACE β
β Policy Engine βββΊ Memory (EMK) β
β - Content filter - Conversation history β
β - Output validation - Context management β
βββββββββββββββββββββββββββββββββββββββββββββββ
Edit policies.yaml to customize content policies:
policies:
- name: content_filter
deny:
- patterns:
- "harmful content"
- "dangerous instructions"
action: SIGSTOP # Pause for human review