# How to use my local private keys in agent-js?

**URL:** <https://forum.dfinity.org/t/how-to-use-my-local-private-keys-in-agent-js/9456>\
**Category:** JavaScript\
**Created:** [December 8, 2021, 9:09am UTC](https://forum.dfinity.org/t/how-to-use-my-local-private-keys-in-agent-js/9456 "2021-12-08T09:09:22Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![coin\_master](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/coin_master/32/15963_2.png) [@coin\_master](https://forum.dfinity.org/u/coin_master)\
**Post date:** [June 8, 2022, 12:16pm UTC](https://forum.dfinity.org/t/how-to-use-my-local-private-keys-in-agent-js/9456/5 "2022-06-08T12:16:42Z")

</div>

This issue have been resolved in another thread

> [@Using @dfinity/agent in node.js](https://forum.dfinity.org/t/using-dfinity-agent-in-node-js/6169/50#steps-1):
>
> Thanks to everyone above for the great commentary, really was nice to follow as I started troubleshooting not being able to load in my existing dfx principal via agent-js (I received the same different dfx and node principals as everyone else). Since it did take me a bit of time to get through it all, hopefully these steps make it easier for those of you running into a similar issue (as of the time of this post). Steps Navigate to my .dfx identities → ~/.config/.dfx/identity Create a new ide…

---

_[View the full topic](https://forum.dfinity.org/t/how-to-use-my-local-private-keys-in-agent-js/9456)._
