I Built an Office for AI: Anatomy of My Personal Agent System

Türkçe sürüm: Yapay Zekâya Bir Ofis Kurdum

A personal engineering experience that runs from persistent memory to multi-agent orchestration and bounded autonomy.

Every new chat started from zero

Since I began using AI heavily, the lack of continuity has bothered me most. I would solve a problem, make a decision or do some research. When I came back to the same topic a few days later, I had to rebuild the context, remind it of earlier decisions and sometimes explain my work from the beginning.

I had no complaint about the model’s intelligence. What was missing was a setup that managed knowledge, decisions, tools and execution together. I asked myself whether, instead of explaining what to do every time, I could build a working environment that knows my past decisions, has its own areas of expertise and acts when needed.

Over time the answer split into two parts: Beyin (Turkish for “brain”) and Ajan Ofisi (“Agent Office”). Beyin is the persistent layer that holds my knowledge and working processes. Ajan Ofisi is the management and execution layer that turns that knowledge into work.

Today the system does the tasks I give it, and it also collects signals from its own use, produces improvement proposals and takes part in its own development. It does this within limits I defined. Getting there meant dealing with a different engineering problem than I expected.

1. A second brain

For personal knowledge management I use plain Markdown files, which I open with Obsidian, and Git. I don’t want my knowledge locked into an application’s database or an AI provider’s closed environment. I keep my notes, research, project records, tasks and decisions in a form that is readable, portable and linkable. The system I call Beyin is built on this.

Collecting files in a folder does not by itself make a second brain. Knowledge has to be found when needed, related to other knowledge and used in the right place. So over time I added linked notes and decision records, project-based tasks, code and note graphs, persistent memory for each agent, a shared memory and question channel between agents, scheduled jobs and a controlled development infrastructure tied to the projects. Only I write to the shared memory. Agents can propose additions, and I decide.

The graphs changed how I manage context. Instead of having an agent scan the whole project every time, I wanted it to first find the relevant functions, dependencies and past decisions, and then read only the files it needs. Cutting tokens was secondary; I mainly wanted the agent to see the problem in the right context. I haven’t measured how much this saves. In some runs the agent looks at the graph several times and still reads dozens of files.

Over time I learned that giving an AI more context does not always produce a better result. Giving the right context at the right moment and within the right limits works better.

2. From a visual office to a working organization

At the end of October 2026, I started adapting selmakcby’s ajan-ofisi project to my own way of working. The 3D office with cats, the principle of calling no model while idle and the CEO distributing work all come from that project. It is licensed under PolyForm Noncommercial 1.0.0, and the additions I describe in this post are built on top of it.

In the upstream project, agents appear as cats sitting at their desks. Each agent has a room, wakes up when work arrives and goes back to sleep when it finishes. At first I saw this as a fun visualization, and as I used it I noticed another benefit. Processes running in a terminal, unaware of each other, now looked like parts of one organization. On a single screen I could watch which agent was running, which task was waiting, where something had gone wrong and how many resources had been spent.

In my own version I gradually added task distribution, strategic planning, an advisory board, human approvals, workflow management, cost tracking, memory management and a software development pipeline.

One principle I took from the upstream project is that an idle agent does not connect to a model. There is no point in calling a model every few seconds while an agent waits for work. No model is called for idle polling. The model comes in only when there is a new task, a scheduled job that is due or a defined trigger.

3. Why I gave the agents an organizational model

It is possible to build a multi-agent system where every agent can do every job. I chose to separate expertise and responsibilities.

The final decision at the top is mine. The Chairman of the Board is a planning layer that evaluates my long-term goals, open work and project status, and only I run it. The CEO turns goals into tasks and hands them to suitable agents. For unclear or high-impact decisions, the CEO can consult a Mentor Board made up of strategy, technology, finance, marketing and legal/ethics. Specialist agents do the work assigned to them within their own tools and permission limits.

I was not trying to imitate a company. I wanted to separate the responsibilities for deciding, executing, evaluating and approving. I don’t want the agent doing a job to decide alone on the quality, safety and release of its own output. The agent that did the work does not give the approval: either defined checks do, or I do.

Working in information security shaped this separation. I think classic control principles such as segregation of duties, least privilege, auditability and change management also apply to agent systems. Because agents behave probabilistically, these principles matter even more here.

4. Separating the agent’s intelligence from its authority to execute

