Inspiration
GitHub gave teams one place for their code, their reviews and their history. AI agents never got that. Today every developer runs Cursor or Claude Code on their own laptop. Each agent has its own copy of the context and full access to that person's terminal and files. Nobody can say what the agents did yesterday. A pasted API key can end up in a prompt or in a teammate's chat, and a "helpful" skill shared in Slack can carry instructions that hijack the next agent that reads it. Security teams have no single place to set rules or see what's happening, so many companies simply say no to agents.
We wanted the GitHub moment for agents: one place in the middle that every agent goes through, without asking anyone to change the tools they already love.
What it does
LoomAI is a control layer for a team's AI agents. Teammates keep using their own agent: Cursor, Claude Code or the Claude app. Every request those agents make to the team goes through one gateway on AWS.
- Ask the team brain. "Loom, how do we deploy?" gets an answer from the team's own code and docs, with
file:linessources, only from projects that person belongs to. If the answer isn't there, it says "Not in project knowledge." instead of guessing. - Share safely. Skills, files and messages sent to a teammate are scanned for secrets on the laptop, scanned again on the server, and checked by Amazon Bedrock Guardrails for credentials, personal data (card, bank, SSN and passport numbers) and prompt attacks. Then they're delivered live.
- Guard every action. Hooks run before every shell command, file read, tool call and prompt.
rm -rf ~or reading.envis blocked before it happens, and the key never reaches the model or the log.git push --forceasks the person first. - Policy in one place. An admin adds a rule once (
loom guard add shell "npm publish"), and every agent in the team follows it on its next call. Nobody can turn off the built-in credential rules. - Least privilege and humans in charge. Owner, member and viewer roles per project. Newcomers knock and an admin lets them in.
loom revokecuts off a computer and its agents instantly. - One live audit log. A dashboard shows who did what, with which agent, on which computer, as it happens.
How we built it
- On the laptop: a Python CLI (Typer) that runs a local MCP server for Cursor, Claude Code and the Claude app, plus pre-action hooks for Cursor and Claude Code. A one-line installer sets everything up. One guard engine is shared by the hooks and the server, so the rules always match.
- The gateway: a FastAPI server with WebSockets for live deliveries and the activity feed, and a plain HTML/CSS/JS dashboard.
- Search that refuses to guess: hybrid search (pgvector dense search plus Postgres full-text search) fused with Reciprocal Rank Fusion. Cohere Rerank 3.5 narrows 20 candidates to the top 5. If even the best passage scores below a threshold, LoomAI refuses before calling the language model at all. The permission check sits inside the retrieval SQL, so passages from projects you're not in are never even scored.
- Models on Amazon Bedrock: Cohere Embed Multilingual v3 for embeddings, Claude Haiku 4.5 for quick steps (rewriting follow-up questions, project briefs), Claude Sonnet 4.5 for grounded answers with sources, and Bedrock Guardrails for deliveries.
- AWS infrastructure from one CloudFormation stack: CloudFront → Application Load Balancer → EC2 in a private subnet → RDS for PostgreSQL with pgvector, plus S3 with SSE-KMS for files, Secrets Manager, SSM Run Command for deploys (no SSH) and a VPC with a NAT gateway and an S3 endpoint. The EC2 instance uses an IAM role, so there are no AWS access keys anywhere. The ALB only accepts traffic that came through CloudFront. A company can run the same stack in its own AWS account with one command.
Challenges we ran into
- Guarding agents we don't control. Cursor and Claude Code each have their own hook format and event names. We built one guard engine and thin adapters for each. We also had to decide what happens if the guard itself crashes: it fails open, so a bug in LoomAI can never freeze someone's agent. Without a connection, it applies the last rules it fetched.
- Keeping secrets out of everything, including our own logs. Blocking a command that contains a key isn't enough if the audit log then stores that key. Secrets are caught and redacted on the laptop before anything leaves it, and checked again on the server and by Bedrock Guardrails.
- Teaching a RAG system to say "I don't know." Language models happily answer "What's the capital of France?" from any context. We used the reranker score as a gate before the model, and tuned the threshold so real questions get answered and off-topic ones are refused.
- Live updates through CloudFront and a load balancer. We had to get WebSockets working end to end over HTTPS on a
cloudfront.netaddress while locking the ALB so it can't be reached directly. - Merging a full redesign at the last minute. Our teammate Sean redesigned the dashboard while the backend kept changing underneath. We ported his design onto the current API rather than merging a branch that had drifted.
Accomplishments that we're proud of
- It's live on AWS and anyone can try it: one command installs it, creates a team and connects their AI apps.
- In our demo, a skill with a hidden prompt attack is stopped by Bedrock Guardrails before it reaches a teammate, and you can watch it appear in the live audit log.
- Answers always cite their sources, and LoomAI refuses instead of making things up.
- The whole cloud setup is one CloudFormation stack, with no SSH and no AWS keys anywhere.
- 92 automated tests passing.
What we learned
- Hooks before each action are the right place to control agents. You don't need to replace the agent, just stand between it and the world.
- Least privilege works best deep in the stack. Putting permissions inside the search query is simpler and safer than filtering results afterwards.
- A reranker is great at deciding whether to answer, not just what to show.
- Defense in depth matters for agents: local secret scanning, server-side scanning and Bedrock Guardrails each catch things the others miss.
What's next for LoomAI
- Single sign-on (AWS IAM Identity Center, Okta) instead of per-computer tokens.
- An optional proxy for model traffic, so prompts to model providers are governed too.
- Approvals in Slack and Teams for risky actions.
- Streaming the audit log to CloudWatch and AWS Security Hub.
- VPC endpoints for Bedrock, so no traffic leaves through the NAT gateway.
- Guarding more agents as they add hook support, including the Claude desktop app.
Built With
- amazon-bedrock
- amazon-cloudfront
- amazon-ec2
- amazon-rds-relational-database-service
- amazon-vpc
- amazon-web-services
- aws-cloudformation
- aws-secrets-manager
- aws-systems-manager
- bedrock-guardrails
- claude
- cohere
- css
- elastic-load-balancing
- fastapi
- html
- javascript
- mcp
- pgvector
- postgresql
- python
- typer
- websockets