diff --git a/apps/workflow/api/src/main/java/org/onosproject/workflow/api/WorkletObjectStore.java b/apps/workflow/api/src/main/java/org/onosproject/workflow/api/WorkletObjectStore.java
new file mode 100644
index 0000000..1cb3f24
--- /dev/null
+++ b/apps/workflow/api/src/main/java/org/onosproject/workflow/api/WorkletObjectStore.java
@@ -0,0 +1,71 @@
+/*
+ * Copyright 2024-present Open Networking Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.onosproject.workflow.api;
+
+import java.util.Collection;
+import java.util.List;
+import java.util.Optional;
+
+/**
+ * Store for managing worklet.
+ */
+public interface WorkletObjectStore {
+    /**
+     * Registers worklet object.
+     *
+     * @param worklet registering worklet
+     */
+    void register(Worklet worklet);
+
+    /**
+     * Unregisters worklet object.
+     *
+     * @param name name of worklet
+     */
+    void unregister(String name);
+
+    /**
+     * Gets worklet objects.
+     *
+     * @param name id of worklet
+     * @return worklet
+     */
+    Optional<Worklet> get(String name);
+
+    /**
+     * Gets all worklet objects.
+     *
+     * @return collection of worklet
+     */
+    Collection<Worklet> getAll();
+
+    /**
+     * Gets worklet objects keys.
+     *
+     * @return List of worklet keys
+     */
+    List<String> getKeys();
+
+
+    /**
+     * Gets class from registered worklet object.
+     *
+     * @param name name of object
+     * @return class
+     * @throws ClassNotFoundException class not found exception
+     */
+    Optional<Class> getWorkletClass(String name) throws ClassNotFoundException;
+}
diff --git a/apps/workflow/app/src/main/java/org/onosproject/workflow/impl/InMemoryWorkletObjectStore.java b/apps/workflow/app/src/main/java/org/onosproject/workflow/impl/InMemoryWorkletObjectStore.java
new file mode 100644
index 0000000..4d772a7
--- /dev/null
+++ b/apps/workflow/app/src/main/java/org/onosproject/workflow/impl/InMemoryWorkletObjectStore.java
@@ -0,0 +1,138 @@
+/*
+ * Copyright 2024-present Open Networking Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.onosproject.workflow.impl;
+
+import com.google.common.collect.Lists;
+import com.google.common.collect.Maps;
+import org.osgi.service.component.annotations.Activate;
+import org.osgi.service.component.annotations.Component;
+import org.osgi.service.component.annotations.Deactivate;
+import org.osgi.service.component.annotations.Reference;
+import org.osgi.service.component.annotations.ReferenceCardinality;
+import org.onosproject.core.ApplicationId;
+import org.onosproject.core.CoreService;
+import org.onosproject.store.service.StorageService;
+import org.onosproject.workflow.api.Worklet;
+import org.onosproject.workflow.api.WorkletObjectStore;
+import org.slf4j.Logger;
+
+import java.util.Collection;
+import java.util.List;
+import java.util.Map;
+import java.util.Optional;
+
+import static org.slf4j.LoggerFactory.getLogger;
+
+@Component(immediate = true, service = WorkletObjectStore.class)
+public class InMemoryWorkletObjectStore implements WorkletObjectStore {
+
+    @Reference(cardinality = ReferenceCardinality.MANDATORY)
+    protected CoreService coreService;
+
+    @Reference(cardinality = ReferenceCardinality.MANDATORY)
+    protected StorageService storageService;
+
+    private final Logger log = getLogger(getClass());
+
+    private Map<String, Worklet> localWorkletMap = Maps.newConcurrentMap();
+
+    private ApplicationId appId;
+
+    @Activate
+    public void activate() {
+        appId = coreService.registerApplication("org.onosproject.workletobjectstore");
+        log.info("appId=" + appId);
+
+        localWorkletMap.clear();
+
+        log.info("Started");
+    }
+
+    @Deactivate
+    public void deactivate() {
+        localWorkletMap.clear();
+        log.info("Stopped");
+    }
+
+    /**
+     * Registers worklet object.
+     *
+     * @param worklet registering worklet
+     */
+    @Override
+    public void register(Worklet worklet) {
+        String name = worklet.getClass().getName().split("\\$")[1];
+        localWorkletMap.put(name, worklet);
+    }
+
+    /**
+     * Unregisters worklet object.
+     *
+     * @param name name of worklet
+     */
+    @Override
+    public void unregister(String name) {
+        localWorkletMap.remove(name);
+    }
+
+    /**
+     * Gets worklet objects.
+     *
+     * @param name id of worklet
+     * @return worklet
+     */
+    @Override
+    public Optional<Worklet> get(String name) {
+        return Optional.ofNullable(localWorkletMap.get(name));
+    }
+
+    /**
+     * Gets all worklet objects.
+     *
+     * @return collection of worklet
+     */
+    @Override
+    public Collection<Worklet> getAll() {
+        return localWorkletMap.values();
+    }
+
+    /**
+     * Gets worklet objects keys.
+     *
+     * @return List of worklet keys
+     */
+    @Override
+    public List<String> getKeys() {
+        return Lists.newArrayList(localWorkletMap.keySet());
+    }
+
+    /**
+     * Gets class from registered worklet object.
+     *
+     * @param name name of object
+     * @return Optional<class> Optional
+     * @throws ClassNotFoundException class not found exception
+     */
+    @Override
+    public Optional<Class> getWorkletClass(String name) throws ClassNotFoundException {
+        Worklet targetWorklet = localWorkletMap.get(name);
+        if (targetWorklet == null) {
+            return Optional.empty();
+        }
+        return Optional.of(targetWorklet.getClass());
+    }
+}
+