In mid-November 2026, I started working on a workflow engine (Workflow & Loop Engine). Until then, agents could take a task and produce a result, but running a multi-stage job reliably was a separate problem. A piece of research had to be prepared, then evaluated, revised if it fell short and closed once certain conditions were met. A software task also could not end with the code. It had to pass testing, review and approval.

Instead of having another agent manage the whole process, I wrote a deterministic engine. My principle was this: the AI evaluates what can be done, and the engine decides what is done, when, under which condition and with which permission.

Flow definitions live in versionable JSON files. Each flow’s inputs, steps, transition conditions, output schemas, permissions and resource limits are written in advance. The engine runs on Python and SQLite, and today it can do the following:

  • Sequential and conditional step execution.
  • Controlled retries.
  • Bounded improvement loops.
  • Splitting a step into multiple copies (fan-out).
  • Calling subflows.
  • Choosing a plan from the allowed options.
  • Persistent state and reconciliation after a restart.
  • Quality gates based on real tests.
  • Human approval and operator intervention.
  • Limits on calls, time and cost.

Running an agent with write access as a flow step is switched off for now.

Life cycle of a step in the workflow engine (labels in Turkish).
Life cycle of a step in the workflow engine (labels in Turkish).

I did not want unlimited autonomy in loops. Every loop has a stop condition, and an agent that fails does not run again forever. Automatically repeating an operation whose outcome I don’t know is also not always right. Redoing a piece of research and redoing an operation that may already have been sent outside do not carry the same risk. Instead of expecting the model to sense that difference, I wrote it into the execution rules.

5. Failed tests taught me a lot

When I designed the engine, my first goal was to put a new control layer on top without breaking the existing agent execution. A mechanism that worked in an isolated environment did not always work once connected to the real infrastructure.

In the review rounds before going live, I found the following problems and later fixed them: the same run could be started twice, a cancelled job stayed in the queue, approval and deployment did not match, there were concurrency errors, and operations with unknown outcomes were retried. Most of these were not specific to AI. State management, idempotency, atomicity and race conditions are known problems of distributed systems. AI added another layer of uncertainty on top of them.

So I limited the first live trials to read-only work: low-risk flows with research, evaluation and human approval. The first live pilot on November 19 completed with two model calls. At API list price its cost was equivalent to about $0.25. This is not a billed amount. It is the usage priced at list price.

What mattered to me was the flow advancing under defined conditions and stopping at its limits; the report itself came second. After that I gradually switched on the flows connected to the development pipeline and the other features.

After this experience, the question I ask myself changed. I am now less curious about what the system can do and more about the conditions under which it can stop.

6. From writing code with AI to building a development system

After a while, producing code was no longer the bottleneck. When a feature is described, the model writes the code quickly. Making that code fit the existing architecture, be secure, be tested, be released and be rolled back when needed is still engineering work.

So I built a development pipeline for my personal projects. A development request does not go to an agent that writes code straight to production. It first becomes a task with its scope, goals, acceptance criteria and risks written down. Then it is developed on a separate branch and goes through tests, and Ajan Ofisi packages are also reviewed by another model. The life cycle looks roughly like this:

Request → Technical specification → Development → Test → Independent review → Approval (me or conditional auto-approval) → Deployment

The development pipeline, from specification to deployment (labels in Turkish).
The development pipeline, from specification to deployment (labels in Turkish).

Claude Code does the development, and for Ajan Ofisi packages OpenAI Codex works as the independent reviewer. Different providers reduce the dependence on a single model. Two models reaching the same conclusion still does not show that the conclusion is correct. So I place model reviews next to real tests and verifiable evidence, not in their place.

On November 29, I added one more classification to the pipeline: how reversible each change is.

Operation classMeaning
ReversibleGoing back to the previous version removes its effect.
Requires compensationRolling back also needs a data or operation correction.
IrreversibleThe effect that has happened cannot be fully undone.

This class sets the boundary of automatic approval, and the default class is “reversible”. A code change may be reversible, but a data deletion or an outbound send performed by that code may not be. Safe automatic deployment rests partly on this distinction. The classification is new, so it has not yet been tested over a long period.

7. A system that improves itself

The stage that excited me most in Ajan Ofisi was the system taking part in its own development. I did not want to note every small problem I hit while using it, open a task, follow the fix and verify it. I wanted the system to derive its own development needs from the problems it ran into during use.

For this I built a self-improvement loop. The system collects interface errors, slow operations, usage signals, failed runs and rejected development tasks. At set intervals it measures how the interface looks at different screen sizes: overflows, small touch targets, accessibility problems, console errors. These measurements can turn into improvement proposals.

A suitable proposal enters the development pipeline. If it is in the class of limited and reversible changes and passes the defined checks, it can be deployed. After deployment, whether the change actually helped is measured again, and if the result is bad, rollback can kick in. I have not yet seen automatic rollback triggered in production.

The loop is: Signal → Proposal → Development → Verification → Approval (automatic or by me) → Deployment → Measurement → Rollback if needed.

The self-improvement loop, from signal to measurement and rollback (labels in Turkish).
The self-improvement loop, from signal to measurement and rollback (labels in Turkish).

What I cared about most here was that the system could not change its own oversight rules. An agent fixing an interface bug and an agent changing the approval mechanism that oversees it do not have the same authority. A change detected as touching the oversight code does not go into automatic approval; it comes to me instead. The detection relies on file and line patterns and is not perfect.

I want the system to improve itself, and I don’t want it to disable its own oversight. No model weights change here. Self-improvement is only the controlled improvement of software, processes and working rules.

8. Skills

What an AI system can do is not determined only by the model behind it. Methods that describe how a job is done, checklists, domain knowledge, tools and verification rules matter at least as much as the model.

So I put Claude Code’s skill approach at the center of the system. Skills make methods from areas such as software development, design, information security, research, finance, product management and content reusable. By the end of November, the number of installed skill directories at user and office level had reached 80. This number shows installed directories, not how much they are used.

Growth brought a new problem. Similar skills, unnecessary context consumption and picking the wrong skill can lower quality instead of raising it. So adding a skill means more to me than copying a Markdown file. I look at the skill’s source, its license, the tools it asks for, its network access, its executable scripts and how it relates to existing skills. Some skills are only text guidance. Some run scripts in an isolated environment. Some need external integration and have to be evaluated separately.

The most recent habit I added is to look for an existing solution before building a new capability. The agent first checks its own skill inventory, past notes, the code graph and earlier decisions, and moves to external sources if needed. The result is one of four options: use, adapt, suggest or write from scratch. My aim is for the system not to reinvent the same wheel again and again while it improves itself.

My next goal is to measure what skills add to tasks, more than how many times they are used.

9. Cost is an engineering problem

Whether an AI system is sustainable also depends on what resources it uses to produce results. Giving every job to the strongest model is possible, but a simple text fix and a complex architecture decision do not need the same capacity. So the CEO assigns tasks to a small, medium or large model according to their complexity. Small models do mechanical work. Large models handle multi-step reasoning, broad research and critical development.

I use more than one model, and I can watch their usage metrics in one place.

The cost equivalent at API list price is not the bill I pay, and I keep the two apart. Token consumption, cache usage, cost per task and model choice became daily operating indicators for me.

Managing total cost when working with more than one model is a design problem I am still thinking about.

10. Autonomy without information security increases risk

As someone who works in information security, I don’t see security in agent systems as a feature to add later. The moment I give an agent permission to use tools, I am no longer dealing with a system that only produces text. I am working with processes that can read files, change files, run commands, talk to other systems and hold persistent memory. Raising autonomy without building their security model also raises the risk.

These are the principles I try to apply in my own architecture:

  • Limit an agent’s permissions according to its task and workspace.
  • Use controlled tool gateways instead of free-form commands.
  • Treat content from external sources as data, not as instructions. This rule does not protect on its own. It works together with the other limits.
  • Use human approval and a verifiable operation identity for critical operations. I have to state one exception openly: when automatic approval is on, packages that raise no warning and are in the reversible class can go live without approval.
  • Run development in environments that are as isolated as possible.
  • Try to keep secrets from leaking into memory, outputs and logs. There is masking, but no absolute guarantee.
  • Stay on the safe side when there is an error or uncertainty: a state that cannot be confirmed goes to review.

An agent being able to read a web page should not give it the authority to follow the instructions on that page. An agent being able to inspect code should not mean it can change that code in production. These are classic security principles adapted to agent systems.

There are also new risks. Prompt injection, poisoning of persistent memory, tool misuse, delegation of authority and trust relationships between agents need to be handled in addition to classic application security. Memory is especially sensitive: a wrong piece of information can affect today’s work and also the decisions in later tasks. So I think persistent memory has to be handled in terms of source reliability, accuracy, validity period and context budget.

11. Today’s architecture

I think of Ajan Ofisi’s current structure as seven logical layers. This is my own classification.

LayerResponsibility
Experience and access2D/3D office, management dashboards, flow interface, terminal view.
Strategic managementChairman of the Board, CEO and Mentor Board.
OrchestrationTasks, schedulers, queues, workflow and loop engine.
Security and governancePermissions, isolation, approvals, quality gates, resource limits.
Execution and capabilitiesSpecialist agents, model providers, skills, development pipeline.
Knowledge and persistenceBeyin, agent memories, shared memory, note and code graphs.
Observation and self-improvementOperation logs, model analytics, interface measurements, development and rollback loop.
The seven logical layers of Ajan Ofisi (labels in Turkish).
The seven logical layers of Ajan Ofisi (labels in Turkish).

For infrastructure I chose components that are as simple as possible. The core server uses only the Python standard library, and data lives in SQLite, Markdown, JSON and Git. Instead of using a large framework, I cared about keeping the basic mechanisms understandable and auditable.

In the latest development period I split some server and front-end files that had grown into single pieces into modules by function, and I set up an automated test pipeline. In the last run on November 29, 934 tests ran: 932 passed, 2 were skipped (they depend on the local notes repository) and none failed. These numbers do not prove the system is free of errors. They give me a basis for seeing whether a change breaks the tested behavior.

12. Problems I have not solved yet

As the system grows, how reliably the existing features work together matters more than how many features I added. My work on resilience, resource management and recovery continues. Consistent skill selection and systematic measurement of skill quality, the reliability of persistent memory and source tracking, and reducing dependencies between components are also open items.

A green test pipeline is not the same as performance in real use. I don’t want to measure the system’s success by the number of tests, agents or skills. What I want to measure is how much time it saves me, how many jobs it finishes correctly on the first try, in which situations it needs me and how long the value it produces lasts.

13. What I learned along the way

Intelligence alone is not enough. A reliable result needs tools, context, process and verification.

Memory and knowledge are not the same thing. Storing a piece of data does not show that it is correct or that it will be useful later.

As autonomy increases, I need stronger controls.

I can’t leave security to the model’s good intentions. Critical limits have to be enforced with mechanisms that are as deterministic as possible.

More agents do not bring more output. Splitting the work correctly and cutting unnecessary coordination makes a bigger difference.

Model providers can change. The lasting value needs to sit in the knowledge base, processes, skills and architecture, not in the model.

For a system to improve itself, it first has to be able to measure itself. An improvement that is not measured often remains just a change.

Being able to stop is one of the most valuable abilities. I prefer a system that stops at limits of budget, permission, quality, security and uncertainty over one that tries to push forward under every condition.

Conclusion

At the start, what I wanted was an interface that would make it easier to watch my agents, and I got that ready-made from the upstream project. Today I am moving toward a personal working environment that connects my knowledge, projects, research and working processes.

The name I use for Ajan Ofisi is “Governed Self-Evolving Agent Architecture”, meaning an agent architecture that can improve itself under governance. This is my own naming, and I have not checked whether the literature has something similar. When I say “operating environment”, I don’t mean a computer operating system. I mean an organizational layer that runs on top of personal knowledge, decision, task and execution processes.

I don’t want an AI that takes me completely out of the processes. I want a system that takes over the load of repeated work, keeps the context of my decisions, can specialize, works on its own when needed and leaves control to me at critical points.

I think models and tools will change a lot in the coming years. How we organize our knowledge, which permissions we give AI, how we divide work with it and how we verify the results will stay on the agenda longer. For me, Ajan Ofisi is a small-scale experiment with these questions.

The draft of this post also went through the office’s steps of fact checking, license and security review, and correction. The decision to publish is mine.


Ajan Ofisi is adapted from selmakcby’s ajan-ofisi project. License: PolyForm Noncommercial 1.0.0.

Required Notice: Copyright (c) 2026 selmakcby (https://github.com/selmakcby/ajan-ofisi)

This post does not offer a commercial service or product, and the owner of the upstream project has not approved or endorsed it. The views are personal.